@agentpowers/cli
v0.6.6
Published
CLI for the AgentPowers marketplace — search, install, and manage Claude Code skills.
Downloads
2,169
Readme
@agentpowers/cli
CLI for the AgentPowers marketplace — search, install, publish, and manage Claude Code skills and agents from your terminal.
Status: Production. 184 tests passing. Cross-compatible with the Python ap CLI (same auth file format, same install layout).
Quick Start
No install required. Run directly with npx:
npx @agentpowers/cli setup # auto-configure MCP for all your AI tools
npx @agentpowers/cli search "code review"
npx @agentpowers/cli install my-skillOr install globally:
npm install -g @agentpowers/cli
agentpowers search "code review"Commands
The CLI ships 17 commands grouped by purpose.
Auth
| Command | Description |
|---|---|
| login | Authenticate via your browser (Clerk OAuth). Stores token at ~/.agentpowers/auth.json. |
| logout | Revoke server-side token and remove local credentials. |
| whoami | Show currently authenticated user. |
Discovery
| Command | Description |
|---|---|
| search <query> [--limit N] | Search the marketplace by keyword. |
| detail <slug> [--source <s>] | Show full details for a skill (or external skill via --source clawhub). |
Install lifecycle
| Command | Description |
|---|---|
| install <slug> | Install a skill. Auto-detects: if cwd contains .claude/, installs to <cwd>/.claude/skills/<slug>/ (project-local); otherwise installs to ~/.claude/skills/<slug>/ (global). Matches Python ap CLI behavior. |
| install <slug> --for <tool> | Install for a specific AI tool: claude-code (default), codex, gemini, kiro. |
| install <slug> --code <license> | Apply a license code (for paid skills you've purchased). |
| install <slug> --global | Force install to the global config dir (~/.claude/skills/), bypassing project-local auto-detection. |
| update [<slug>] | Update one skill or check all installed skills for updates. |
| uninstall <slug> [--force] | Remove an installed skill. |
| verify | Check installed skills against their content-hash pins. |
| prune [--dry-run] | Remove stale pins for skills no longer present on disk. |
| status | List installed skills and agents with metadata. |
| scan <slug> | Run a security scan on an external (e.g. ClawHub) skill before install. |
Setup
| Command | Description |
|---|---|
| setup | Auto-detect installed AI clients (Claude Code, Codex, Gemini, Kiro, Claude Desktop) and add the AgentPowers MCP server to each .mcp.json. Idempotent: re-running on a configured platform reports "Already configured" without modifying anything. |
Publish lifecycle (sellers)
| Command | Description |
|---|---|
| publish [--price N] [--bump patch\|minor\|major] | Publish a skill from the current directory (or --dir <path>). |
| unpublish <slug> [--yes] | Soft-archive from marketplace discovery; existing buyers keep access. --yes skips the confirmation prompt for scripts. |
| republish <slug> [--yes] | Restore an archived skill. |
| profile [--set] | View or interactively edit your seller profile. |
Auto-detection (setup)
npx @agentpowers/cli setup writes the AgentPowers MCP server entry to every detected client. It merges with existing MCP entries — your existing servers are preserved.
Supported clients:
| Client | Config file (macOS) |
|---|---|
| Claude Code | ~/.claude/.mcp.json |
| Codex | ~/.codex/.mcp.json |
| Gemini CLI | ~/.gemini/.mcp.json |
| Kiro | ~/.kiro/.mcp.json |
| Claude Desktop | ~/Library/Application Support/Claude/claude_desktop_config.json |
Linux and Windows paths are auto-detected. Clients that don't exist are skipped silently.
Cross-tool installs
# Install one skill into multiple AI tools at once is not supported in a single
# command — but you can target each tool individually:
npx @agentpowers/cli install code-reviewer --for claude-code
npx @agentpowers/cli install code-reviewer --for codex
npx @agentpowers/cli install code-reviewer --for geminiAuth file compatibility
The CLI shares its auth file (~/.agentpowers/auth.json) with:
- The Python
apCLI (pip install agentpowers) - The AgentPowers MCP server (used by Claude Code plugin)
- The standalone curl/bash skill
Login once and every surface picks it up.
Configuration
| Environment Variable | Description | Default |
|---|---|---|
| AGENTPOWERS_API_URL | API base URL | https://api.agentpowers.ai |
| AP_API_BASE | Alternate API base URL (legacy alias) | (unset) |
The Python
apCLI also readsAGENTPOWERS_SITE_URLandCLERK_FRONTEND_URL, but the NPX CLI does not — those are consumed by the Python CLI's auth callback handler.
Requirements
- Node.js >= 18
Development
git clone https://github.com/AgentPowers-AI/agentpowers-app.git
cd agentpowers-app/agentpowers-npx
npm install
npm test # vitest — 184 tests
npm run build # tsc → dist/This package depends on @agentpowers/core for the API client, installer, and types. Both packages are published from this monorepo.
Related
@agentpowers/mcp-server— MCP server (12 tools) for Claude Code/Coworkagentpowers— Python CLI (full parity minussetupandprune)- Mintlify docs — guides, API reference, getting started
License
MIT
