All the commands
contextcode --help lists them all; contextcode <command> --help shows the options of one.
The agent
Section titled “The agent”| Command | What it does |
|---|---|
contextcode chat | Interactive 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. |
Account and AI engine
Section titled “Account and AI engine”They’re two different things and get mixed up often: login is your Context Code account; provider is the AI model the agent uses.
| Command | What it does |
|---|---|
contextcode login [--email <email>] | Signs in to the license. It’s the only way on a headless server. |
contextcode login --status | License status, without asking you anything. |
contextcode logout | Forgets 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 status | Configured 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 status | Which bundled runtimes (Node, uv, npx) will really be used. |
Remote access: serve
Section titled “Remote access: serve”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).
| Option | What it does |
|---|---|
--print-qr | Draws 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. |
--public | Publishes 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. |
--stable | Like --public, but always with the machine’s fixed URL. Requires the plan with remote servers. |
--port N | Listening port (default 8787, or the saved link’s). |
--bind 127.0.0.1 | Listening IP. Behind nginx, caddy or an SSH tunnel, so the port isn’t exposed in the clear. |
--minutes N | Lifetime 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. |
--install | Installs 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. |
--uninstall | Stops it and removes it. |
| Command | What 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.
Connecting to ANOTHER Context Code
Section titled “Connecting to ANOTHER Context Code”| Command | What 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.
Channels and automation
Section titled “Channels and automation”| Command | What it does |
|---|---|
contextcode canal telegram|slack|whatsapp | Leaves 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 estado | Which channels have credentials, without showing them. |
contextcode automatizaciones listar|crear|borrar|activar|desactivar|ejecutar | The same automations as the app. |
contextcode tick | One pass of the automations scheduler, then exit. It’s what the system’s scheduled task invokes. |
Extensions and secrets
Section titled “Extensions and secrets”| Command | What it does |
|---|---|
contextcode mcp listar|agregar|quitar|probar | MCP servers, in the same scopes as the app. |
contextcode skills listar|instalar|quitar | Project and global skills. |
contextcode caja listar|guardar|rotar|borrar | The project vault. Values are asked for without showing them. |
Examples and options in Manage from the terminal.
Diagnostics and maintenance
Section titled “Diagnostics and maintenance”| Command | What it does |
|---|---|
contextcode conexion | Where 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). |
Exit codes
Section titled “Exit codes”| Code | Meaning |
|---|---|
0 | Success (also --help and --version). |
1 | The action ran but failed. |
2 | Wrong usage: unknown argument or missing value. |
With no command, contextcode starts the desktop application; with --minimized, hidden in the tray.
Documentation assistant
Answers only from the Context Code manual
Hi. Ask me how to use Context Code and I'll answer with what this documentation says, linking to the pages.
Listening…
Speak normally. When you pause, I answer out loud.
It can make mistakes: check the details on the linked pages. 0/500