Skip to main content
Flags and arguments below are the contract as the binary states it. The global flags (--json, --timeout, …) apply here too and are documented on Global flags. Error codes are a workspace-global contract, not a per-command one — the taxonomy, and how to read a code that is not in it, is on The error envelope.

octolens onboard

Set up Octolens for your company from the terminal: account, website, keywords, mentions, feeds, Slack and your AI tools. Under —json (or piped) it prints the setup’s status envelope instead. Flags Examples
Returns With --json, stdout carries one JSON document with these fields. Backed by the v2 API operation GET /api/v2/onboarding. Exactly one document on stdout and nothing on stderr. A refused request (a Sandbox workspace, a second trial, an existing account) prints NO stdout document: it exits non-zero with the error envelope on stderr, whose additive nextAction names the recovery (octolens login for EMAIL_ALREADY_REGISTERED, onboard status for RESPONSE_LOST). The agent loop is onboard status --json, then run nextAction.argv. Without --json: A terminal runs the guided setup, step by step, and prints where the setup is when it stops. Piped or under --json it does not prompt: it prints the status envelope, exactly like onboard status.
Exit codes — 0 OK · 1 UNEXPECTED · 2 USAGE · 8 CANCELLED. The full map is on Exit codes.

octolens onboard feeds

Step 4 of onboarding: review the feeds we made for you, rename or remove any, then go on to Slack Flags Examples
Returns With --json, stdout carries one JSON document with these fields. Order of writes: --rename (PATCH /api/v2/feeds/{id}), then --remove (DELETE /api/v2/feeds/{id}, only with --yes), then --confirm advances to Slack. --remove without --yes exits 2 MISSING_REQUIRED_FLAGS and deletes nothing; an empty name exits 2 (Give the feed a name.). Run before the mentions step is done it exits 2 ONBOARDING_STEP_NOT_CURRENT; run after the feeds were confirmed it writes nothing and data.alreadyDone is true. Without --json: A terminal shows the numbered board (name, kind, mentions, what it shows) and one edit line: rN renames, -N marks a feed for removal, u undoes, Enter removes the marked feeds and goes on. Nothing is deleted before Enter; Ctrl-C exits 8.
Exit codes — 0 OK · 1 UNEXPECTED · 2 USAGE · 8 CANCELLED. The full map is on Exit codes.

octolens onboard finish

Finish setting up Octolens: take the remaining steps, start your 7-day trial and print the receipt Flags Examples
Returns With --json, stdout carries one JSON document with these fields. Walks the remaining legal transitions to complete (the last writes onboardingFinishedAt, which starts the trial). While step 3 is not done (the noise still being removed) it answers the mentions step with a run action instead (exit 0); before the workspace exists it exits 2 ONBOARDING_STEP_NOT_CURRENT. A finished setup answers done with data.alreadyDone. Without --json: A terminal prints the receipt: keywords, feeds, AI tools, the trial’s start and end dates, and up to three next commands.
Exit codes — 0 OK · 1 UNEXPECTED · 2 USAGE. The full map is on Exit codes.

octolens onboard keywords

Step 2 of onboard: review the keywords Octolens suggests for you, change any, and create your workspace Flags Examples
Returns With --json, stdout carries one JSON document with these fields. Backed by the v2 API operation POST /api/v2/onboarding/trial. Exactly one document on stdout and nothing on stderr. A refused request (a Sandbox workspace, a second trial, an existing account) prints NO stdout document: it exits non-zero with the error envelope on stderr, whose additive nextAction names the recovery (octolens login for EMAIL_ALREADY_REGISTERED, onboard status for RESPONSE_LOST). The agent loop is onboard status --json, then run nextAction.argv. At the keywords step data carries the proposal (state, the keyword rows) and data.trial ({plan, allowance, startsAt: "on_finish", endsAt: null}). --confirm creates the workspace and starts the trial exactly once; a re-run answers alreadyDone with no second write. A bad flag value or a blocking problem exits 2 KEYWORDS_STEP_INVALID; a write before the website step is finished exits 2 ONBOARDING_STEP_NOT_CURRENT. Ctrl-C exits 8; only while the trial is being started does it print the interrupted-write warning (one JSON line on stderr under --json). Without --json: A terminal shows the suggested keywords with their legend, lets you add, remove, rename or retype them at the > prompt, then creates your workspace and prints the next step.
Exit codes — 0 OK · 1 UNEXPECTED · 2 USAGE · 8 CANCELLED. The full map is on Exit codes.

octolens onboard mcp

Connect Claude Code, Cursor or Codex to Octolens’s MCP server (it signs in to Octolens on first use), then finish setup (step 6 of octolens onboard) Flags Examples
Returns With --json, stdout carries one JSON document with these fields. Writing a tool’s config is a decision: --client claude-code|cursor|codex needs --yes headless (exit 2 MISSING_REQUIRED_FLAGS, nothing written); --client print writes no tool config: the snippet is in data.snippet. A failed write exits 9 MCP_CONFIG_WRITE_FAILED. The config holds the MCP v2 URL only (/api/mcp/v2): the tool signs in to Octolens with OAuth on first use, and no key is created. After a write, onboard mcp --wait <s> --json waits for the first call; a bare onboard mcp --json offers the choice again. Once the tool called (or with --skip) the step finishes setup and stdout carries the done envelope with the trial’s end date. Without --json: A terminal picks the tool, shows the command or file (the v2 URL only, no key) and how the tool signs in, asks Run it? [Y/n], waits for the first question (Enter finishes) and prints the finish receipt.
After --skip, or once the first call landed, stdout carries the finished setup’s envelope (step: complete, status: done, nextAction: null) instead.
Exit codes — 0 OK · 1 UNEXPECTED · 2 USAGE · 8 CANCELLED. The full map is on Exit codes.

