Command line
The octant command runs and manages the Octant host from a terminal, and does much of what Settings does.
Get the command
- From a checkout. Run
bun packages/cli/src/bin.ts <command>from the repository root. Bun 1.4.4 or later is needed. Linux host walks through it. - From a headless artifact. The unpacked artifact has
bin/octant. Afteroctant server install, run it from<install root>/current/bin/octant. Install a headless artifact explains it. - From Octant Nightly on macOS. Nightly carries
octant-nightly, the Nightly build of the same command. It never starts, stops, installs, or upgrades a host. The octant-nightly command shows how to put it on yourPATH.
A terminal inside a Code thread may also have an octant on its PATH. That one runs octant mcp and nothing else.
octant --help # every command, also: octant help
octant --version # the version, also: octant versionAt a terminal, octant with no command opens the agent in the folder you are in, the same as octant agent. So does a run that starts with one of the agent's flags (octant --last) or with a quoted prompt (octant "fix the failing tests"). Without a terminal, octant with no command prints the same list and exits with status 1. Code from the terminal walks through it.
How octant finds the host
octant talks to the host running as your user on this computer. It reads the host's address and its local secret from files that only your user can read, opens a short-lived session, and drops it when the command ends. The host still decides what each command may do.
OCTANT_DATA_DIRpicks the host that keeps its data in that folder. Without it,octantuses the default data folder.OCTANT_SERVER_PORTsets the port a host started byoctantlistens on. The default is13773.- If no host is running, most commands say so and stop.
octant agentandoctant webstart one first, the wayoctant server startdoes. - An older host answers a command it does not know with "Needs a newer Octant".
Each flag takes the next word as its value unless that word starts with --. An unknown flag or a missing value prints the usage list and exits with status 1.
web
Opens the browser client on this computer.
octant web [--no-open] [--dev] [--hostname <host>] [--port <port>]| Flag | Meaning | Default |
|---|---|---|
--no-open | Print the one-time link instead of opening a browser. | Opens the browser |
--hostname <host> | The host address to attach to. | 127.0.0.1 |
--port <port> | The host port to attach to. | 13773 |
--dev | For contributors: serve the web app from its development server. octant-nightly refuses it. | Off |
The link carries a single-use token that expires after five minutes. Run octant web as the same user that runs the host. See Iterate with the browser client.
status
Checks whether a host answers at an address.
octant status [--hostname <host>] [--port <port>]| Flag | Meaning | Default |
|---|---|---|
--hostname <host> | The address to check. | 127.0.0.1 |
--port <port> | The port to check. | 13773 |
It prints the state and the address, and exits with status 0 only when the host is ready. octant server status --hostname <host> or --port <port> does the same.
server
Starts, stops, installs, and reads the log of the host on this computer. octant-nightly refuses every server command except status and logs.
octant server status
octant server start [--pair [--hostname <address>] [--port <port>] [--cert <path> --key <path>]]
octant server stop
octant server restart
octant server enable
octant server disable
octant server logs [--since <ISO-8601>] [--limit <n>] [--follow]
octant server run [--port <port>]| Command | What it does |
|---|---|
status | Shows the service state and whether the host is ready. |
start | Writes the per-user service if needed, starts it, and waits until the host is ready. |
stop | Asks the host to stop, then stops the service. |
restart | Stops and starts the host again. |
enable | Installs the service and turns on automatic startup. |
disable | Stops the host and turns off automatic startup. |
logs | Prints the host's recent log lines. |
run | Runs the host in the foreground. Ctrl-C or SIGTERM lets running work finish first. |
The per-user service is octant.service under systemd and app.octant.server under launchd. On Linux, start, restart, and enable say which host programs are missing, but never install them.
For a headless host, run octant server enable as the account that owns the host. Run octant server start to serve immediately and octant server status to check it. On Linux, an enabled user service starts before anyone signs in when the account has lingering enabled. A Mac login agent starts at login. A Mac configured as a hub can use its boot service. On Windows the CLI starts the host at sign-in. Already paired devices use their existing connection.
server logs flags:
| Flag | Meaning | Default |
|---|---|---|
--since <ISO-8601> | Only lines after this time. | Recent lines |
--limit <n> | At most this many lines, from 1 to 1000. | The host's own limit |
--follow | Keep printing new lines until Ctrl-C. | Off |
server run --port <port> sets the port for that run. Without it, the host uses OCTANT_SERVER_PORT or 13773.
Pair while you start
--pair on server start or server install turns on the remote listener and shows a pairing code once the host is running. See Add a computer in one step.
| Flag | Meaning | Default |
|---|---|---|
--hostname <address> | The Tailscale or private network address to listen on. Other addresses are refused. | The address found on this computer |
--port <port> | The listener port. | 8443 |
--cert <path> --key <path> | Your own certificate and key. Give both or neither. | The host makes its own certificate |
Install, upgrade, and remove a headless build
octant server install --artifact <path> [--install-root <path>] [--pair ...]
octant server upgrade --artifact <path> [--install-root <path>]
octant server uninstall [--install-root <path>] [--data-dir <path>] [--remove-data --confirm <exact-data-dir>]| Flag | Meaning | Default |
|---|---|---|
--artifact <path> | The unpacked headless artifact. Required for install and upgrade. | — |
--install-root <path> | Where versions are kept side by side, with a current link. | OCTANT_INSTALL_ROOT, else install in the host's state folder (~/.local/state/octant/install on Linux) |
--data-dir <path> | The data folder uninstall reports or removes. | The host's data folder |
--remove-data | Also delete the data folder. Needs --confirm with the exact folder path. | Keeps your data |
install --pair starts the installed copy, then pairs. See Install a headless artifact.
agent
Starts or continues a thread from the terminal. octant on its own at a terminal is the same command.
octant agent [<prompt>] [--mode auto|chat|work|code] [--project <name>] [--thread <id>] [--last]
[--prompt <text>] [--title <title>] [--model <model or endpoint/model>]
[--access ask-first|accept-edits|auto|plan|full-access] [--full-access] [--sandbox]
[--detach] [--json] [--plain] [--quiet] [--theme system|light|dark|octant]
octant agent status <thread-id> [--json]
octant agent mcp| Flag | Meaning | Default |
|---|---|---|
--mode <mode> | auto follows the folder you are in: a Code or Work Project that holds it, else Chat. | auto |
--project <name> | File a new thread in this Project. | The Project that holds the folder |
--thread <id> | Continue an existing thread, in its own mode. | A new thread |
--last | Continue the latest Code or Work thread of this folder's Project, else your latest Chat thread. | Off |
<prompt> | The first message of a session that stays open. Not with --prompt. | None |
--prompt <text> | Send one prompt, print the reply, and exit. Without it, the terminal UI opens. | Terminal UI |
--title <title> | A title for a new thread. | Chosen by the host |
--model <name> | The model for a new thread. Use endpoint/model when two offer the same id. Not with --thread or --last. | The mode's default |
--access <level> | The access a new Work or Code thread starts at. plan works for Work and Code threads. | The Settings default |
--full-access | Start this run's thread at Full access. Only that thread gets it; nothing is saved on the Project. Accepted only from a terminal on this computer; another agent calling octant agent mcp cannot choose it. Refused when the thread would be Strict (its Project's default or Settings). | Off |
--sandbox | Keep the sandbox on at Full access. Needs --access full-access. | Off |
--detach | Start the prompt's turn and exit once it has started, without waiting for the reply. Needs --prompt; Work and Code threads only. | Waits for the reply |
--json | One JSON object per line. | Off |
--plain | Line by line, even on a terminal that can draw the full screen. | Off |
--quiet | No desktop notification when a turn ends. | Notifies |
--theme <theme> | The terminal UI's colour preset. | system |
Started at a terminal inside a Git repository that is not a Project yet, octant agent asks whether to add the repository's top folder as a Code Project, the same as octant project add. A no starts a Chat thread instead. Nothing is asked without a terminal or with --json. Anywhere else, --mode code in a folder that is not a Project is refused with the exact octant project add command to run.
--json, --plain, --last, --quiet, --full-access, --sandbox, and --detach take no value, so a word after one of them is part of the prompt: octant --last check the build continues the latest thread with "check the build".
octant "fix the failing tests"
octant agent --prompt "Summarize the open pull requests"Code from the terminal walks through the terminal UI. Native harness: from the terminal covers the terminal UI and its slash commands.
agent status
Shows where a thread got to: its newest prompt and reply, whether it is running, its open questions, and what waits on you in Octant. --json prints the same as one JSON object. It applies only when the word after status is a thread id; otherwise the words are a prompt.
octant agent --prompt "Fix the failing test" --detach
octant agent status <thread-id>agent mcp
A stdio MCP server that lets another agent on this computer start and follow work in Octant. It is mcp alone after agent and takes no arguments besides --help; more words are a prompt. See Start work from another agent.
On another computer, octant agent mcp --connection <file> is the same server for an agent there: it signs each request with the key octant agent-access join made and sends it to Octant. See From another computer.
agent-access
Makes and manages agent grants: what an agent on another computer on your network may do in Octant.
octant agent-access create <name> --project <name>[,<name>] [--mode chat,work,code]
[--access ask-first|accept-edits|auto|plan] [--threads own|project]
[--allow-answers] [--models <id>,…] [--days <n>] [--direct]
[--turns-per-day <n>] [--running-turns <n>] [--requests-per-minute <n>] [--json]
octant agent-access list|show <grant> [--json]
octant agent-access code|rotate-key <grant>
octant agent-access confirm|remove-key <grant> <fingerprint>
octant agent-access revoke <grant> [--stop-turns]
octant agent-access join <code> [--out <file>] [--label <label>]createmakes a grant and prints a connection code that works once, for five minutes; with--directit also prints a direct key, once.codeprints a new connection code for a grant;rotate-keyreplaces its direct key.confirmenrolls a key an agent's computer offered, by at least 8 characters of its fingerprint;remove-keyremoves one.revokeends a grant at once;--stop-turnsalso stops the turns its threads are running.joinruns on the agent's computer: it makes a key, offers it with the code, and writes the connection file (octant-agent.jsonunless--outnames another).
A grant is named by its id, the start of its id, or its name. Every command except join runs on the computer running Octant. See From another computer.
harness
Reads the native harness without starting a turn.
octant harness slots [--json]
octant harness session <thread-id> [--json]
octant harness agents <thread-id> [<n>|<id>] [--json]slotsprints the model routing table from Settings → Octant Harness.sessionshows a thread's harness session: its status, lead model, turns, and routes.agentslists a thread's helper agents, or shows one by list number or the start of its id.
--json prints JSON instead of text. See Native harness.
project
Adds and changes Projects.
octant project add <path> [--type work|code] [--name <name>]
octant project remove <name>
octant project rename <name> <new name>
octant project access <name> full-access|approval-gated| Command | What it does |
|---|---|
add | Makes a folder a Project. --type defaults to code; --name defaults to the folder's name. |
remove | Archives the Project. |
rename | Gives the Project a new name. |
access | full-access makes a Code Project remember Full access. approval-gated asks for confirmation per thread again. Code Projects only. |
A name that more than one active Project shares is refused; rename them in Octant first.
octant project add ~/Code/app --type codeSee Projects.
settings
Sets the access new threads start at.
octant settings access ask-first|accept-edits|auto|plan|full-access [--work]
octant settings sandbox on|off [--work]accesssets the default level for new threads.sandboxsets whether new Full access threads keep the sandbox on.- Both change the Code default.
--workchanges the Work default instead.
These are the Default mode and Work access rows in Settings.
provider
Saves and removes provider keys on the host, and signs in with a code.
octant provider key set <instance> [--replace] [--stdin]
octant provider key status <instance>
octant provider key remove <instance>
octant provider remove <instance>
octant provider sign-in <instance>| Command | What it does |
|---|---|
key set | Prompts for the key without echoing it. --stdin reads it from standard input instead. --replace overwrites a stored key. |
key status | Says whether a key is stored. |
key remove | Clears the key and keeps the provider. |
remove | Removes the provider, then its stored key. |
sign-in | Signs in an organization endpoint with a code you enter in a browser anywhere. |
Name the provider by its display name or its id. A key is never taken as an argument or an environment variable.
octant provider key set "My gateway" --stdin < ~/gateway.keySee Save an API key for an endpoint and Sign in with a code.
plugin
Installs plugins from npm and writes your own.
octant plugin install npm:<package>[@<version or range>]
octant plugin check-update <package>
octant plugin create <name> [--mcp-url <https address>]
octant plugin check <folder>| Command | What it does |
|---|---|
install | Asks the host to look the package up, prints what it found, and installs that exact version. It arrives untrusted and switched off. |
check-update | Says whether a newer version of an installed npm plugin exists. |
create | Writes a starter plugin folder here. --mcp-url adds a remote MCP server it connects to. |
check | Checks a folder the way the host's import does, and lists its skills and MCP servers. |
create and check work on files only and do not need a running host. Trusting and enabling stay in the Octant window. See Install from npm and Write a plugin.
diagnostics
Saves a support bundle for you to read and send yourself.
octant diagnostics export --out <folder or .zip>
octant diagnostics export --list--outsaves to a.zipfile or to a folder that is new or empty. An existing file is refused.--listprints what a bundle holds and what it never holds, and saves nothing.
Nothing is sent. See Saving diagnostics.
listener
Turns the remote listener on and off, and changes its key.
octant listener [status]
octant listener enable --hostname <lan-or-tailscale-address> --port <port> [--cert <path> --key <path>]
octant listener disable
octant listener prepare-key
octant listener cancel-key
octant listener activate-key --pin <prepared-new-pin>| Command | What it does |
|---|---|
status | Shows whether the listener is ready, failed with a reason, or disabled. Also what octant listener alone does. |
enable | Turns the listener on. --hostname and --port are required. Give --cert and --key together, or neither for a certificate the host makes. |
disable | Turns the listener off and forgets it. |
prepare-key | Prepares a new listener key and prints the current and new pins. |
cancel-key | Drops the prepared key. |
activate-key | Switches to the prepared key. --pin must be the exact new pin. |
See Remote access and Changing the listener key.
pair
Pairs a browser or phone with this host.
octant pair [--source loopback|lan-private|tailscale]
octant pair requests
octant pair approve <ticket-id>
octant pair deny <ticket-id>octant pairmakes a single-use pairing token that lasts five minutes.--sourcenames where the device connects from; the default isloopback.requestslists pending claims with the device, origin, comparison code, and key fingerprint.approveanddenydecide one claim by its ticket id.
See How pairing works.
auth
Lists and revokes paired devices.
octant auth list
octant auth revoke <device-id>
octant auth revoke --alloctant auth alone lists the devices. See Device management.
hub
Runs a hub, joins one, and manages its members and offers.
octant hub status
octant hub enable [--install-service]
octant hub disable [--remove-service]
octant hub certificate [--enable --acknowledge-transparency | --disable | --status]
octant hub join-code [--owner]
octant hub join <code> [--items <list>|none]
octant hub grant [--items <list>|none]
octant hub leave
octant hub remove <member-id-or-name>| Command | What it does |
|---|---|
status | Shows the role, the members, and any offers. |
enable | Makes this computer the hub. Prints the one command that starts it at boot. --install-service runs it for you. |
disable | Stops being the hub. --remove-service goes back to the ordinary login service. |
certificate | --status (the default), --enable --acknowledge-transparency, or --disable for a Tailscale certificate. |
join-code | Prints a code for a new device. --owner makes the device that joins an owner. |
join <code> | Joins a hub. --items sets what the hub may do; without it you keep the default grant, or are asked at a terminal. |
grant | Shows the grant, or sets it with --items <list> or --items none. |
leave | Leaves the hub. |
remove <member> | Removes a member by name or id. |
The grant items are roster, status, introduce, wake, owners, standby, push, provision, and act, separated by commas.
Standby and recovery:
octant hub standby [<member>... | --clear]
octant hub promote [--confirm]
octant hub accept-hub <member>
octant hub stand-in join-code
octant hub stand-in remove <member>standbyshows the standby order, sets it to the members you name, or clears it.promote --confirmmakes this standby the hub.accept-hubaccepts it on each other computer.stand-inlets a standby that is standing in for the hub add or remove a member.
Hub services and offers:
octant hub wake on|off
octant hub push on|off
octant hub provision on|off
octant hub offer update-channel stable|preview|candidate [--mirror <signed-feed.json>]
octant hub offer plugin <catalog-id> <entry-id> <sha256:digest>
octant hub offer agent-profile|model-endpoint|routine <fields.json>
octant hub offer-withdraw <offer-id>
octant hub apply <offer-id> [--project <project-id>]
octant hub dismiss <offer-id>
octant hub auto-apply update-channel|plugin|agent-profile on|offwake,push, andprovisionturn the wake service, the push sender, and offers on or off. All start off.offermakes an offer from the hub.offer-withdrawtakes it back.applyanddismissdecide an offer on a spoke. A routine needs--projectwith a Work Project.auto-applyapplies one kind of offer without asking.
Public entrance, visitor links, webhooks and the device relay (not in a release yet):
octant hub public on [--port 443|10000] [--own-front]
octant hub public off|status
octant hub public standby on|off
octant hub public fronts <tailscale-address>...
octant hub public fronts --clear
octant hub public address <https-url>|clear
octant hub webhook create [--scheme standard-webhooks|github|stripe] [--label <name>]
octant hub webhook list
octant hub webhook rotate|remove|secret <endpoint-id>
octant hub visitor on|off|list
octant hub visitor share code|chat|work <thread-id> [--comment] [--hours <1-168>]
octant hub visitor stop <link-id>
octant hub visitor send|dismiss <comment-id>
octant hub relay on|off|list
octant hub relay allow|forget <device-id>webhook secret reads a Stripe signing secret from standard input. See The hub's public entrance.
octant-nightly refuses --install-service and --remove-service. See Set up a hub, Add devices, Shared work, and Hub troubleshooting.
mcp
Lends a terminal's Browser to a coding CLI.
octant mcp
octant mcp --helpoctant mcp is a stdio MCP server. It passes messages between the CLI and the Browser that a Code thread terminal was lent, and holds no policy of its own. It takes no other arguments. Outside such a terminal it offers no tools. See Browser for a CLI in a terminal.