Sign In

@attrove/cli

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@attrove/cli

CLI for Attrove — sign up, configure MCP servers, and manage credentials

Source
npmnpm
Version
0.1.7
Version published
Weekly downloads
9
-50%
Maintainers
1
Weekly downloads
 
Created
Source

@attrove/cli

The Attrove command-line interface for developers, local MCP clients, and agentic workflows.

It gives you:

  • A global Attrove login for the current machine
  • One-command MCP installation for Claude Desktop, Cursor, Claude Code, VS Code, and Windsurf
  • Optional .env export for project-local SDK work via env write
  • Machine-readable setup and health checks for agents and CI

Quick Start

npx @attrove/cli login
npx @attrove/cli install claude-code --scope project
npx @attrove/cli whoami

login opens a CLI-specific browser flow, completes sign-in, stores credentials globally, and can optionally wire up detected MCP clients.

Command Model

login

npx @attrove/cli login

Signs in through a browser flow that works for both new and existing users and stores the authenticated user globally.

If you are already logged in on this machine, login shows the active account and next steps instead of reopening the browser. Use --force to re-authenticate.

Use init only as a backwards-compatible alias:

npx @attrove/cli init

whoami

npx @attrove/cli whoami
npx @attrove/cli whoami --json

Shows:

  • Where credentials are coming from (global or local .env)
  • Which profile is active
  • Which MCP clients already have Attrove configured

install

npx @attrove/cli install claude-code --scope project
npx @attrove/cli install cursor --scope user
npx @attrove/cli install claude-desktop --scope user
npx @attrove/cli install claude-code --scope project --json

Writes remote OAuth MCP config for supported clients. Secrets are not embedded into the client config.

mcp install remains available as a backwards-compatible alias for the legacy detected-client flow.

connect

npx @attrove/cli connect --session <session-id>
npx @attrove/cli connect --session <session-id> --json
npx @attrove/cli connect gmail --token <pit_token> --user-id <user-id>

Starts the end-user OAuth handoff from a terminal or agent context. Prefer --session for partner-issued durable connect sessions. --json returns the activation URL and next action for agents.

mcp uninstall

npx @attrove/cli mcp uninstall
npx @attrove/cli mcp uninstall claude --json

Removes Attrove from supported MCP client configs.

env write

npx @attrove/cli env write
npx @attrove/cli env write ./apps/example --json

Writes ATTROVE_SECRET_KEY and ATTROVE_USER_ID to a project-local .env.

doctor

npx @attrove/cli doctor
npx @attrove/cli doctor --json

Checks:

  • CLI version (with update notification)
  • Credential availability
  • Authenticated API connectivity
  • Detected MCP client configuration

The command exits with status 1 if any check reports an issue.

logout

npx @attrove/cli logout
npx @attrove/cli logout --json

Removes:

  • Global Attrove credentials
  • The current project .env credentials, if present
  • Attrove MCP entries from detected clients

Agent / CI Flow

Create a browser-auth session:

npx @attrove/cli login --json

That prints a single JSON object:

{
  "type": "attrove_cli_setup_session",
  "version": 1,
  "status": "awaiting_browser_auth",
  "sessionId": "...",
  "pollToken": "...",
  "authorizeUrl": "...",
  "expiresAt": "...",
  "pollIntervalMs": 2000
}

After the user completes sign-in, resume the session:

npx @attrove/cli login --json --session-id <id> --poll-token <token>

To keep polling until completion:

npx @attrove/cli login --json --wait --session-id <id> --poll-token <token>

On success:

{
  "type": "attrove_cli_setup_status",
  "version": 1,
  "status": "complete",
  "sessionId": "...",
  "expiresAt": "...",
  "completedAt": "...",
  "secretKey": "sk_...",
  "userId": "...",
  "userEmail": "..."
}

Machine-readable follow-up commands:

npx @attrove/cli whoami --json
npx @attrove/cli mcp install --json
npx @attrove/cli env write --json
npx @attrove/cli doctor --json
npx @attrove/cli logout --json

Global Auth Store

The CLI stores credentials globally and treats that store as the source of truth. When available, the secret key is stored in the platform credential store:

  • macOS: Keychain
  • Linux: Secret Service via secret-tool
  • Windows: DPAPI-protected local secret file

If secure storage is unavailable, the CLI falls back to the metadata file below with restricted permissions.

Default config locations:

  • macOS: ~/Library/Application Support/Attrove/config.json
  • Linux: ~/.config/attrove/config.json
  • Windows: %APPDATA%/Attrove/config.json

Overrides:

  • ATTROVE_CONFIG_DIR
  • ATTROVE_PROFILE

Supported MCP Clients

ClientConfig Path
Claude Desktop~/Library/Application Support/Claude/claude_desktop_config.json
Cursor~/.cursor/mcp.json
Claude Code~/.claude.json
Windsurf~/.codeium/windsurf/mcp_config.json
VS Code~/Library/Application Support/Code/User/mcp.json

Paths shown are for macOS. The CLI resolves Windows and Linux paths automatically.

Environment Overrides

  • ATTROVE_API_ORIGIN or ATTROVE_BASE_URL
  • ATTROVE_DASHBOARD_ORIGIN
  • ATTROVE_CONFIG_DIR
  • ATTROVE_PROFILE

Notes

  • The CLI writes stdio MCP config for local clients.
  • The underlying MCP package is @attrove/mcp.
  • For hosted remote MCP, see Attrove MCP docs.

Keywords

attrove

FAQs

Package last updated on 15 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts