Documentation
Docs · CLI

CLI commands

Every operon verb, grouped by what you're trying to do — with its flags and a command you can copy and run.

Getting started

operon setup

One-shot onboarding: sign in, detect AI tools, pick a workspace, mine your first candidates.

--yes
Accept all defaults (skip prompts where safe).
--non-interactive
Fail fast if any prompt would be required (CI / agent mode).
--no-browser
Token-paste fallback for headless setup.
--since <duration>
First-mine window (e.g. 30d, 90d). Default 30d.
--workspace <slug>
Use this workspace; create it if it doesn't exist.
--api-base <url>
Override platform base URL.

operon login

Sign in to the Operon platform (device-code flow).

--workspace <slug>
Set default workspace slug for publish.
--token <token>
Skip the device-code flow; pass a PAT directly (op_pat_...).
--no-browser
Don't try to open a browser; print the URL instead.
--api-base <url>
Override platform base URL.

operon doctor

Sanity-check the install and local data layout.

--fix
Attempt to repair config / permissions issues.

operon upgrade

Check for a newer @withoperon/cli on npm, optionally install it.

--apply
Run the install (npm i -g @withoperon/cli@latest). Without it, only checks.

Mine & publish

operon mine

Find recurring prompts in your Claude Code, Codex, and Cursor sessions. Preview, accept, and publish them as operons.

--source <src...>
Limit to one or more sources.
--workspace <slug>
Override the default workspace from config.
--since <duration>
Window to scan (e.g. 7d, 30d, 90d). Default 30d.
--top <N>
Max candidates to preview. Default 5.
--dry-run
Print candidates, do not publish.
--yes
Skip prompts and publish all candidates.
--api-base <url>
Override platform base URL.

operon polish [slug]

Use Claude to turn a candidate into a clean SKILL.md. Requires ANTHROPIC_API_KEY.

--batch
Polish every candidate above --min-score.
--min-score <n>
Score threshold for --batch. Default 0.
--limit <n>
Cap the number of candidates polished in --batch. Default 10.

operon publish <slug>

Publish a skill to your team (uploads as an operon; requires operon login).

--workspace <slug>
Override the default workspace from config.
--visibility <v>
private | team. Default team.
--api-base <url>
Override platform base URL.

operon list

List candidates and operons. (alias: `ls`)

--candidates
Show only candidates.
--operons
Show only operons.
--sort <key>
Sort key: score | recent | name.

operon show <slug>

Pretty-print a candidate skill or published operon.

--exemplars <N>
Show N exemplar sessions. Default 3.
--full
Show full prompt and tool details.

operon prune

Archive stale candidates (lastSeenAt older than --older-than).

--older-than <duration>
Staleness threshold (e.g. 30d, 60d, 90d). Default 60d.
--apply
Actually archive (default: dry-run).
--yes
Skip the confirmation prompt.

operon undo [slug]

Reverse the most recent destructive action.

--list
List recent undoable actions.
--id <undo-id>
Undo a specific action by id.

operon scan

advanced

Scan Claude Code, Codex, and Cursor sessions to surface recurring skills (as candidate operons).

--source <src...>
Limit to one or more sources.
--since <duration>
Only consider sessions newer than (e.g. 30d, 14d, 24h).
--top <N>
Render top N candidates. Default 10.
--no-redact
Skip secrets redaction (warns loudly; dev-only).
--anon-stats
Opt in to anonymous usage stats (one-time).
--peer <repo...>
Cross-reference candidates against peer repos' .claude/skills/.

operon suggest

advanced

Scan, rank, and optionally polish. Surface what's actually worth saving.

--source <src...>
Limit to one or more sources.
--since <duration>
Window to scan (e.g. 7d, 30d). Default 30d.
--top <N>
Show the top N suggestions. Default 5.
--polish
Also call Claude to draft a clean SKILL.md per suggestion (needs ANTHROPIC_API_KEY).
--min-uses <n>
Only suggest patterns with at least this many sessions. Default 2.
--submit
Submit mining telemetry to the Operon platform (requires operon login).
--workspace <slug>
Workspace slug for submitted telemetry.
--api-base <url>
Override platform base URL.

Install & use

operon install <workspace/slug>

Install a shared skill (operon) into Claude Code, Codex, and Cursor.

--workspace <slug>
Workspace slug for scriptable install form.
--semver <x.y.z>
Version to install; defaults to current.
--target <target>
all | claude | codex. Default all.
--force
Overwrite existing different local skill files.
--json
Machine-readable JSON output.
--api-base <url>
Override platform base URL.

operon update [slug]

Fetch the latest version of installed operons from your workspace.

--workspace <slug>
Override the default workspace.
--check
Show what would change without writing files.
--api-base <url>
Override platform base URL.

operon mcp

Launch the Operon MCP server over stdio.

Config

operon config get <key> | set <key> <value> | edit

Read / write ~/.operon/config.json.

get <key>
Read a config value by dot path.
set <key> <value>
Write a config value by dot path. Booleans true/false; JSON literal otherwise.
edit
Open ~/.operon/config.json in $EDITOR.

operon dashboard

Open your drafts dashboard in the browser to review, edit, polish, and publish mined candidates.

--workspace <slug>
Override the default workspace from config.
--print
Print the URL instead of opening a browser.
--api-base <url>
Override platform base URL.