Skip to main content

Documentation Index

Fetch the complete documentation index at: https://onecli.sh/docs/llms.txt

Use this file to discover all available pages before exploring further.

The OneCLI plugin gives Claude Code transparent access to external APIs through the OneCLI gateway. Every session automatically configures HTTPS_PROXY so all outbound requests (curl, gh, language HTTP clients) route through the gateway, which injects stored credentials at the proxy boundary. No onecli CLI installation required. The plugin talks directly to OneCLI Cloud.
If you prefer the CLI wrapper approach, see Coding Agents for onecli run -- claude.

Getting started

Prerequisites

  • Claude Code (terminal or desktop app)
  • An OneCLI account with at least one connected service

Installation

Install from the Claude Code Directory:
  1. Open Claude Code
  2. Go to Customize > Directory > Plugins
  3. Search for OneCLI
  4. Click Install

Setup

After installation, run the setup command in Claude Code:
/onecli-setup
This will prompt you to:
  1. Open app.onecli.sh/projects
  2. Select your project (or create one)
  3. Copy your API Key from the Overview page (starts with oc_)
  4. Paste it when prompted
Start a new session. The gateway activates automatically on every future session.
If you already use the onecli CLI, the plugin automatically reuses your existing credentials from ~/.onecli/credentials/api-key. No setup needed.

What the plugin provides

ComponentDescription
Session-start hookAuto-configures HTTPS_PROXY and CA certificates on every session
Gateway skillTeaches Claude how to make API requests through the proxy and handle errors
Providers referenceLists all 40+ supported services with endpoints and auth patterns
Integration architectSpecialist agent for designing multi-service API workflows
2 slash commands/onecli-setup and /onecli-status

How it works

On every session start, the plugin:
  1. Reads your API key from ~/.onecli/credentials/api-key (or other configured locations)
  2. Calls OneCLI Cloud to get the gateway proxy configuration
  3. Writes a CA certificate bundle to ~/.onecli/ca-bundle.pem
  4. Exports HTTPS_PROXY and CA trust environment variables into the session
  5. Injects gateway instructions into the conversation context
All HTTP clients honor HTTPS_PROXY automatically. When Claude runs curl, gh, aws, or any tool that makes HTTPS requests, the traffic routes through gateway.onecli.sh, which injects the right credentials.

Connecting services

When Claude makes a request to a service that isn’t connected, the gateway returns an error with a connect_url. Claude shows you the link. Click it, authorize the service in your browser, and Claude retries automatically. You can also connect services from your OneCLI dashboard.

Slash commands

CommandPurpose
/onecli-setupConfigure your API key and verify gateway connectivity
/onecli-statusShow gateway status and list connected services

Supported services

The gateway supports 40+ services including:
CategoryServices
GoogleGmail, Calendar, Drive, Docs, Sheets, Slides, Tasks, Forms, Meet, Photos, Admin, Analytics, Search Console, Classroom, YouTube
GitHubREST API, Git HTTPS, Raw content, GraphQL API
AtlassianJira, Confluence
AWSAll services (SigV4 signing), AssumeRole
MicrosoftOutlook Mail, Outlook Calendar, Microsoft Word
OtherStripe, Datadog, Notion, Cloudflare, Todoist, Resend, Vertex AI
CustomAny API via custom secrets in the dashboard
For the full list with endpoints, see App Connections.

Plugin vs onecli run

Both approaches give Claude Code gateway access. Choose based on your preference:
Pluginonecli run
InstallOne-click from DirectoryInstall onecli CLI
Session startAutomatic (hook)Manual (onecli run -- claude)
Requires CLINoYes
Works withClaude Code onlyClaude Code, Cursor, Codex, Hermes, OpenCode
Cloud gatewayYes (gateway.onecli.sh)Yes (cloud or local)

Troubleshooting

Gateway not active after setup

The plugin configures the proxy at session start. After running /onecli-setup, you need to start a new session for the gateway to activate.

Requests not going through the proxy

Check that the proxy environment variables are exported:
env | grep -i proxy
If HTTPS_PROXY is not set, the session-start hook may have failed. Run /onecli-status to diagnose.

Service returns 401/403

The service may not be connected. Check the error response for a connect_url and open it in your browser to authorize. After connecting, retry the request.

Policy blocking a request

If you see a blocked_by_policy error, a policy rule in your OneCLI dashboard is blocking the request. Check Rules in the sidebar to review and adjust.

Source code

The plugin is open source: github.com/onecli/onecli-plugin