octolens onboard mentions

See your first mentions: the relevant ones, with the noise removed for you (step 3 of octolens onboard) Flags Examples
Returns With --json, stdout carries one JSON document with these fields. There is no decision: the server removes the noise on its own. The step waits up to --wait seconds for the collection and the noise removal, records the step as seen and continues. A wait that runs out is running with a poll action, never an error. The retired decision flags exit 2 NOISE_REMOVED_AUTOMATICALLY. Without --json: A terminal shows the live collection and the noise removal, then Your mentions · Relevant mentions · Noise removed and the top relevant mentions, capped to the window, then Continue.
Once step 3 is done, the same document carries the three numbers and the relevant mentions, completed includes mentions, and nextAction is the next step’s command (feeds).
Exit codes — 0 OK · 1 UNEXPECTED · 2 USAGE · 8 CANCELLED. The full map is on Exit codes.

octolens onboard slack

Setup step 5: connect Slack through a one-time link, send each feed to a channel and post the first mentions (or —skip; the daily email stays on) Flags Examples
Returns With --json, stdout carries one JSON document with these fields. Backed by the v2 API operation PUT /api/v2/onboarding/slack/routes. Exactly one document on stdout and nothing on stderr. A refused request (a Sandbox workspace, a second trial, an existing account) prints NO stdout document: it exits non-zero with the error envelope on stderr, whose additive nextAction names the recovery (octolens login for EMAIL_ALREADY_REGISTERED, onboard status for RESPONSE_LOST). The agent loop is onboard status --json, then run nextAction.argv. At the Slack step with no live link it mints one and answers open_url with the URL in nextAction.url at once (nothing on stderr); with a live link it waits up to --wait for the install. A failed first delivery exits 9 (SLACK_ROUTE_DELIVERY_FAILED / SLACK_ROUTE_DELIVERY_PARTIALLY_FAILED) with the per-route deliveries in the error. Without --json: A terminal asks to connect Slack, prints a one-time link and waits for it, lists where each feed goes (rN change channel, -N email only, u undo, Enter sends as shown) and prints one outcome line per route.
Exit codes — 0 OK · 1 UNEXPECTED · 2 USAGE · 8 CANCELLED. The full map is on Exit codes.

octolens onboard start

Start a free trial from the terminal: email a 6-digit code to your work email Flags Examples
Returns With --json, stdout carries one JSON document with these fields. status is needs_human and nextAction.kind is ask_human: only the person can read the emailed code. The pending signup is also saved to pending-onboarding.json (0600, no key) in the config dir, so onboard verify can omit --signup-id on the same machine. A personal email answers WORK_EMAIL_REQUIRED (exit 2). Re-running with the same email after a lost verify answer picks the same account back up. Without --json: A terminal runs the whole account block: banner, Work email:, Code:, then the verified line. Ctrl-C exits 8 and keeps the pending code for the next run.
Exit codes — 0 OK · 1 UNEXPECTED · 2 USAGE · 8 CANCELLED. The full map is on Exit codes.

octolens onboard status

Show where your Octolens setup is and the next step (the octolens.onboard/v1 envelope under —json) Flags Examples
Returns With --json, stdout carries one JSON document with these fields. Backed by the v2 API operation GET /api/v2/onboarding. Exactly one document on stdout and nothing on stderr. A refused request (a Sandbox workspace, a second trial, an existing account) prints NO stdout document: it exits non-zero with the error envelope on stderr, whose additive nextAction names the recovery (octolens login for EMAIL_ALREADY_REGISTERED, onboard status for RESPONSE_LOST). The agent loop is onboard status --json, then run nextAction.argv. Without --json: A terminal prints the step, its status, the trial and the next command in a few plain lines.
Exit codes — 0 OK · 1 UNEXPECTED · 2 USAGE. The full map is on Exit codes.

octolens onboard verify

Verify the emailed code: creates your account, saves the login and starts reading your website Flags Examples
Returns With --json, stdout carries one JSON document with these fields. The document is the NEXT step (website): the account exists, the key is saved as the current profile (never printed) and the website scan has started, so nextAction polls onboard website. An email that already has an Octolens account answers EMAIL_ALREADY_REGISTERED (exit 2, run octolens login). A lost answer exits 10 RESPONSE_LOST: re-run onboard start with the same email, which re-adopts the account. Without --json: A terminal prompts for a missing code, then prints the verified line.
Exit codes — 0 OK · 1 UNEXPECTED · 2 USAGE · 8 CANCELLED. The full map is on Exit codes.

octolens onboard website

Step 1 of onboard: watch Octolens read your website, correct the profile it found, and confirm it Flags Examples
Returns With --json, stdout carries one JSON document with these fields. Without write flags the command waits up to --wait seconds (45 by default) for the read, then answers running or the profile to accept. --set/--add/--remove edit the profile (only the fields that changed are sent; an over-cap edit exits 2 with the web editor’s words) and --confirm accepts it: the document is then the keywords step. Re-running --confirm once the step moved on answers the current step with data.alreadyDone: true. Without --json: A terminal with no flags runs the step: the live checklist of the read, the survey while it runs, the profile as a numbered form (a row number edits it), Enter to confirm. Ctrl-C exits 8.
Exit codes — 0 OK · 1 UNEXPECTED · 2 USAGE · 8 CANCELLED. The full map is on Exit codes.