{"_id":"@402md/cli","_rev":"7-9b0e835a79b8f48ef8077dc7a260f1df","name":"@402md/cli","dist-tags":{"latest":"0.1.7"},"versions":{"0.1.1":{"name":"@402md/cli","version":"0.1.1","keywords":["402md","cli","skills","ai","agent","mcp","claude"],"license":"MIT","_id":"@402md/cli@0.1.1","maintainers":[{"name":"henriquebreim","email":"developers@402.md"}],"bin":{"402md":"dist/index.js"},"dist":{"shasum":"4d1b37061f33579467cdeca3c0dc58452cfa1ae5","tarball":"https://registry.npmjs.org/@402md/cli/-/cli-0.1.1.tgz","fileCount":4,"integrity":"sha512-Mr9X9ElWjmq99N1kB0GQkt2SyexWkXDqRVdczbF2etykGCBBUhgLNxfExC5VY9nT4FlPwLuNC0wngdjmUUxoHQ==","signatures":[{"sig":"MEUCIQCDPeqnp7JH1y+FQ22Q3qIIYWqLdLR9sym7Le6Jcy8jiAIgCcZQCHxazLqh3MdWaTy8MitPE0VaFMQ+PB9dfvUK/Tg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":79772},"main":"./dist/index.js","engines":{"node":">=18"},"gitHead":"f060f6a9fcb5befc9b54d4b9026d7d1f1106f8bc","scripts":{"dev":"tsup --watch","build":"tsup","clean":"rm -rf dist"},"_npmUser":{"name":"henriquebreim","email":"developers@402.md"},"_npmVersion":"11.2.0","description":"CLI to install and manage 402.md skills for AI agents","directories":{},"_nodeVersion":"22.13.1","dependencies":{"ora":"^5.4.1","yaml":"^2.4.0","commander":"^12.0.0","picocolors":"^1.0.0","@clack/prompts":"^1.0.1"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5.7.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/cli_0.1.1_1772370213833_0.6822629466768069","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@402md/cli","version":"0.1.2","keywords":["402md","cli","skills","ai","agent","mcp","claude"],"license":"MIT","_id":"@402md/cli@0.1.2","maintainers":[{"name":"henriquebreim","email":"developers@402.md"}],"bin":{"402md":"dist/index.js"},"dist":{"shasum":"7f0f4d2cc2f54e2ee6c84a8685e40be754076407","tarball":"https://registry.npmjs.org/@402md/cli/-/cli-0.1.2.tgz","fileCount":4,"integrity":"sha512-kaF0nwse74Tsq9gtxmIaCpshg1MKm740SCBqQlZqr4q/bYbHpLXGoOYSXO4byqYQJXA2BWlYki9D1sVwhls9nQ==","signatures":[{"sig":"MEYCIQCS9WT3t0WLut6qaZsEtp7iZrVDN7LsOFlkgsDk/VQqdAIhAIJ0eYZcfilUqp76XZMaRpQs5TNkTFMJCqwaJR6nC5LI","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":75356},"main":"./dist/index.js","engines":{"node":">=18"},"gitHead":"301ace2e0cdd905adec505142ed0ee9e2d7873ce","scripts":{"dev":"tsup --watch","build":"tsup","clean":"rm -rf dist"},"_npmUser":{"name":"henriquebreim","email":"developers@402.md"},"_npmVersion":"11.2.0","description":"CLI to install and manage 402.md skills for AI agents","directories":{},"_nodeVersion":"22.13.1","dependencies":{"ora":"^5.4.1","yaml":"^2.4.0","commander":"^12.0.0","picocolors":"^1.0.0","@clack/prompts":"^1.0.1"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5.7.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/cli_0.1.2_1772371289155_0.9775237824175136","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@402md/cli","version":"0.1.3","keywords":["402md","cli","skills","ai","agent","mcp","claude"],"license":"MIT","_id":"@402md/cli@0.1.3","maintainers":[{"name":"henriquebreim","email":"developers@402.md"}],"bin":{"402md":"dist/cli.js"},"dist":{"shasum":"9f74e14f4c3d60304ab0d8a9874440a93f188e77","tarball":"https://registry.npmjs.org/@402md/cli/-/cli-0.1.3.tgz","fileCount":18,"integrity":"sha512-VR/0/gTMOuAPTd7j4fq4FtqgxSb4jGa86P0iiUft4XHQtz1yIi8dswj19f960w2nd19v8ueyFVRYfjwQyah8sg==","signatures":[{"sig":"MEQCIG4nM8Ai99p4D7HkVAp86uoV/wZzRYclNE27EyqZsBXOAiAzfOxJOw1FtptXro7H7p9xQZ0AlT2B6XRqqK6vK6RgzA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":265357},"main":"./dist/lib/exports.js","types":"./dist/lib/exports.d.ts","engines":{"node":">=18"},"exports":{".":{"types":"./dist/lib/exports.d.ts","import":"./dist/lib/exports.mjs","require":"./dist/lib/exports.js"},"./pay":{"types":"./dist/lib/pay.d.ts","import":"./dist/lib/pay.mjs","require":"./dist/lib/pay.js"}},"gitHead":"ac41e6f6d8bbd709b310cf569b0dbef27286bb97","scripts":{"dev":"tsup --watch","build":"tsup","clean":"rm -rf dist"},"_npmUser":{"name":"henriquebreim","email":"developers@402.md"},"_npmVersion":"11.2.0","description":"CLI to install and manage 402.md skills for AI agents","directories":{},"_nodeVersion":"22.13.1","dependencies":{"ora":"^5.4.1","viem":"^2.0.0","yaml":"^2.4.0","commander":"^12.0.0","picocolors":"^1.0.0","@clack/prompts":"^1.0.1"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5.7.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/cli_0.1.3_1772413575492_0.23104886621492815","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@402md/cli","version":"0.1.4","keywords":["402md","cli","skills","ai","agent","mcp","claude"],"license":"MIT","_id":"@402md/cli@0.1.4","maintainers":[{"name":"henriquebreim","email":"developers@402.md"}],"bin":{"402md":"dist/cli.js"},"dist":{"shasum":"4f437937958292f5a15f43a1136c7a1452dcde73","tarball":"https://registry.npmjs.org/@402md/cli/-/cli-0.1.4.tgz","fileCount":18,"integrity":"sha512-2XM0hkAa4VP27ZNWp5lYgNPCDq7BULXxC9LeP5P+40AmFsLrJxtZubmclIetY4eJM9rq45bpuoVTMoblxMDaJw==","signatures":[{"sig":"MEUCIQDgRoOhLDwnZVxp+pg2o7QCkRJ7q6TijwNWNBj0Sbl/FQIgU0ntvSbj5nKMN6VKlIMj6xP/zoJhhO+3XpmOGmGV+nE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":265357},"main":"./dist/lib/exports.js","types":"./dist/lib/exports.d.ts","engines":{"node":">=18"},"exports":{".":{"types":"./dist/lib/exports.d.ts","import":"./dist/lib/exports.mjs","require":"./dist/lib/exports.js"},"./pay":{"types":"./dist/lib/pay.d.ts","import":"./dist/lib/pay.mjs","require":"./dist/lib/pay.js"}},"gitHead":"b5394af2f08568a335b18efb91464b439a7e3319","scripts":{"dev":"tsup --watch","build":"tsup","clean":"rm -rf dist"},"_npmUser":{"name":"henriquebreim","email":"developers@402.md"},"_npmVersion":"11.2.0","description":"CLI to install and manage 402.md skills for AI agents","directories":{},"_nodeVersion":"22.13.1","dependencies":{"ora":"^5.4.1","viem":"^2.0.0","yaml":"^2.4.0","commander":"^12.0.0","picocolors":"^1.0.0","@clack/prompts":"^1.0.1"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5.7.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/cli_0.1.4_1772763726625_0.6310662663857316","host":"s3://npm-registry-packages-npm-production"}},"0.1.5":{"name":"@402md/cli","version":"0.1.5","keywords":["402md","cli","skills","ai","agent","mcp","claude"],"license":"MIT","_id":"@402md/cli@0.1.5","maintainers":[{"name":"henriquebreim","email":"developers@402.md"}],"bin":{"402md":"dist/cli.js"},"dist":{"shasum":"9ade306287856f9ecd6a272e5f42e2e7aed71ce5","tarball":"https://registry.npmjs.org/@402md/cli/-/cli-0.1.5.tgz","fileCount":18,"integrity":"sha512-hAr756jhB/Sp3ji0Tvl8TMd9ev2+qr0lneqygqtIuTcyfJMfvo7IqdZ4iuUVWhbkFEamXrvCQcHxWtQxG5dq2g==","signatures":[{"sig":"MEYCIQCR1bSBUj66Xz6iGy8+IR4BrjIf8EwIhujgwM0rziDSGgIhALppSqzzrRlS6gWBO0ZSYmUPJjxSMme0eo6mhF2+L24N","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":267657},"main":"./dist/lib/exports.js","types":"./dist/lib/exports.d.ts","engines":{"node":">=18"},"exports":{".":{"types":"./dist/lib/exports.d.ts","import":"./dist/lib/exports.mjs","require":"./dist/lib/exports.js"},"./pay":{"types":"./dist/lib/pay.d.ts","import":"./dist/lib/pay.mjs","require":"./dist/lib/pay.js"}},"gitHead":"5c772b60ed9daf9314a86c4d0a17f93f0dcd4c6b","scripts":{"dev":"tsup --watch","build":"tsup","clean":"rm -rf dist"},"_npmUser":{"name":"henriquebreim","email":"developers@402.md"},"_npmVersion":"11.2.0","description":"CLI to install and manage 402.md skills for AI agents","directories":{},"_nodeVersion":"22.13.1","dependencies":{"ora":"^5.4.1","viem":"^2.0.0","yaml":"^2.4.0","commander":"^12.0.0","picocolors":"^1.0.0","@clack/prompts":"^1.0.1"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5.7.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/cli_0.1.5_1772766524394_0.7780549181800052","host":"s3://npm-registry-packages-npm-production"}},"0.1.6":{"name":"@402md/cli","version":"0.1.6","keywords":["402md","cli","skills","ai","agent","mcp","claude"],"license":"MIT","_id":"@402md/cli@0.1.6","maintainers":[{"name":"henriquebreim","email":"developers@402.md"}],"bin":{"402md":"dist/cli.js"},"dist":{"shasum":"b6c25db0f172f4f34a61b58fc612254dc3e299e3","tarball":"https://registry.npmjs.org/@402md/cli/-/cli-0.1.6.tgz","fileCount":18,"integrity":"sha512-j/WlPU8YrG92e+ILRBgmfjFq8ipmyCDqwSXnLnwkIDxKDg3Pz6McWGy668tupkn2/SZ03I0kVFLeSWggaUSXhw==","signatures":[{"sig":"MEQCIA19xD010gqfUjxNQ3YmYre+dDEkWJl6WvxRugKwfhMAAiBZFlyG9uNbYPJZH/Ca0dUIUjXYvRy9jw1ktonhsGpXZw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":267375},"main":"./dist/lib/exports.js","types":"./dist/lib/exports.d.ts","engines":{"node":">=18"},"exports":{".":{"types":"./dist/lib/exports.d.ts","import":"./dist/lib/exports.mjs","require":"./dist/lib/exports.js"},"./pay":{"types":"./dist/lib/pay.d.ts","import":"./dist/lib/pay.mjs","require":"./dist/lib/pay.js"}},"gitHead":"64cae660803b6913ff17a7614f6c5efcae4a8edc","scripts":{"dev":"tsup --watch","build":"tsup","clean":"rm -rf dist"},"_npmUser":{"name":"henriquebreim","email":"developers@402.md"},"_npmVersion":"11.2.0","description":"CLI to install and manage 402.md skills for AI agents","directories":{},"_nodeVersion":"22.13.1","dependencies":{"ora":"^5.4.1","viem":"^2.0.0","yaml":"^2.4.0","commander":"^12.0.0","picocolors":"^1.0.0","@clack/prompts":"^1.0.1"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5.7.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/cli_0.1.6_1772770965090_0.8330833740112513","host":"s3://npm-registry-packages-npm-production"}},"0.1.7":{"name":"@402md/cli","version":"0.1.7","description":"CLI to install and manage 402.md skills for AI agents","main":"./dist/lib/exports.js","types":"./dist/lib/exports.d.ts","exports":{".":{"types":"./dist/lib/exports.d.ts","import":"./dist/lib/exports.mjs","require":"./dist/lib/exports.js"},"./pay":{"types":"./dist/lib/pay.d.ts","import":"./dist/lib/pay.mjs","require":"./dist/lib/pay.js"}},"bin":{"402md":"dist/cli.js"},"scripts":{"build":"tsup","dev":"tsup --watch","clean":"rm -rf dist"},"dependencies":{"@clack/prompts":"^1.0.1","commander":"^12.0.0","ora":"^5.4.1","picocolors":"^1.0.0","viem":"^2.0.0","yaml":"^2.4.0"},"devDependencies":{"@types/node":"^22.0.0","tsup":"^8.0.0","typescript":"^5.7.0"},"keywords":["402md","cli","skills","ai","agent","mcp","claude"],"license":"MIT","engines":{"node":">=18"},"_id":"@402md/cli@0.1.7","gitHead":"310c2638a02880c57fbd786656babc65eaed6f6f","_nodeVersion":"22.13.1","_npmVersion":"11.2.0","dist":{"integrity":"sha512-O9n9lr9eTd+P4SWA4zy9Umd/DQ3Axx3mrHzY7x35ahYf7v+cnyN3BAtaSWZIKMpg8YPIxUizS5zzF3qGRAr4aQ==","shasum":"fef6cbc4d5277a689fc00be3fbcd3bd7cfb0dba7","tarball":"https://registry.npmjs.org/@402md/cli/-/cli-0.1.7.tgz","fileCount":18,"unpackedSize":267501,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIDKf3SJHuBmH9N2CsqWE1llZ0ucSIIQM0SoXIvWgJ04YAiEApBJxrVOLIo+gEcsGKfKSI81m0q+hYovoochi0ZjBC0U="}]},"_npmUser":{"name":"henriquebreim","email":"developers@402.md"},"directories":{},"maintainers":[{"name":"henriquebreim","email":"developers@402.md"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cli_0.1.7_1773341522239_0.06502240952105409"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-01T13:03:33.762Z","modified":"2026-03-12T18:52:02.566Z","0.1.1":"2026-03-01T13:03:34.052Z","0.1.2":"2026-03-01T13:21:29.315Z","0.1.3":"2026-03-02T01:06:15.660Z","0.1.4":"2026-03-06T02:22:06.766Z","0.1.5":"2026-03-06T03:08:44.535Z","0.1.6":"2026-03-06T04:22:45.272Z","0.1.7":"2026-03-12T18:52:02.395Z"},"license":"MIT","keywords":["402md","cli","skills","ai","agent","mcp","claude"],"description":"CLI to install and manage 402.md skills for AI agents","maintainers":[{"name":"henriquebreim","email":"developers@402.md"}],"readme":"# @402md/cli\n\nCLI to install and manage [402.md](https://402.md) skills across 30+ AI agents.\n\n## Quick start\n\n```bash\n# Initialize per-project config\nnpx @402md/cli init --mode wallet-pay --api-key sk_xxx --wallet 0xabc\n\n# Install a skill\nnpx @402md/cli add ditto\n\n# Search the marketplace\nnpx @402md/cli search \"sentiment analysis\"\n```\n\n## Global install\n\n```bash\nnpm i -g @402md/cli\n402md add <skill>\n```\n\n## Project Setup\n\nRun `init` to create a `.402md/` directory in your project:\n\n```bash\nnpx @402md/cli init --mode wallet-pay --api-key sk_xxx --wallet 0xabc --network base-sepolia\n```\n\nFor x402 mode (self-custody):\n\n```bash\nnpx @402md/cli init --mode x402 --key 0xYOUR_PRIVATE_KEY --network base\n```\n\nThis creates:\n\n```\n.402md/\n├── config.json       # project config (network, agents, budget)\n├── .secrets.json     # secrets (apiKey, walletPrivateKey, walletAddress) — auto-gitignored\n├── installed.json    # installed skills manifest\n└── skills/           # per-skill SKILL.md files\n```\n\nSecrets (`apiKey`, `walletPrivateKey`, `walletAddress`) are stored in `.402md/.secrets.json` with restricted file permissions (`0600`). The CLI automatically adds `.402md/.secrets.json` to your `.gitignore`.\n\nThe CLI walks up from the current directory to find `.402md/`. Falls back to `~/.402md/` if not found.\n\n## Agent Setup\n\nOn first `add`, an interactive selector lets you choose which agents to install to.\n\nTo configure your wallet and MCP server:\n\n```bash\nnpx @402md/cli setup --key 0xabc123... --network base\n```\n\nThe CLI automatically configures:\n- Skills across all selected agents\n- MCP server on supported agents (e.g. Claude Code)\n\n### Supported agents\n\n**Universal (.agents/skills) — always included:**\nAmp, Cline, Codex, Cursor, Gemini CLI, GitHub Copilot, Kimi Code CLI, OpenCode\n\n**Additional (selectable during setup):**\nAntigravity, Augment, Claude Code, OpenClaw, CodeBuddy, Command Code, Continue, Cortex Code, Crush, Droid, Goose, Junie, iFlow CLI, Kilo Code, Kiro CLI, Kode, MCPJam, Mistral Vibe, Mux, OpenHands, Pi, Qoder, Qwen Code, Roo Code, Trae, Windsurf, Zencoder, Neovate, Pochi, AdaL\n\n## Commands\n\n| Command | Description |\n|---------|-------------|\n| `init` | Initialize `.402md/` in the current project |\n| `add <skill>` | Install a skill from the marketplace |\n| `remove <name>` | Remove a skill |\n| `list` | List locally installed skills |\n| `search <query>` | Search the marketplace |\n| `setup --key <0x...>` | Select agents + configure wallet and MCP server |\n| `update [name]` | Update installed skill(s) |\n\n### Examples\n\n```bash\nnpx @402md/cli init --mode wallet-pay --api-key sk_xxx --wallet 0xabc\nnpx @402md/cli search sentiment\nnpx @402md/cli add sentiment-analysis\nnpx @402md/cli list\nnpx @402md/cli remove sentiment-analysis\nnpx @402md/cli update\n```\n\n## Library Usage\n\nThe CLI also exports its modules for programmatic use:\n\n```typescript\nimport { loadConfig, createPaymentClient, searchSkills } from '@402md/cli'\n\nconst config = loadConfig()\nconst client = createPaymentClient(config)\n\nconst result = await client.callSkill('ditto', '/test', {\n  body: { message: 'hello' }\n})\n```\n\nSee [`@402md/agent-tools`](../agent-tools) for the recommended high-level integration.\n\n## Secrets Management\n\nSince v0.2.0, secrets are stored separately from project config:\n\n- **`.402md/config.json`** — safe to commit (network, agents, budget, apiBaseUrl)\n- **`.402md/.secrets.json`** — contains `apiKey`, `walletPrivateKey`, `walletAddress` (auto-gitignored)\n\nWhen you run `init` or `setup`, the CLI:\n1. Writes secrets to `.402md/.secrets.json` with `0600` permissions\n2. Adds `.402md/.secrets.json` to `.gitignore`\n\n`loadConfig()` merges both files transparently, so existing code doesn't need changes.\n\nIf you have an older `.402md/config.json` with secrets inside, they'll migrate to `.secrets.json` automatically on the next `init` or `saveConfig()` call.\n\n## Payment Modes\n\n| Mode | Config fields | Description |\n|------|---------------|-------------|\n| **x402** | `walletPrivateKey` | Signs USDC transfers on-chain directly |\n| **wallet-pay** | `apiKey` + `walletAddress` | Backend pays on your behalf (gasless) |\n\n## Custom API URL\n\nFor local development:\n\n```bash\nnpx @402md/cli init --api-url http://localhost:3001 --network base-sepolia\n```\n\nOr edit `.402md/config.json`:\n\n```json\n{\n  \"apiBaseUrl\": \"http://localhost:3001\",\n  \"network\": \"base-sepolia\"\n}\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}