Skip to content

All the commands

contextcode --help lists them all; contextcode <command> --help shows the options of one.

CommandWhat it does
contextcode chatInteractive chat in the terminal. Uses a full-screen interface if the terminal is interactive, and a plain REPL if the output goes to a file; --tui and --plain force it. Accepts --modelo, --cwd and --continuar.
contextcode run "<prompt>"One agent turn, then exit. Ideal for scripts and scheduled tasks. Accepts --modelo.

They’re two different things and get mixed up often: login is your Context Code account; provider is the AI model the agent uses.

CommandWhat it does
contextcode login [--email <email>]Signs in to the license. It’s the only way on a headless server.
contextcode login --statusLicense status, without asking you anything.
contextcode logoutForgets the credentials on this machine (doesn’t cancel the subscription).
contextcode provider login <provider> [--key]Connects the AI engine: claude, gemini-api, openai, copilot, zai, ollama… With --key and no value it asks for the key without showing it; --key - reads it from stdin.
contextcode provider statusConfigured providers and which one is active.
contextcode modelos [--json]Available models per provider, with the active one marked.
contextcode modelos usar <id>Sets the model chat and run use, the same one as the app’s picker.
contextcode uso [hoy|semana|mes|todo]Tokens and cost, like the usage panel.
contextcode statusWhich bundled runtimes (Node, uv, npx) will really be used.

Brings up the web server your phone scans, with no window. It keeps running until you cut it with Ctrl+C (or forever, with --install).

OptionWhat it does
--print-qrDraws the link’s QR in the terminal. With a public URL, the QR is that one and the local network URL goes below. The URL goes to stdout and notices to stderr, so contextcode serve --print-qr | head -1 gives you the clean URL.
--publicPublishes through a public tunnel instead of the local network IP. Uses the machine’s fixed URL if it has one or can request one; otherwise a temporary tunnel whose URL changes on every start. Essential on a VPS.
--stableLike --public, but always with the machine’s fixed URL. Requires the plan with remote servers.
--port NListening port (default 8787, or the saved link’s).
--bind 127.0.0.1Listening IP. Behind nginx, caddy or an SSH tunnel, so the port isn’t exposed in the clear.
--minutes NLifetime of the new link, from 1 to 43,200 minutes (30 days).
--token-file <path>Stable token in a file with 0600 permissions, without depending on the system keychain. It’s what the service uses.
--installInstalls serve as a user service (systemd on Linux, LaunchAgent on macOS, scheduled task on Windows) and starts it. When it finishes it prints the URL and the QR the service will use.
--uninstallStops it and removes it.
CommandWhat it does
contextcode dispositivos [--json]Paired phones: name, id, paired, last used and IP.
contextcode dispositivos revocar <id|name>Revokes their access immediately, even with the server running. --todos for all, --si without confirmation.

How to run it as a service, which URL the QR carries and what to check if the phone doesn’t connect: Remote access from a server.

CommandWhat it does
contextcode remoto agregar <name> <url> [--token T]Registers a remote Context Code and pairs with it.
contextcode remoto listar [--json]The configured remotes. Never prints credentials.
contextcode remoto usar <name>Sets which one is used when you don’t say the name.
contextcode remoto quitar <name>Deletes the credential from this machine.
contextcode remoto probar [<name>]Checks that it responds, that the credential is valid and what’s on the other side.
contextcode chat --remoto [<name>]Chat in the terminal against the agent of another machine.

All the details, in Another Context Code from here.

CommandWhat it does
contextcode canal telegram|slack|whatsappLeaves the agent listening on that channel, with no window, until Ctrl+C. Accepts --workspace and --model.
contextcode canal configurar <channel>Saves and validates the bot token, asking for it without showing it.
contextcode canal estadoWhich channels have credentials, without showing them.
contextcode automatizaciones listar|crear|borrar|activar|desactivar|ejecutarThe same automations as the app.
contextcode tickOne pass of the automations scheduler, then exit. It’s what the system’s scheduled task invokes.
CommandWhat it does
contextcode mcp listar|agregar|quitar|probarMCP servers, in the same scopes as the app.
contextcode skills listar|instalar|quitarProject and global skills.
contextcode caja listar|guardar|rotar|borrarThe project vault. Values are asked for without showing them.

Examples and options in Manage from the terminal.

CommandWhat it does
contextcode conexionWhere everything is and how I connect — see its page. contextcode conexion --qr shows the QR of the running service again.
contextcode instalar-cli [--mostrar]Puts contextcode in the PATH where the installer couldn’t.
contextcode update [--check]Updates the binary (Linux servers).
CodeMeaning
0Success (also --help and --version).
1The action ran but failed.
2Wrong usage: unknown argument or missing value.

With no command, contextcode starts the desktop application; with --minimized, hidden in the tray.