cli

agent
Security Audit
Fail
Health Pass
  • License — License: MIT
  • Description — Repository has a description
  • Active repo — Last push 0 days ago
  • Community trust — 423 GitHub stars
Code Fail
  • os.homedir — User home directory access in .github/workflows/ci.yml
Permissions Pass
  • Permissions — No dangerous permissions requested

No AI report is available for this listing yet.

SUMMARY

Every app, from the terminal. A CLI built for agents to run actions, build flows, sync data and receive webhooks.

README.md

One CLI. Every app, from the terminal.

One CLI

Get started  ·  Docs  ·  Reference  ·  API directory  ·  Dashboard  ·  Changelog

npm version   platforms   verified tools   License MIT

The One CLI puts the apps you have connected on One at your agent's command line. One command finds the action a task needs and returns its real API documentation. The next one runs it. One holds the credentials and adds them on its side, which means your agent never sees an OAuth token or a platform API key.

It is built to be driven by an agent and works the same by hand. Add --agent and every command answers in JSON.

Quick start

With your agent

Install the One skill, then hand the rest to your agent.

npx skills add withoneai/cli -g

Then send your agent this message.

Use the One skill to set up the One CLI, then run "one onboard"

Your agent installs the CLI and opens your browser, where you sign in and choose what its key can reach. Then it runs one onboard, a three-step script written for an agent, which teaches it the commands and shows it which apps you have connected. Connect a first app with one add gmail, which you approve in your browser.

By hand

npx @withone/cli@latest init

one init signs you in through the browser, installs the One skill into the coding agents you pick and offers to connect your first app. To keep one on your path, install it globally.

npm install -g @withone/cli
one init

It needs Node.js 22.23.4+, 24.22.1+ or 26.12.1+. If the global install fails with a permissions error, run each command through npx @withone/cli@latest instead.

Then four commands take you from nothing to a sent email.

# Connect an app. Your browser opens, you approve, and it is connected
one add gmail

# See what you are connected to, and what this key may run on each app
one list

# Find the action for the job, with its documentation
one actions find gmail "send an email" --task "email a hello to a contact"

# Run it
one actions execute gmail <actionId> <connectionKey> \
  -d '{"to": "[email protected]", "subject": "Hello", "body": "Sent from my agent"}'

one list gives you the connection key that execute takes.

     Platform  Status       Connection Key                  Access
  ─  ────────  ───────────  ──────────────────────────────  ───────────
  ●  gmail     operational  live::gmail::default::abc123    Full access
  ●  slack     operational  live::slack::default::def456    Read only
  ●  shopify   operational  live::shopify::default::ghi789  Read & write

Once you are set up by hand, ask your agent to run one onboard and it learns the same way.

How it works

Your agent
    ↓
One CLI
    ↓
One API    checks the access, adds the credentials, records the call
    ↓
Gmail · Slack · Shopify · HubSpot · Stripe · every other platform

Every call to an app goes through One. One checks the call against what your key may do, adds the credentials for the connection, makes the request and records it. A connection key names a connection. It is not a credential.

Every task follows the same three steps, whatever the platform.

Step Command What it answers
1 one list What am I connected to, and what may I run there?
2 one actions find Which action does this, and how do I call it?
3 one actions execute Do it

Read the documentation find returns before you execute. It holds the required parameters and the platform's quirks.

What you can do

Run actions

Find the action for every step of a task in one call, across platforms, then run each one. --dry-run shows the request without sending it, --mock returns an example response, and --parallel runs several actions at once.

one actions find hubspot "find a contact by email" gmail "send an email" \
  --task "email a follow-up to a CRM contact"

one actions execute stripe <actionId> <connectionKey> --query-params '{"limit": "10"}'
one actions execute shopify <actionId> <connectionKey> --path-vars '{"order_id": "12345"}' --dry-run

See Connections and Actions in the reference.

Chain them into flows

A flow is a multi-step workflow written as JSON, saved under .one/flows/. Flows have conditions, loops, parallel steps, transforms, pagination, sub-flows, code and bash steps. A run can be dry-run, stopped after any step, paused, resumed and inspected step by step.

one flow scaffold loop | one flow create my-loop     # start from a template, then fill in its actions
one flow validate my-loop
one flow execute my-loop --dry-run                   # resolve every step without running it
one flow execute my-loop

See Flows in the reference, or run one guide flows for the full schema.

Sync app data into local memory

one sync pulls a platform's records into a local Postgres store that starts by itself on first use. Query, search and join them without another API call, keep them fresh on a schedule, and run a command when a record changes. one mem holds your agent's own notes in the same store.

one sync init stripe customers                       # a profile from the built-in
one sync run stripe                                  # pull the records into memory
one sync query stripe/customers --where 'address.city=SF'
one sync schedule add stripe --every 1h

one mem add note '{"content":"Design review is Thursday"}' --tags work
one mem search "design review"

See Memory and sync in the reference.

React to webhooks

one relay receives a platform's webhook events on One and forwards each one to another app's action, a URL or an agent, with no server of your own.

