CLI
Run tasks, control computers, and wire up coding agents from your terminal.
The lightcone CLI brings everything in Lightcone to your terminal: run Northstar tasks with live streaming, control browser and desktop computers directly with pipeable Unix-style commands, and connect coding agents like Claude Code and Cursor to Lightcone via MCP.
Install
Section titled “Install”curl -fsSL https://lightcone.ai/install | shThis installs a single static binary; no runtime or toolchain required. Prebuilt binaries are available for macOS (Intel and Apple Silicon), Linux (x86_64 and aarch64), and Windows.
To upgrade later:
lightcone updateSign in
Section titled “Sign in”lightcone loginThis opens your browser for a device-flow sign-in, so it inherits your organization’s SSO and MFA. Check or clear your session with:
lightcone whoami # show the stored identitylightcone logout # revoke the session and clear local credentialsAlternatively, skip browser auth entirely and use an API key from the dashboard:
export TZAFON_API_KEY=sk_your_api_key_hereRun tasks
Section titled “Run tasks”Give Northstar a task and watch it stream live:
lightcone run "Go to wikipedia.org and tell me the first sentence of the Alan Turing article"Useful flags:
| Flag | What it does |
|---|---|
--kind desktop|browser | Choose the computer environment |
--max-steps <n> | Cap the number of agent steps |
--model <model> | Pick the Northstar model |
--start-url <url> | Open a page before the task starts |
--system-prompt <text> | Add custom system instructions |
--json | Emit raw NDJSON events for piping |
Running bare lightcone opens the interactive TUI instead. While a task is running, press Enter to inject a message into it mid-run: steer it, add context, or tell it to stop. The TUI also shows a Follow URL you can open in a browser to watch the session live.
Direct computer control
Section titled “Direct computer control”Every direct-control command is a single REST call that writes its load-bearing output (IDs, URLs, HTML, shell output) to stdout, so $() capture and pipes work naturally:
lightcone computers create [--kind desktop|browser] [--persistent] # prints the computer idlightcone computers list [--json]lightcone computers destroy <id>
lightcone screenshot <id> # prints a signed image URLlightcone click <id> <x> <y>lightcone double-click <id> <x> <y>lightcone right-click <id> <x> <y> # desktop onlylightcone type <id> "<text>"lightcone hotkey <id> <keys...> # e.g. ctrl clightcone scroll <id> <dx> <dy> [x] [y]lightcone navigate <id> <url> # browser onlylightcone html <id> # page HTML to stdoutlightcone shell <id> "<command>" # remote stdout/stderr/exit codelightcone batch <id> --json '[...]' # multiple actions in one round-tripChain them together:
id=$(lightcone computers create)lightcone screenshot $id | xargs open # macOS: open the screenshot URLlightcone navigate $id https://example.comlightcone click $id 400 300lightcone type $id "hello world"lightcone hotkey $id enterlightcone computers destroy $idA few things worth knowing:
--persistentcreates a computer whose state can be saved and reused across sessions.hotkeytakes named keys likeenter,ctrl,shift, case-insensitive.shellmirrors the remote command’s stdout, stderr, and exit code locally, solightcone shell $id "exit 7"; echo $?prints7. It works as an ssh-like step in CI scripts.
Wire up coding agents
Section titled “Wire up coding agents”Connect Claude Code, Cursor, or Codex to Lightcone so your coding agent can drive browsers and desktops:
lightcone configure-agentsThis writes MCP configuration pointing at @tzafon/lightcone-mcp for the agents you select. Your API key is read from the environment at runtime; it is never embedded in the config files.
For a single project instead of your whole machine:
lightcone configure-projectThis writes project-scoped config (.mcp.json, .cursor/mcp.json) and offers to install the Lightcone SDK into the project as well.
Scripting
Section titled “Scripting”Commands that support --json emit NDJSON or JSON on stdout, so the CLI composes with jq and standard shell tooling:
lightcone computers list --json | jq -r '.[].id'lightcone run "check example.com is up" --json | jq -r 'select(.type == "text") | .delta'Next steps
Section titled “Next steps”- Quickstart: run your first task with the SDK
- Tasks: how Tasks work, configuration, pause/resume
- Computers: the computer control API behind these commands
- How Lightcone works: architecture and the API layers