Skip to content

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.

Installsame clickruntime command
$ npx clickruntime status
$ pipx install clickruntime-cli

Node.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.

  1. 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.
  2. 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.
  3. Sign outEach sign-in is listed in the ClickRuntime dashboard under Settings → Assistants, where you can sign it out.
Terminal
$ clickruntime login
$ clickruntime login --device

What 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.

  1. The assistant checks whether it's signed in.

    $ clickruntime status --json
  2. It writes the script and saves a draft. A draft does nothing on its own.

    $ clickruntime save --json
  3. It 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> --json
  4. It gives you a confirm link. Nothing goes live until you open it and confirm.

    $ clickruntime deploy <id> --json
  5. After 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.

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.

CommandWhat it doesMCP tool
clickruntime statusSigned in? Which workspace?get_profile
clickruntime login [--device] [--no-wait]Sign in (the person approves in the browser)—
clickruntime logoutEnd this sign-in—
`clickruntime init <name> --pattern scheduleincomingremember_then_schedule`
clickruntime saveSave the local files as a draft, or update itsave_draft, update_draft, change_automation
clickruntime pull <id>Download an automation's script and settingsget_automation, get_script
clickruntime listList automationslist_automations
clickruntime show <id>One automationget_automation
clickruntime setup <id>Setup steps left, each with its linkget_setup_status
`clickruntime setup run --title <t> --purpose discoversetup`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 deployget_confirmation_status, wait_for_deploy
clickruntime pause <id>Pause a live automationpause_automation
clickruntime runs <id>Recent runslist_runs
clickruntime run-log <run_id> [--wait]One run with its logsget_run
clickruntime events <id>Events received on the trigger linklist_incoming_events
clickruntime replay <id> <event_id>Run again on a received eventreplay_event
clickruntime test-event <id> --file payload.jsonSend a sample eventsend_test_event
clickruntime connectionsConnected accounts and saved key nameslist_connections
clickruntime connect <app>A consent link for the person to connect an accountbegin_connection
clickruntime appsApps with ready-made connectionslist_app_catalog
clickruntime docs runtimeThe script referenceclickruntime://docs/runtime
clickruntime docs cliThis guide, as markdown—
clickruntime <command> --helpHelp for one command: its flags, JSON output and exit codes (add --json for JSON)—
`clickruntime issue reportlistshow

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#

CodeMeaning
0Done
1Error
2Usage error
3Not signed in, or the sign-in ended
4Waiting on you: a link was printed
5Too many requests; retry later
6You cancelled the confirmation, or it expired

Settings#

SettingDefault
CLICKRUNTIME_TOKENUse this access token instead of the credentials file, for sandboxes and CI
CLICKRUNTIME_API_URLhttps://clickruntime.com/api/v1
CLICKRUNTIME_AUTH_URLhttps://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.

Server URLhttps://clickruntime.com/api/mcp