onecli CLI lets you manage your OneCLI instance from the terminal. Create agents, add secrets, configure access, all with JSON output that AI agents can parse and act on.
GitHub: github.com/onecli/onecli-cli
Why a CLI for managing OneCLI?
The dashboard is great for humans. But when an AI agent needs to set up its own environment (create its identity, register the secrets it needs, check its current access), it shouldn’t need a human clicking through a UI. Theonecli CLI gives agents (and the frameworks that orchestrate them) a programmatic interface to manage the OneCLI server. An agent orchestrator can spin up a new agent, assign it credentials for specific services, and configure rules, all in a single script, no browser required.
This is especially useful for:
- Agent bootstrapping, where an orchestrator creates an agent identity and assigns secrets before the agent starts working
- Dynamic provisioning: spin up short-lived agents with scoped access for specific tasks, then clean up after
- CI/CD pipelines that automate agent and secret management as part of your deployment
- Self-healing agents that detect a missing credential, check their own status, and request what they need
Install
Quick start
Commands
Agents
Manage agent identities and their access to secrets.Secrets
Manage credentials stored in the vault.Rules
Manage policy rules that control what agents can access. See the Rules guide for details on how rules work.| Flag | Description |
|---|---|
--name | Display name for the rule |
--host-pattern | Host to match (e.g. api.anthropic.com) |
--path-pattern | URL path to match (e.g. /v1/*) |
--method | HTTP method: GET, POST, PUT, PATCH, DELETE |
--action | block or rate_limit |
--agent-id | Scope to a specific agent (omit for all agents) |
--rate-limit | Max requests per window (required for rate_limit) |
--rate-limit-window | Time window: minute, hour, or day |
--enabled | Enable or disable the rule (default: true) |
--json | Raw JSON payload (overrides individual flags) |
--dry-run | Validate without executing |
Auth
Authenticate with the OneCLI server.Config
Read and write configuration values.Output
All output is JSON. Use--fields to select specific fields, or --quiet to extract a single value:
jq or string manipulation.
Environment variables
| Variable | Description |
|---|---|
ONECLI_API_KEY | API key (overrides stored key) |
ONECLI_API_HOST | API base URL (default: https://app.onecli.sh) |
ONECLI_ENV | dev or production |