Command line
mirage works with the Local API of the running app. It needs a key for Scripts and SDK.
The SDKs and the command line are published on npm and PyPI together with the public beta. Until then these commands do not find the packages.
npm install -g @mirage-browser/climirage login # paste the key, then Entermirage statusmirage login reads the key from the keyboard or from stdin (mirage login < key.txt), so it does not end up in your shell history. The key is saved in a file only your user can read. mirage logout forgets it.
Profiles
mirage profiles list --search shopmirage profiles start "Shop 1" --headless # prints the Playwright wsEndpointmirage profiles stop "Shop 1"mirage profiles create "Shop 2"mirage profiles create "Check" --temporary # deleted when its browser stopsmirage profiles create "Shop 4" --browser chromemirage profiles update "Shop 2" --status Ready --proxy <proxy-id>mirage profiles create "Shop 3" --os windows --folder Shops --tag warm --tag us --proxy <proxy-id>mirage profiles update "Shop 3" --folder none --clear-tagsmirage profiles list --folder Shops --tag warmmirage profiles delete "Shop 3" # to the trash; kept 30 daysmirage profiles list --trashmirage profiles restore <profile-id>mirage folders listmirage tags listA profile is named by its id or its exact name; folders and tags by id or name. profiles delete refuses a running profile: stop it first.
Cookies
mirage cookies import "Shop 3" cookies.json # JSON (EditThisCookie, Dolphin), Netscape or Base64mirage cookies import "Shop 3" - --replace < cookies.txtmirage cookies export "Shop 3" --format netscape --domain example.com -o shop3.txtImported cookies reach a running browser at once, a stopped one at its next start. Cookies are logins: -o writes a file only your user can read, and both commands need a key with Create and edit profiles. profiles start prints a one-time address for firefox.connect; add --no-automation to only open the profile. A profile made with --temporary is deleted, with its data, when its browser stops.
Proxies
mirage proxies import list.txt --type socks5 --tag de # one proxy per line, "-" reads stdinmirage proxies list --status deadmirage proxies check <proxy-id>mirage proxies delete <proxy-id> --replace-with <other-id>Playwright
mirage playwright install # playwright-core for Node.js, in the current foldermirage playwright install --python # playwright for Python, with pipIt installs the Playwright version the app needs. --dry-run prints the command instead.
In scripts
--jsonon any command prints the API answer as JSON; errors also go to stderr as JSON.- Exit codes:
0success,1error,2wrong arguments. - The key comes from
--key, thenMIRAGE_API_KEY, then the saved one. Avoid--key: other users of the computer can see the command line, and it stays in shell history. The CLI warns when it is used. The address comes from--url, thenMIRAGE_LOCAL_API_URL, then the app’s address file.
for id in $(mirage profiles list --all --json | jq -r '.profiles[].id'); do mirage profiles stop "$id"donemirage mcp connects AI agents: see AI agents (MCP).
Cloud access
mirage cloud … works without the app: it connects the computer to the Mirage server as a script with its own keys and manages a workspace’s cloud profiles. See Cloud access for scripts.