one relay platforms                                  # which platforms can send events
one relay event-types stripe
one relay create --connection-key <key> --create-webhook --event-filters '["customer.created"]'
one relay activate <id> --actions '<json>'           # forward each event to an action

The Relay page in the One dashboard. Each relay with its source app, its events, where it sends them and its status.

See Relay in the reference and the Relay docs.

Build One into your product

Connect is One's embeddable authentication. You add it to your product, and your users connect their own apps there. The CLI installs the Connect skill for your coding agent, creates the Connect app from a typed one.connect.ts, and can act for one of your users within what that user granted.

one skills add connect        # the One Connect skill, into this project
one connect types             # tool slugs and action names autocomplete in one.connect.ts
one connect create            # review and approve the app in the browser

See Connect in the reference.

Built for agents

  • JSON on request. Put --agent right after one, or set ONE_AGENT=1, for JSON on stdout with no colors, spinners or prompts. A failure prints {"error": "..."} and exits 1.
  • Writes wait for a yes. In agent mode an action that writes or deletes returns confirmation_required and sends nothing until the command carries --confirm-write. Flows need --allow-bash and --allow-code before a bash step or a code module runs.
  • A skill that stays current. one init installs the One skill for Claude Code, Claude Desktop and Codex, and for Cursor, Windsurf, Kiro, Goose, Amp, OpenCode and Roo when you pick them. npx skills add withoneai/cli -g installs it before the CLI is there. The CLI refreshes the skill whenever its own version changes.
  • A guide inside the binary. An agent with nothing but the binary can run one --agent guide and get the whole manual as JSON. The topics are overview, actions, flows, relay, cache, memory and sync.

The One MCP server gives an agent the same three steps as tools, over the same connections.

MCP tool CLI command
list_one_integrations one list
find_one_actions one actions find, and one actions load for more of a document
execute_one_action one actions execute

See Agents in the reference.

Access and security

Your agent never handles a platform credential. One stores the OAuth tokens and API keys for your connections and adds them on its side on each call.

You choose what the key can reach. one login opens a consent page in your browser. There you name the key and give it all your connections, specific ones at a level each, or Knowledge only, which reads API documentation and runs nothing. Change it later from Manage access in the One dashboard. One enforces the key's access on every call.

Setting what an API key can reach in the One dashboard, with the level menu open for one app. Full access, Read and write, Read only, Custom actions and No access.

You can narrow it further on your machine. one config sets a permission level of read, write or admin, an allowlist of connections, an allowlist of actions and a knowledge-only mode. These settings can only lower what the key was granted. A .onerc file in a project can only narrow them too, because it can arrive with a cloned repository.

Every call is on the record. One records each action with the agent that ran it, the app, the access it used and the result. A call outside the key's access is refused before it reaches the app, and the Logs page shows that too.

The Logs page in the One dashboard. Each call with its action, the agent that made it, the app, read or write, the status and the time. One call is marked as blocked.

The CLI sends usage analytics, which never include command arguments, inputs, connection data or secrets. ONE_NO_TELEMETRY=1 or DO_NOT_TRACK=1 turns them off. See Setup.

Commands

Command What it does
one init Sign in, install the One skill and connect a first app
one login, one logout Sign in through the browser, or clear local credentials
one whoami The user, organization, project, environment and key in use
one add <platform> Connect an app through OAuth
one list Your connections, their keys and your access on each
one connection delete <key> Remove a connection
one platforms Every platform you can connect
one actions find The action for each operation a task needs, with its documentation
one actions load More of an action's documentation
one actions execute Run an action on a connection
one cache The local cache of action documentation
one flow Create, validate, execute, resume and inspect multi-step workflows
one mem The local memory store of notes and synced records
one sync Sync a platform's records into memory, on demand or on a schedule
one relay Receive webhook events and forward them to actions
one connect Create and update a Connect app from one.connect.ts
one skills Optional skills for your coding agent
one config Access control, the active config and the installed skill
one guide, one onboard The built-in manual, and a three-step introduction for an agent
one update Update the CLI. It also updates itself in the background

one --help prints all of them, and one <command> --help prints a command's options. Every flag, default and output shape is in the reference.

Configuration

one init asks whether the setup is global or for one project. A global config lives in ~/.one/config.json. A project config lives under ~/.one/projects/, outside the repository, where a secret cannot land in git. In a project the CLI uses the project config when there is one and the global config otherwise. one config path shows which one is active.

An API key is either live or test, and one whoami shows which one you are using.

Variable What it does
ONE_SECRET The API key, in place of the one in the config
ONE_AGENT 1 turns on agent mode for every command
ONE_HOME Where the CLI keeps its state, in place of your home directory
ONE_CACHE_TTL How long action documentation is cached, in seconds. The default is one hour
ONE_NO_AUTO_UPDATE 1 stops the background update
ONE_NO_TELEMETRY 1 turns usage analytics off

See Setup and Configuration in the reference.

Development

git clone https://github.com/withoneai/cli.git
cd cli
npm install        # also builds
npm run dev        # watch mode
npm run typecheck
npm test

Support and license

Email [email protected] or open an issue. The CLI is released under the MIT license.

Reviews (0)

No results found