--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 init
Guided onboarding: company profile, keywords, filters, and your first feed
Headless (--json, or no TTY) it never prompts: it reports the onboarding plan and exits 0 whether or not steps remain — read fullyOnboarded and steps[].done for what is left, never the exit code.
Examples
--json, stdout carries one JSON document with these fields.
A step may additionally carry a non-gating
tip ({status, commands}) naming optional follow-up state (e.g. pending AI keyword suggestions); tips never affect fullyOnboarded.
Without --json: A terminal walks the pending steps interactively and prints a closing summary.
Example output
Example output
0 OK · 1 UNEXPECTED · 2 USAGE · 8 CANCELLED. The full map is on Exit codes.
octolens mcp connect
Connect Claude Code, Cursor or Codex to Octolens’s MCP server: write its MCP config (the tool signs in to Octolens on first use)
Arguments
Flags
Examples
--json, stdout carries one JSON document with these fields.
Re-running leaves exactly one
octolens entry (an old key-based /api/mcp entry is replaced). Writing a tool’s config headless needs --yes (exit 2); a failed write exits 9 MCP_CONFIG_WRITE_FAILED.
Without --json: A terminal says what was written, how the tool signs in, and suggests a first question to ask.
Example output:
0 OK · 1 UNEXPECTED · 2 USAGE · 8 CANCELLED. The full map is on Exit codes.