---
name: agentcash-cli
description: Authenticate and inspect AgentCash terminal sessions with the scoped @agentcash/cli package. Use when a user asks to install or run the AgentCash CLI, sign a terminal into AgentCash, check the CLI identity, troubleshoot device login, or sign the CLI out. Route wallet balances, paid APIs, remote MCP setup, and legacy AgentCash 1 migration to their dedicated AgentCash workflows instead.
---

# AgentCash CLI

Use the scoped `@agentcash/cli` package for terminal authentication. Prefer
`npx` so it cannot be confused with the legacy unscoped `agentcash` package.

## Keep the Surfaces Separate

- Treat CLI login and remote MCP OAuth as separate sessions.
- Never configure `@agentcash/cli` as an MCP server.
- Use the main AgentCash skill and `https://mcp.agentcash.dev` for wallet
  balances, accounts, deposits, paid APIs, service discovery, and transfers.
- Use the migration skill at
  `https://app.agentcash.dev/migrate/skill.md` for `agentcash@0.17.0`, the
  unscoped `agentcash` binary, AC1 wallet files, or AC1 funds.

## Authenticate

Require Node.js 20 or newer. No global installation is needed:

```bash
npx @agentcash/cli login
npx @agentcash/cli whoami
```

The login command opens the browser device flow for
`https://app.agentcash.dev`. Follow the displayed URL and code, then wait for
the CLI to confirm the signed-in email. Run `whoami` to verify the stored
session.

Use `login --url URL` or `AGENTCASH_WEB_URL` only when the user explicitly
selects another AgentCash deployment, such as a local development instance.
Allow HTTPS origins and localhost HTTP only.

If the user explicitly wants a persistent global install, use:

```bash
npm install --global @agentcash/cli
agentcash-cli login
```

Never install or invoke unscoped `agentcash` for this workflow.

## Protect the Session

- Never read, print, upload, or edit the CLI auth file or its access token.
- Do not sign out, replace a valid session, or change its server unless the
  user asks.
- Sign out only with `npx @agentcash/cli logout`.
- If `whoami` reports an expired or invalid session, run `login` again. Do not
  delete configuration files manually.

Use `npx @agentcash/cli --help` for the current command surface. The canonical
copy of this skill is `https://app.agentcash.dev/cli/skill.md`.
