Discovery
Plugins are executable binaries stored in~/.onecli/plugins/ with the naming convention oc-{name}. When you run oc google calendar list-events, oc looks for a binary at ~/.onecli/plugins/oc-google.
The plugin directory can be overridden with ONECLI_PLUGIN_DIR.
Manifest
Every plugin must respond to themanifest subcommand with a JSON object describing its capabilities:
Manifest fields
Auth interface
Plugins that require authentication must respond to theauth subcommand. The auth flow uses newline-delimited JSON (NDJSON) on stdout:
status is "ok" and credentials.access_token is non-empty.
Auth response fields
Command execution
When oc runs a plugin command, it:- Resolves credentials from the vault or local storage
- Injects credentials as environment variables into the plugin’s process
- Executes the plugin binary as a subprocess with the remaining arguments
- Passes stdin/stdout/stderr directly between the caller and the plugin
Environment variable injection
Credentials are passed as environment variables with the naming conventionOC_{PLUGINNAME}_{FIELD}:
The plugin name is uppercased. All four fields are set if available.
Execution model
Meta-commands
Two subcommands are special and run without credentials:manifestreturns the plugin’s manifest JSONauthruns the plugin’s authentication flow
Archive format
Plugin releases follow the goreleaser naming convention:oc-google_1.0.1_darwin_arm64.tar.gz
Each release must include a checksums.txt file with SHA256 hashes: