npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@attrove/cli

v0.1.9

Published

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

Readme

@attrove/cli

The Attrove command-line interface for hosted MCP installs, CLI auth, and advanced local fallback workflows.

It gives you:

  • Hosted MCP install commands for Claude Code, Cursor, and Claude Desktop
  • A global Attrove login for SDK, agent, CI, and local stdio fallback flows
  • Optional .env export for project-local SDK work via env write
  • Machine-readable setup and health checks for agents and CI

Quick Start

Hosted MCP (recommended)

npx @attrove/cli install claude-code

That writes a hosted MCP config pointing at https://api.attrove.com/mcp. Open Claude Code, Cursor, or Claude Desktop and complete OAuth on first use. No sk_ secret is embedded into the client config.

Other supported hosted installs:

npx @attrove/cli install cursor
npx @attrove/cli install claude-desktop

Defaults:

  • claude-code installs to project scope (.mcp.json)
  • cursor installs to user scope
  • claude-desktop installs to user scope

--scope project is only valid for claude-code; other clients reject it with a clear error.

Advanced Local Fallback

npx @attrove/cli login
npx @attrove/cli local install claude-code
npx @attrove/cli whoami

Use this only if you intentionally want the local stdio server. It reuses globally stored CLI credentials or falls back to embedded ATTROVE_* env config.

Command Model

install

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

Writes hosted remote MCP config for supported clients. This is the default onboarding path.

local install / local uninstall

npx @attrove/cli local install [client|--all]
npx @attrove/cli local uninstall [client|--all]
npx @attrove/cli local install claude-code --json

Configures or removes the advanced local stdio fallback for supported clients. login is required before local install.

login

npx @attrove/cli login
npx @attrove/cli login --force

Signs in through a browser flow and stores the authenticated user globally. This is primarily for SDK, agent, CI, and advanced local MCP workflows.

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

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.

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
  • 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

Legacy mcp

npx @attrove/cli mcp install

The legacy mcp command now fails fast with migration guidance:

  • Use install <client> for hosted MCP
  • Use local install or local uninstall for the advanced stdio fallback

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 install claude-code --json
npx @attrove/cli local install claude-code --json
npx @attrove/cli whoami --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 Clients

Hosted install targets:

  • Claude Code
  • Cursor
  • Claude Desktop

Advanced local fallback targets:

  • Claude Code
  • Cursor
  • Claude Desktop
  • Windsurf
  • VS Code

Environment Overrides

  • ATTROVE_API_ORIGIN or ATTROVE_BASE_URL
  • ATTROVE_DASHBOARD_ORIGIN
  • ATTROVE_CONFIG_DIR
  • ATTROVE_PROFILE

Notes

  • Hosted remote MCP is the default path.
  • The local stdio server is an advanced fallback.
  • The underlying stdio MCP package is @attrove/mcp.
  • For hosted remote MCP details, see Attrove MCP docs.