Automations from your terminal
The ClickRuntime CLI gives a coding assistant with a terminal everything the ClickRuntime MCP server does: draft a Python automation, get it set up, put it live and check its runs. You sign in once, add keys in the ClickRuntime dashboard and confirm before anything goes live.
$ npx clickruntime status$ pipx install clickruntime-cliNode.js 18 or later for npx; Python 3.9 or later for pipx. Both give the same clickruntime command.
You approve once, in the browser
There is no API key to copy.
- BrowserRun clickruntime login. Your browser opens the ClickRuntime sign-in, where you sign in or create an account with Google or an email link, pick a workspace and approve.
- Remote machineOn a remote machine or in a sandbox, clickruntime login --device shows a code instead. Open clickruntime.com/device on your phone or laptop, sign in and enter it.
- Sign outEach sign-in is listed in the ClickRuntime dashboard under Settings → Assistants, where you can sign it out.
$ clickruntime login$ clickruntime login --deviceWhat the assistant runs, and when it needs you
Ask for an automation in plain language. The assistant runs these commands; each one prints JSON with a next step whenever you have something to do.
The assistant checks whether it's signed in.
$ clickruntime status --jsonIt writes the script and saves a draft. A draft does nothing on its own.
$ clickruntime save --jsonIt gives you a link for each key or account the automation needs. You add keys in the ClickRuntime dashboard, never in the terminal.
$ clickruntime setup <id> --jsonIt gives you a confirm link. Nothing goes live until you open it and confirm.
$ clickruntime deploy <id> --jsonAfter a test run, it reads the result and fixes the script if needed.
$ clickruntime run-log <run_id> --wait --json
You stay in charge of keys and going live
You
- Sign in and approve
- Add keys and connect accounts in the ClickRuntime dashboard
- Confirm turning on, running now and deleting
The assistant
- Write and save the script
- Find what setup is missing and give you the links
- Test runs, read logs and fix failures
Every command and exit code: CLI docs. Instructions written for the assistant: For coding agents. Making HTTP requests instead: API docs.
Questions about the CLI
When should I use the CLI instead of the MCP server?
Use the MCP server when your assistant supports it, which most do. The CLI suits coding assistants that work in a terminal, for example in a sandbox or on a remote machine where MCP isn't set up. Both have the same operations and rules.
Does the assistant ever see my API keys?
No. The CLI and the API never take a key. When an automation needs one, the CLI prints a link to the page in the ClickRuntime dashboard where you save it.
Can the assistant turn an automation on by itself?
No. Turning on, running now, applying a change and deleting all print a confirm link, and only you can confirm it. Pausing needs no confirmation.
Is there an API?
Yes. The CLI is built on the ClickRuntime API at clickruntime.com/api/v1, with the same sign-in. See the API docs and openapi.json.
Does it cost extra?
No. Automations made with the CLI use the same plan as the rest of your workspace, including on the free plan.
CLI docs
The same text as /docs/cli.
The ClickRuntime CLI lets a coding assistant with a terminal, such as Claude Code, Codex or Cursor, do everything the ClickRuntime MCP server does, without MCP. It follows the same rules: you sign in, add keys and connections in the ClickRuntime dashboard, and confirm before anything goes live. The assistant never sees a key and can't confirm on its own. See also For coding agents and the API.
Install#
npx clickruntime status
Node.js 18 or later. Or install it with Python 3.9 or later:
pipx install clickruntime-cli
Both install the same clickruntime command, with the same commands, output and exit codes. The Python package never installs a clickruntime module, so it can't get in the way of scripts that import clickruntime.
Sign in#
clickruntime login
The CLI opens the ClickRuntime sign-in in your browser. Sign in or create an account with Google or an email link, pick a workspace and approve. The tab then says you can go back to your agent.
On a machine without a browser, such as a remote server or a sandbox, use a code instead:
clickruntime login --device
It prints a link and a code like BCDF-GHJK. Open clickruntime.com/device on any device, sign in, check the code matches and approve. Only enter a code you got from your own agent. If no browser sign-in arrives within five minutes, login also offers a code and keeps waiting for the browser for five more; whichever you finish first signs you in.
An agent that can't wait for you can run clickruntime login --device --no-wait, give you the link and the code, and later run clickruntime login --continue.
Each sign-in appears in the ClickRuntime dashboard under Settings → Assistants, in Signed in from a terminal, where you can sign it out. clickruntime logout does the same from the terminal.
Commands#
All commands take --json and --workspace <name>. Each one maps to an MCP tool, so the skills, the MCP server and the API read the same.
| Command | What it does | MCP tool |
|---|---|---|
clickruntime status | Signed in? Which workspace? | get_profile |
clickruntime login [--device] [--no-wait] | Sign in (the person approves in the browser) | — |
clickruntime logout | End this sign-in | — |
| `clickruntime init <name> --pattern schedule | incoming | remember_then_schedule` |
clickruntime save | Save the local files as a draft, or update it | save_draft, update_draft, change_automation |
clickruntime pull <id> | Download an automation's script and settings | get_automation, get_script |
clickruntime list | List automations | list_automations |
clickruntime show <id> | One automation | get_automation |
clickruntime setup <id> | Setup steps left, each with its link | get_setup_status |
| `clickruntime setup run --title <t> --purpose discover | setup` | Run a one-off discovery or setup script |
clickruntime deploy <id> | Turn on a draft, or apply a pending change (the person confirms) | prepare_confirmation |
clickruntime run <id> | Run it now (the person confirms) | prepare_confirmation |
clickruntime resume <id> | Resume a paused automation (the person confirms) | prepare_confirmation |
clickruntime delete <id> | Delete it (the person confirms) | prepare_confirmation |
clickruntime wait <confirmation_ref> | Wait for the person to confirm, then for the deploy | get_confirmation_status, wait_for_deploy |
clickruntime pause <id> | Pause a live automation | pause_automation |
clickruntime runs <id> | Recent runs | list_runs |
clickruntime run-log <run_id> [--wait] | One run with its logs | get_run |
clickruntime events <id> | Events received on the trigger link | list_incoming_events |
clickruntime replay <id> <event_id> | Run again on a received event | replay_event |
clickruntime test-event <id> --file payload.json | Send a sample event | send_test_event |
clickruntime connections | Connected accounts and saved key names | list_connections |
clickruntime connect <app> | A consent link for the person to connect an account | begin_connection |
clickruntime apps | Apps with ready-made connections | list_app_catalog |
clickruntime docs runtime | The script reference | clickruntime://docs/runtime |
clickruntime docs cli | This guide, as markdown | — |
clickruntime <command> --help | Help for one command: its flags, JSON output and exit codes (add --json for JSON) | — |
| `clickruntime issue report | list | show |
deploy, run, resume and delete print a confirm link. Nothing happens until you open it and confirm. With --json they return straight away with exit code 4; clickruntime wait <confirmation_ref> then waits for your decision. Without --json they wait unless you pass --no-wait.
A project folder#
clickruntime init writes two files. clickruntime save sends them, and records the automation's id in clickruntime.json so the next save updates the same automation.
{
"name": "Morning status",
"summary": "Weekday mornings, email me the status page.",
"pattern": "schedule",
"schedule": { "kind": "weekdays", "time": "09:00", "timezone": "Europe/London" },
"how_it_works": { "steps": ["Reads the status page.", "Emails you what it says."] },
"setup_needs": [{ "kind": "connection", "provider": "email" }],
"dependencies": []
}
automation.py is the script. Read the script reference first, or run clickruntime docs runtime.
JSON output#
With --json the CLI prints one JSON object on stdout. Whenever you have to do something, it includes next:
{
"next": {
"action": "open_link",
"url": "https://clickruntime.com/confirm/…",
"say": "Open this link and press Turn on to confirm: Turns on Morning status."
}
}
say is one sentence the agent can repeat to you. Errors are {"error", "message", "next"} on stdout too. Tokens are never printed.
Exit codes#
| Code | Meaning |
|---|---|
| 0 | Done |
| 1 | Error |
| 2 | Usage error |
| 3 | Not signed in, or the sign-in ended |
| 4 | Waiting on you: a link was printed |
| 5 | Too many requests; retry later |
| 6 | You cancelled the confirmation, or it expired |
Settings#
| Setting | Default |
|---|---|
CLICKRUNTIME_TOKEN | Use this access token instead of the credentials file, for sandboxes and CI |
CLICKRUNTIME_API_URL | https://clickruntime.com/api/v1 |
CLICKRUNTIME_AUTH_URL | https://clickruntime.com (where clickruntime login signs in) |
CLICKRUNTIME_CONFIG_DIR | ~/.config/clickruntime (Windows: %APPDATA%\clickruntime) |
The sign-in is stored in credentials.json in that folder, readable only by you. Access tokens last an hour and the CLI refreshes them. There are no long-lived API keys.
Limits#
The CLI uses the same plan as everything else in your workspace, including on the free plan: its runs, deploys and AI tokens count toward the same monthly limits. See Pricing.
Prefer to set it up from a chat?
Every AI assistant with MCP can use ClickRuntime. Free plan. No credit card.