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 <key>]Connects the AI engine: claude, gemini-api, openai, copilot, zai, ollama…
contextcode provider statusConfigured providers and which one is active.
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. 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. Essential on a VPS: there is no “local network” there that your phone can reach.
--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 systemd user service and starts it. Linux only, no sudo.
--uninstallStops it and removes it.
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 tickOne pass of the automations scheduler, then exit. It’s what the system’s scheduled task invokes.
CommandWhat it does
contextcode conexionWhere everything is and how I connect — see its page.
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.