oc CLI
Install and use the first-party Open Connector command-line client.
oc is the first-party command-line client for Open Connector. It uses the native /api/v1 API through @open-connector/sdk, prints readable terminal output by default, and offers explicit, stable JSON through --json for agents and scripts.
Install
curl -fsSL https://github.com/okxiaoliang4/open-connector/releases/latest/download/install.sh | shThe installer downloads a runtime-free binary for macOS or Linux to ~/.local/bin. Windows users can download oc-windows-x64.exe from the GitHub Releases page.
Log in to an instance
Create a project-scoped API key in the SaaS console, then store the API base URL, key, and optional default entity ID:
printf '%s' "$OPEN_CONNECTOR_API_KEY" | oc login \
--url https://api.openconnector.dev \
--key - \
--entity user_123This writes ~/.config/oc/config.json. login stores an existing project key; it is not an OAuth login flow. For self-hosting, pass your own public server origin.
Discover, connect, and execute
# 1. Verify setup, then find or inspect an exact tool slug
oc doctor
oc search "create a github issue" --toolkit github
oc tools info GITHUB_ISSUES_CREATE SLACK_CHAT_POST_MESSAGE
oc execute GITHUB_ISSUES_CREATE --dry-run --data @issue.json
# 2. Search for a Toolkit and choose an available connection policy
oc link
# A name such as X returns a bounded, relevance-ranked server result
oc link X
# 3. Execute the reviewed input
oc execute GITHUB_ISSUES_CREATE \
--connected-account conn_... \
--data @issue.jsonFor API-key or Basic providers, supply the credential object instead of completing an OAuth redirect:
oc connected-accounts link telegram \
--auth-method telegram.api_key \
--credentials @credentials.jsonCommands
| Command | Purpose |
|---|---|
oc doctor | Check local config, authentication, and server reachability |
oc search <query...> | Rank native catalog matches for a natural-language task |
oc execute <slug> --dry-run / --data <input> | Preview or execute a known tool |
oc link [toolkit] | Guided Toolkit search and connected-account shortcut in a Human terminal |
oc toolkits list [--query] / info <slug> | Discover Toolkits and inspect metadata or exact auth method IDs |
oc tools list [toolkit] [--query] / info <slug...> [--allow-missing] | Filter tools; inspect one complete detail or batch up to 20 complete details in one request |
oc tools execute <slug> --data <input> | Execute a tool for an entity or connected account |
oc auth-configs create <toolkit> --auth-method <id> | Create a managed or bring-your-own auth config |
oc auth-configs list / info <id> | Find and inspect auth configs |
oc connected-accounts link [toolkit] | Search and connect through OAuth, API-key/Basic, or app-only authentication |
oc connected-accounts wait <id> [--timeout 5m] | Resume waiting for an existing pending connection |
oc connected-accounts list / info <id> / delete <id> --force | Manage connections; deletion requires explicit confirmation |
oc triggers list [toolkit] / info <slug> | Discover realtime Trigger Types and inspect one definition |
oc triggers status [filters] | Inspect Trigger Instances for the selected Project |
oc triggers create <slug> --connected-account <id> | Create or reconfigure a Trigger Instance |
oc triggers enable <id> / disable <id> --force | Enable or explicitly disable a Trigger Instance |
oc triggers delete <id> --dry-run / --force | Preview or delete a Trigger Instance and reconcile its upstream Source |
oc proxy <url> --connection <id> | Make a curl-like request with the connected account's credentials |
oc skills install <codex|claude> | Install the bundled oc-cli Skill for an agent |
oc setup [agent...] | Interactively select detected clients, or install into explicit hosts |
oc upgrade [--to <version>] | Upgrade the CLI and refresh recorded Skills and Agent Plugins |
Use oc <command> --help for every option. Global flags are --json and --entity <id>.
JSON input and output
--data and --credentials accept inline JSON, @path/to/file.json, or - for stdin:
oc tools execute TOOL_SLUG --data @input.json
cat input.json | oc tools execute TOOL_SLUG --data -
oc --json toolkits list | jq '.items[].slug'Human-readable output is the default. Toolkit and Tool lists show labeled tables, page context, --cursor continuation guidance, and a copyable batch-capable info command. Agents and shell scripts should pass --json explicitly whenever they parse, store, or pipe output. The primary result format does not change based on terminal detection; only transient fetch status on stderr is limited to an interactive TTY.
Primary results go to stdout; authorization URLs, warnings, and errors go to stderr. tools info accepts 1–20 slugs and always returns { tools, errors, summary }, with the complete detail at each tools[slug]. Partial failures return non-zero unless --allow-missing is explicit. An unhealthy doctor and failed commands return non-zero, with structured diagnostics available through --json. Read secrets with - from stdin or @file where supported. Preview tool writes with --dry-run, and preview connection deletion before confirming it with --force.
In a Human TTY, oc link searches Toolkits remotely with bounded results, reuses a single enabled Auth Config automatically, and prompts only when multiple connection policies or Auth Methods are available. It opens the hosted connection page unless --no-browser is passed. --json, --no-input, and non-TTY calls never prompt or open a browser. Use --timeout 5m to change the wait or --no-wait to return the pending connection immediately; after a timeout, resume with oc connected-accounts wait <id> instead of creating another link.
Agent skills
oc skills install codex
oc skills install claudeThe command installs the checked-in CLI instructions into the selected agent's
user-level skill directory, honors CODEX_HOME, and refuses to overwrite an
existing Skill unless passed --force.
Successful Skill installs are recorded with their exact paths in
~/.config/oc/installations.json. oc skills refresh updates every recorded
copy from the current binary, and oc upgrade automatically repeats that
refresh after replacing the binary.
Agent Plugins
The separate Open Connector Agent Plugin is a portable Agent Plugins v1 package with a Claude marketplace wrapper.
oc setup
oc setup codex claude --dry-run
oc setup codex claude hermes openclaw
oc setup --refreshWith no arguments, oc setup detects clients and opens a multi-select containing
only hosts that expose automatic installation. Manual-only detected hosts are
reported separately. Scripts and --json callers must pass explicit agent names;
the CLI never prompts without a TTY.
The supported matrix is Claude, Codex, Hermes, OpenClaw, VS Code, Cursor, Grok
Bot, Kiro, GitHub Copilot, and NanoClaw. The Agent Plugins specification defines
the package and discovery contract, but deliberately leaves installation to
each client. oc setup automates verified host CLIs and returns an official
setup link for clients without a local installation API; those manual cases
return a successful manual result with host-specific steps, but are not
recorded as completed installs.
Current boundary
The CLI covers toolkit, tool, and realtime Trigger discovery; auth configs; connected accounts; Trigger Instance control; execution; credential proxying; and a bundled agent Skill. oc search performs deterministic native catalog matching, not semantic search. A realtime Trigger listener/forwarder, outbound webhook-subscription management, and an inline JavaScript sandbox are not part of the current CLI surface.