Skip to content

Reference

Command line

Every octant command and flag: run and manage the host, start agents, add Projects, save provider keys, pair devices, and run a hub.

  • 13 min read
  • 18 sections

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. After octant 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 your PATH.

A terminal inside a Code thread may also have an octant on its PATH. That one runs octant mcp and nothing else.

sh
octant --help       # every command, also: octant help
octant --version    # the version, also: octant version

At 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_DIR picks the host that keeps its data in that folder. Without it, octant uses the default data folder.
  • OCTANT_SERVER_PORT sets the port a host started by octant listens on. The default is 13773.
  • If no host is running, most commands say so and stop. octant agent and octant web start one first, the way octant server start does.
  • 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.

sh
octant web [--no-open] [--dev] [--hostname <host>] [--port <port>]
FlagMeaningDefault
--no-openPrint 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
--devFor 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.

sh
octant status [--hostname <host>] [--port <port>]
FlagMeaningDefault
--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.

sh
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>]
CommandWhat it does
statusShows the service state and whether the host is ready.
startWrites the per-user service if needed, starts it, and waits until the host is ready.
stopAsks the host to stop, then stops the service.
restartStops and starts the host again.
enableInstalls the service and turns on automatic startup.
disableStops the host and turns off automatic startup.
logsPrints the host's recent log lines.
runRuns 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:

FlagMeaningDefault
--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
--followKeep 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.

FlagMeaningDefault
--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 ​

sh
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>]
FlagMeaningDefault
--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-dataAlso 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.

sh
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
FlagMeaningDefault
--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
--lastContinue 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-accessStart 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
--sandboxKeep the sandbox on at Full access. Needs --access full-access.Off
--detachStart 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
--jsonOne JSON object per line.Off
--plainLine by line, even on a terminal that can draw the full screen.Off
--quietNo 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".

sh
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.

sh
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.

sh
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>]
  • create makes a grant and prints a connection code that works once, for five minutes; with --direct it also prints a direct key, once.
  • code prints a new connection code for a grant; rotate-key replaces its direct key.
  • confirm enrolls a key an agent's computer offered, by at least 8 characters of its fingerprint; remove-key removes one.
  • revoke ends a grant at once; --stop-turns also stops the turns its threads are running.
  • join runs on the agent's computer: it makes a key, offers it with the code, and writes the connection file (octant-agent.json unless --out names 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.

sh
octant harness slots [--json]
octant harness session <thread-id> [--json]
octant harness agents <thread-id> [<n>|<id>] [--json]
  • slots prints the model routing table from Settings → Octant Harness.
  • session shows a thread's harness session: its status, lead model, turns, and routes.
  • agents lists 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.

sh
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
CommandWhat it does
addMakes a folder a Project. --type defaults to code; --name defaults to the folder's name.
removeArchives the Project.
renameGives the Project a new name.
accessfull-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.

sh
octant project add ~/Code/app --type code

See Projects.

settings ​

Sets the access new threads start at.

sh
octant settings access ask-first|accept-edits|auto|plan|full-access [--work]
octant settings sandbox on|off [--work]
  • access sets the default level for new threads.
  • sandbox sets whether new Full access threads keep the sandbox on.
  • Both change the Code default. --work changes 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.

sh
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>
CommandWhat it does
key setPrompts for the key without echoing it. --stdin reads it from standard input instead. --replace overwrites a stored key.
key statusSays whether a key is stored.
key removeClears the key and keeps the provider.
removeRemoves the provider, then its stored key.
sign-inSigns 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.

sh
octant provider key set "My gateway" --stdin < ~/gateway.key

See Save an API key for an endpoint and Sign in with a code.

plugin ​

Installs plugins from npm and writes your own.

sh
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>
CommandWhat it does
installAsks the host to look the package up, prints what it found, and installs that exact version. It arrives untrusted and switched off.
check-updateSays whether a newer version of an installed npm plugin exists.
createWrites a starter plugin folder here. --mcp-url adds a remote MCP server it connects to.
checkChecks 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.

sh
octant diagnostics export --out <folder or .zip>
octant diagnostics export --list
  • --out saves to a .zip file or to a folder that is new or empty. An existing file is refused.
  • --list prints 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.

sh
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>
CommandWhat it does
statusShows whether the listener is ready, failed with a reason, or disabled. Also what octant listener alone does.
enableTurns the listener on. --hostname and --port are required. Give --cert and --key together, or neither for a certificate the host makes.
disableTurns the listener off and forgets it.
prepare-keyPrepares a new listener key and prints the current and new pins.
cancel-keyDrops the prepared key.
activate-keySwitches 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.

sh
octant pair [--source loopback|lan-private|tailscale]
octant pair requests
octant pair approve <ticket-id>
octant pair deny <ticket-id>
  • octant pair makes a single-use pairing token that lasts five minutes. --source names where the device connects from; the default is loopback.
  • requests lists pending claims with the device, origin, comparison code, and key fingerprint.
  • approve and deny decide one claim by its ticket id.

See How pairing works.

auth ​

Lists and revokes paired devices.

sh
octant auth list
octant auth revoke <device-id>
octant auth revoke --all

octant auth alone lists the devices. See Device management.

hub ​

Runs a hub, joins one, and manages its members and offers.

sh
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>
CommandWhat it does
statusShows the role, the members, and any offers.
enableMakes this computer the hub. Prints the one command that starts it at boot. --install-service runs it for you.
disableStops 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-codePrints 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.
grantShows the grant, or sets it with --items <list> or --items none.
leaveLeaves 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:

sh
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>
  • standby shows the standby order, sets it to the members you name, or clears it.
  • promote --confirm makes this standby the hub. accept-hub accepts it on each other computer.
  • stand-in lets a standby that is standing in for the hub add or remove a member.

Hub services and offers:

sh
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|off
  • wake, push, and provision turn the wake service, the push sender, and offers on or off. All start off.
  • offer makes an offer from the hub. offer-withdraw takes it back.
  • apply and dismiss decide an offer on a spoke. A routine needs --project with a Work Project.
  • auto-apply applies one kind of offer without asking.

Public entrance, visitor links, webhooks and the device relay (not in a release yet):

sh
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.

sh
octant mcp
octant mcp --help

octant 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.

Octant documentation · local-first by design