OneCLI authentication
Log in
Interactive (opens browser):Check auth status
Log out
Plugin authentication
For plugins that support local auth, you can authenticate directly with the service:How credential resolution works
When you run a plugin command likeoc google calendar list-events, oc resolves credentials in this order:
1
Check for stored token
oc looks for a stored token (from
oc auth login). If found, it requests plugin credentials from your OneCLI instance.2
Fall back to local credentials
If no token exists, oc checks for locally stored credentials (from
oc <plugin> auth).3
Return an error with guidance
If neither source has credentials, oc returns exit code
2 with an action hint:Credential storage and security
Credentials are stored using your OS keychain by default:
If the keychain is unavailable, oc falls back to file-based storage at
~/.onecli/credentials/ with 0600 permissions (owner read/write only).
What’s stored where:
Credential injection
When oc runs a plugin command, credentials are injected as environment variables. The plugin never reads credentials from files. It receives them from the parent process environment:OC_{PLUGINNAME}_{FIELD}, with the plugin name and field uppercased.