Skip to content
1Claw Academy
Curriculum/Foundations2 minBeginner · Lesson 4 of 13

Install the CLI

Install @1claw/cli, log in with the browser device flow, and confirm access with whoami and vault list.

The CLI is the fastest way to work with 1Claw from a terminal. Install it, log in, and you'll have a working authenticated session in under a minute.

Concept

Prerequisite: Node 20+ if you install via npm. Homebrew works on macOS and Linux and needs nothing else.

Tip

What 1claw setup does under the hood: it calls POST /v1/onboarding/provision, which creates the welcome bundle (a default vault, examples/hello, an MCP agent, and a ** read/write policy) and returns a one-time ocv_ agent key plus a ready-to-paste mcp_stdio_config. Track progress any time with GET /v1/org/onboarding/status. The manual steps below are the same thing, done by hand.

  1. 1

    Fastest path: one command. 1claw setup provisions a default vault, an examples/hello secret, an MCP agent, and a read/write policy, then writes MCP config for Cursor, Claude Desktop, and VS Code. Run it and skip to the last step.

    bash
    npx @1claw/cli setup
  2. 2

    Install the CLI with npm (needs Node 20+) or Homebrew.

    bash
    npm install -g @1claw/cli
    # or
    brew install 1clawAI/tap/oneclaw
  3. 3

    Log in. This opens your browser to 1claw.co, you approve, and the CLI polls until you confirm. No password typed in the terminal.

    bash
    1claw login
  4. 4

    Confirm who you're logged in as.

    bash
    1claw whoami
  5. 5

    List your vaults to prove the session reaches the API.

    bash
    1claw vault list
Concept

If you already exported ONECLAW_API_KEY in Lesson 1, you can skip browser login and use that key instead (see the CI tip below).

Tip

For CI or any non-interactive shell, skip login and set env vars instead: export ONECLAW_TOKEN="your-jwt" or export ONECLAW_API_KEY="1ck_..." (add ONECLAW_VAULT_ID for vault-scoped commands).

The CLI is installed and authenticated. 1claw whoami and 1claw vault list both work, so you're ready to create vaults and secrets from the terminal.

Check your understanding

3 questions
1

What Node version does the npm install of the CLI require?

2

What does 1claw login use so you never type a password in the terminal?

3

Which env var lets the CLI run non-interactively with a personal API key in CI?