@adrive/cli
v1.0.0
Published
AgentDrive CLI — cross-agent artifact workspace with provenance and portable storage across Claude Code, Codex, Cursor, and LangGraph.
Maintainers
Readme
@adrive/cli
The adrive binary — a thin CLI for AgentDrive, the cross-agent artifact workspace with provenance and portable storage across Claude Code, Codex, Cursor, and LangGraph.
Install
npm i -g @adrive/cli
adrive initOr use the one-line installer:
curl -fsSL agentdrive.sh/install | shadrive init opens a browser to log you in (no localhost server, polling-style), then auto-detects installed agent tools (Claude Code, Cursor, Codex CLI, Cline, Continue, Zed) and wires the AgentDrive MCP server into each.
Configuration
Stored at $XDG_CONFIG_HOME/agentdrive/config.json, falling back to ~/.config/agentdrive/config.json. The file is chmod 600. Schema:
{
"api_url": "https://app.agentdrive.sh",
"api_key": "agentdrive_live_...",
"agent_id": "ag_...",
"org_id": "org_...",
"agent_platform": "cli",
"default_workspace": "ws_..."
}Commands
| Command | Purpose |
|---|---|
| adrive init | First-run wizard: log in + wire MCP into every installed agent tool |
| adrive auth login | Open browser, log in, store API key |
| adrive auth logout | Wipe local credentials |
| adrive auth status | Show whether you're logged in + masked key |
| adrive whoami | Print principal info from the API |
| adrive ls | List workspaces |
| adrive push <file> [--workspace ws] [--remote-path p] | Upload a local file |
| adrive pull <ws-id>/<path> [-o out] | Download a file (stdout by default) |
| adrive search <query> [--top-k N] [--platform claude-code] [--workspace ws] | Semantic search across artifacts |
| adrive context <task> [--limit N] [--workspace ws] | Auto-pull artifacts relevant to a task |
| adrive run-log <task> [--status success|failure|partial] [--ref f] [--produced f] | Log an agent run |
| adrive billing | Open the Stripe billing portal in your browser |
| adrive plan | Show current plan, usage, and quotas |
-v / --version and --help work at every level.
Authentication
adrive uses Cursor-style polling auth — no localhost server:
adrive auth logincallsPOST /v1/auth/cli/startto get a short-lived auth URL.- The CLI opens the URL in your default browser. You complete the login in the dashboard (Google, GitHub, or email magic link).
- The CLI polls
GET /v1/auth/cli/poll?id=<id>every 1.5s for up to 10 minutes. - On success, the returned
api_keyis stored at chmod 600.
If the browser does not auto-launch (e.g. headless server, SSH session), the URL is printed prominently so you can open it manually.
Auto-detect + wire
adrive init looks for these config files and merges the AgentDrive MCP server entry in (preserving any servers you already have):
| Tool | Config path |
|---|---|
| Claude Code | ~/.claude/mcp-servers.json |
| Claude Desktop | ~/Library/Application Support/Claude/claude_desktop_config.json (macOS), %APPDATA%/Claude/claude_desktop_config.json (Windows), ~/.config/Claude/claude_desktop_config.json (Linux) |
| Codex CLI | ~/.codex/config.toml |
| Cursor | ~/.cursor/mcp.json |
| Cline | ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json (or the Linux equivalent) |
| Continue | ~/.continue/config.json |
| Zed | ~/.config/zed/settings.json |
Existing entries are merged, not overwritten. An existing agentdrive entry is replaced in place.
License
Apache-2.0. See the repo's LICENSING.md for the full package-by-package breakdown.
