Features

How do I manage browser profiles from the command line?

Updated December 5, 2026

Install the mirage command and sign in once with an API key. Then list, create, start and stop profiles, move them between folders and tags, import proxies and cookies, and install the Playwright version the app needs. Every command can print JSON and returns clear exit codes, so it fits shell scripts and cron. It ships with the public beta.

Mirage Browser: the quick start for the CLI, TypeScript and Python
Screens of the current build with demo data, not a mock-up.

How do I install and sign in?

Shell
npm install -g @mirage-browser/cli
mirage login        # paste a key for Scripts and SDK, then Enter
mirage status

mirage login reads the key from the keyboard or from stdin, so it does not land in your shell history. The key is stored in a file only your user can read.

How do I work with profiles?

Shell
mirage profiles list --search client
mirage profiles create "Client D" --os macos --folder Clients --tag us
mirage profiles start "Client D"              # prints a one-time Playwright address
mirage profiles start "Client D" --headless
mirage profiles stop "Client D"
mirage profiles create "Quick look" --temporary   # deleted when its browser stops
mirage profiles delete "Client D"             # to the trash for 30 days

A profile is named by its id or exact name; folders and tags by id or name.

How do I move cookies and proxies?

Shell
mirage cookies import "Client D" cookies.json
mirage cookies export "Client D" --format netscape --domain example.com -o client-d.txt
mirage proxies import list.txt --type socks5 --tag de
mirage proxies list --status dead

Cookie files open accounts, so -o writes them readable only by you.

How do I use it in shell scripts?

--json prints the API answer, errors go to stderr as JSON, and exit codes are 0 success, 1 error, 2 wrong arguments. Stop every running profile at the end of a working day:

Shell
for id in $(mirage profiles list --all --json | jq -r '.profiles[].id'); do
  mirage profiles stop "$id"
done

What else does the command do?

Command For
mirage playwright install Installs the Playwright version the app needs, --python for pip
mirage mcp Connects an AI agent without the app’s path
mirage cloud … Works with cloud profiles of a workspace while the app is closed, see cloud sync

Does it work on a server?

Yes, against the headless runner: point MIRAGE_LOCAL_API_URL at it and use the same commands.

Full reference: command line guide.