Ichrome
Chrome controller for Humans, based on Chrome Devtools Protocol(CDP) and python3.7+.
Install / Use
/learn @ClericPy/IchromeREADME
Chrome controller for Humans, based on Chrome Devtools Protocol(CDP) and python3.8+. Read Docs
🚀 [NEW] ichrome v6.0.0 is available! Now supporting ichrome.http - a RESTful API server to control Chrome via HTTP requests.
uvx --from ichrome ichrome.http
or
python -m ichrome.http
then view the interactive API docs athttp://localhost:8080/docs

If you encounter any problems, please let me know through issues; your feedback is valuable for enhancing
ichrome.
Install
pip install ichrome -U
Uninstall & Clear the user data folder
$ python3 -m ichrome --clean
$ pip uninstall ichrome
Quick Start
import asyncio
from ichrome import AsyncChromeDaemon
async def test():
async with AsyncChromeDaemon() as cd:
# create a new tab
async with cd.connect_tab(index=None) as tab:
await tab.goto('https://github.com/ClericPy/ichrome', timeout=5)
print(await tab.title)
# Privacy Mode, proxyServer arg maybe not work on Chrome, for `Target.createBrowserContext` is the EXPERIMENTAL feature(but chromium is ok).
# https://chromedevtools.github.io/devtools-protocol/tot/Target/#method-createBrowserContext
async with cd.incognito_tab(proxyServer='http://127.0.0.1:8080') as tab:
await tab.goto('https://httpbin.org/ip', timeout=5)
print(await tab.html)
asyncio.run(test())
Why?
- In desperate need of a stable toolkit to communicate with Chrome browser (or other Blink-based browsers such as Chromium)
ichromeincludes fast http & websocket connections (based on aiohttp) within an asyncio environment
- Pyppeteer is awesome
- But I don't need so much, and the spelling of 'pyppeteer' is confusing
- Event-driven architecture (EDA) is not always ideal.
- Selenium is slow
- Webdriver often comes with memory leaks
- PhantomJS development is suspended
- No native coroutine (
asyncio) support
- Webdriver often comes with memory leaks
- Playwright arrived too late
- This may be a good choice for both
syncandasyncusage- The original author of
puppeteerjoined the team.
- The original author of
- But its core code is based on Node.js, which is hard to monkey-patch.
- This may be a good choice for both
Features
As we know,
Javascriptis the first-class citizen of the Browser world, so learn to use it frequently withichrome.
-
A process daemon for Chrome instances
- auto-restart
- command-line usage
asyncenvironment compatible
-
Connect to an existing Chrome
-
Operations on Tabs under stable
websocket- Commonly used functions
Incognito Mode
-
ChromeEngineas the process pool- support HTTP
apirouter with aiohttppython -m ichrome.httporuvx ichrome.httppython -m ichrome.http --helpfor usage
- ~~
python -m ichrome.web(Removed since v6.0.0)~~
- support HTTP
-
Flattenmode withsessionId- Create only 1 WebSocket connection
- New in version 2.9.0
- EXPERIMENTAL
- Share the same
Websocketconnection and usesessionIdto distinguish requests
- After v3.0.1
AsyncTab._DEFAULT_FLATTEN = True
-
The install script of chromium
-
debug mode for sync usage with
ichrome.debugger>4.0.0 (EXPERIMENTAL)
Breaking Changes
- v6.0.0
ichrome.webmodule is removed, use ichrome.http instead.- refactor the
ChromeEnginemethod parameters.- add
waitcondition before engine.do
- add
Related Skills
node-connect
350.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
claude-opus-4-5-migration
110.4kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
frontend-design
110.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
model-usage
350.8kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
