Global options
Usage: okyra [OPTIONS] <COMMAND> Options: -p, --page <PAGE> Page label. Pages open on first use and stay open between calls [default: p1] -h, --help Print help -V, --version Print version
Every command accepts -p, --page and -h, --help; they are left out of the listings below. Pages are tabs with a label. Use a second label to keep two sites open side by side:
okyra --page p2 goto https://example.com okyra pages # ["p1", "p2"]
Daemon and pages
okyra daemon
Run the daemon in the foreground. Clients start it on their own
Usage: okyra daemon [OPTIONS]
Options:
--headful Show the browser window
--chrome <CHROME> Chromium based browser binary. Defaults to OKYRA_CHROME or a known install
--connect <CONNECT> Attach to a running browser instead: brave, chrome, edge, chromium, a user data folder or a ws:// URL. Defaults to OKYRA_CONNECT
--idle-secs <IDLE_SECS> Exit after this many idle seconds. Default 1800, or a day when attached, since each new attach asks the user to allow it againYou rarely run this yourself. It is useful to watch the browser while you write a plan, or to keep the daemon in the foreground under a process manager.
okyra daemon --headful --idle-secs 600
okyra mcp
Serve MCP over stdio for AI agents: `claude mcp add okyra -- okyra mcp` Usage: okyra mcp [OPTIONS]
See MCP setup for each client.
claude mcp add okyra -- okyra mcp
okyra ping
Check the daemon answers. Does not start the browser Usage: okyra ping [OPTIONS]
okyra ping # pong
okyra status
Daemon pid, uptime and whether the browser is running Usage: okyra status [OPTIONS]
okyra status # {"browser_started": false, "connect": null, "pid": 30205, "uptime_ms": 13}okyra version
Browser name and protocol version. Starts the browser if needed Usage: okyra version [OPTIONS]
okyra version # {"product": "Chrome/151.0.7922.173", "protocolVersion": "1.3", ...}okyra stop
Stop the daemon and its browser Usage: okyra stop [OPTIONS]
okyra stop # stopping (or: not running)
okyra pages
List open pages Usage: okyra pages [OPTIONS]
okyra pages # ["p1", "p2"]
okyra close
Close a page Usage: okyra close [OPTIONS]
okyra --page p2 close
Navigate and act
Actions that change the page return once it has settled (how settling works). A target waits up to 5 seconds to appear. Target forms are on the targets page.
okyra goto
Open a URL and wait for it to load Usage: okyra goto [OPTIONS] <URL> Arguments: <URL>
okyra goto https://news.ycombinator.com
{
"settled": true,
"title": "Hacker News",
"url": "https://news.ycombinator.com/"
}okyra click
Click an element: a snapshot ref, role and name, x,y point, or CSS selector Usage: okyra click [OPTIONS] <TARGET> Arguments: <TARGET>
okyra click 'button "Log in"'
okyra type
Replace the text in a field Usage: okyra type [OPTIONS] <TARGET> <TEXT> Arguments: <TARGET> <TEXT>
okyra type 'textbox "Email"' ana@example.com okyra type 'textbox "Delivery time:"' 18:30 # date and time inputs too
okyra upload
Attach files to a file input, or its label or a box holding it Usage: okyra upload [OPTIONS] <TARGET> <FILES>... Arguments: <TARGET> <FILES>...
Relative paths resolve against the folder you run the command in.
okyra upload '#cv-button' cv.pdf # a label for a hidden file input works
{
"files": ["/home/ana/cv.pdf"]
}okyra hover
Move the mouse over an element and print the text that appeared, such as a tooltip Usage: okyra hover [OPTIONS] <TARGET> Arguments: <TARGET>
okyra hover 'circle.dot' # Lisbon: 24 °C
okyra select
Pick a dropdown option by value or visible text Usage: okyra select [OPTIONS] <TARGET> <VALUE> Arguments: <TARGET> <VALUE>
okyra select 'combobox "Crust"' "Deep pan" # prints the option picked: Deep pan
okyra press
Press a key: Enter, Tab, Escape, arrows, or one character Usage: okyra press [OPTIONS] <KEY> Arguments: <KEY>
Named keys: Enter, Tab, Escape, Backspace, Delete, ArrowUp, ArrowDown, ArrowLeft, ArrowRight, Home, End, PageUp, PageDown, Space, or any one character.
okyra press Enter
okyra scroll
Scroll the window by pixels, or an element into view with --to
Usage: okyra scroll [OPTIONS] [DY]
Arguments:
[DY] [default: 0]
Options:
--dx <DX> [default: 0]
--to <TO>okyra scroll 600 # down 600 px; prints where it ended, {"x": 0, "y": 430}
okyra scroll --to 'button "Next"' # into viewRead the page
okyra snapshot
Text outline of the page; refs like @e7 work as click and type targets
Usage: okyra snapshot [OPTIONS]
Options:
-i, --interactive Only interactive elements
--max-lines <MAX_LINES>Without --max-lines a snapshot stops at 400 lines and says how many more there are.
okyra snapshot -i page "Bank login" file:///…/login.html scroll 0 of 819 form: textbox "Email" @e1 textbox "Password" @e2 (password) button "Log in" @e3
okyra text
Print the visible text of an element Usage: okyra text [OPTIONS] <TARGET> Arguments: <TARGET>
okyra text .balance # €1,240
okyra extract
Print every match as JSON: table rows as cell arrays, list items as text
Usage: okyra extract [OPTIONS] <TARGET>
Arguments:
<TARGET>
Options:
--limit <LIMIT>The default limit is 200.
okyra extract '#rows tr' --limit 2 [ ["item 1", "10"], ["item 2", "11"], "… 8 more, raise limit to see them" ]
okyra eval
Run JavaScript in the page and print the result Usage: okyra eval [OPTIONS] <EXPRESSION> Arguments: <EXPRESSION>
Promises are awaited. In a plan the action is called evaluate.
okyra eval 'document.title' # Dashboard
okyra screenshot
Save a PNG screenshot and print its path. Image pixels are CSS pixels, so a point on it (420,260) works as a target
Usage: okyra screenshot [OPTIONS] [PATH]
Arguments:
[PATH]
Options:
--annotate Draw each visible element's ref on the image and list the refsThe daemon writes the file, and it may run in another folder, so give an absolute path. Without a path the file goes to the temp folder. The capture is the viewport.
okyra screenshot --annotate /tmp/order.png
{
"path": "/tmp/order.png",
"refs": [
"@e1 textbox \"Customer name:\" at 194,27",
"@e5 combobox \"Crust\" at 87,238",
"@e7 button \"Submit order\" at 54,314"
]
}Plans and waiting
okyra run
Run a plan: a JSON file (or - for stdin) with many steps, one call Usage: okyra run [OPTIONS] <PLAN> Arguments: <PLAN>
Exits with 1 when the plan stops on a failed step. The format is on the plans page.
okyra run login.json cat login.json | okyra run -
okyra wait
Wait until no requests run and the DOM is quiet, or sleep --ms
Usage: okyra wait [OPTIONS]
Options:
--ms <MS>
--quiet-ms <QUIET_MS>
--timeout-ms <TIMEOUT_MS>Defaults: 500 ms quiet, 10 second timeout. See settle and wait.
okyra wait # {"waited_ms": 502}
okyra wait --quiet-ms 800 --timeout-ms 5000
okyra wait --ms 250 # plain sleepLicence commands
okyra license status
Plan, company, runners and expiry of this machine's key Usage: okyra license status [OPTIONS]
okyra license status licence: none okyra: free for personal and noncommercial use and 30 day evaluation. Business use needs a licence: okyra.sthlabs.net/pricing
okyra license install
Check a key file (or - for stdin) and save it to ~/.config/okyra/license Usage: okyra license install [OPTIONS] <FILE> Arguments: <FILE>
More on the licence keys page.
okyra license install key.txt okyra license install - < key.txt
Agent skill commands
okyra skill install
Write SKILL.md to ~/.claude/skills/okyra, or $CLAUDE_CONFIG_DIR/skills/okyra
Usage: okyra skill install [OPTIONS]
Options:
--dir <DIR> Folder to write SKILL.md into, for other agents or a project
--force Replace a SKILL.md that differs from this version'sA second run with the same file changes nothing. See the agent skill.
okyra skill install okyra skill install --dir .claude/skills/okyra
okyra skill print
Print SKILL.md, for agents without a skills folder Usage: okyra skill print [OPTIONS]
okyra skill print
Environment variables
| Variable | Effect |
|---|---|
OKYRA_CHROME | Browser binary to start, instead of the first known install. |
OKYRA_HEADFUL=1 | Show the browser window. |
OKYRA_NO_SANDBOX=1 | Start Chromium without its sandbox. For containers only. |
OKYRA_CONNECT | Attach to a running browser: brave, chrome, edge, chromium, a user data folder or a ws:// URL. |
OKYRA_SOCKET | Daemon socket path. The log goes next to it. |
OKYRA_LICENSE | Licence key text. Wins over the saved key file. |
XDG_CONFIG_HOME | Replaces ~/.config for the saved licence key. |
The browser settings take effect when the daemon starts. Run okyra stop after changing them.