# sharebox-cli Command line and MCP server for [ShareBox](https://github.com/zalaso/sharebox), a self-hosted platform where AI agents publish small web tools and you share them like a Google Doc: with specific people, a whole Google Workspace domain, or anyone with the link. Visitors sign in with Google; every tool gets a trusted identity, its own storage and its own sandbox. You need a running ShareBox instance (yours or your organization's). To set one up, see the [install guide](https://github.com/zalaso/sharebox/blob/main/docs/install.md). ## Install ```bash npm install -g sharebox-cli ``` Requires Node 20 or newer. Every ShareBox instance also serves its own copy at `https:///cli/sharebox.tgz`. ## Connect ```bash sharebox login sharebox.example.com ``` A browser opens: sign in with Google and click **Authorize**. The token is stored in `~/.sharebox/credentials.json`. On servers or in CI you can set `SHAREBOX_URL` and `SHAREBOX_TOKEN` instead. ## Use it from an agent (MCP) Claude Code: ```bash claude mcp add --scope user sharebox -- sharebox mcp ``` On Windows: `claude mcp add --scope user sharebox -- cmd /c sharebox mcp`. Without a global install, other MCP clients can run `npx -y sharebox-cli mcp` (after `npx sharebox-cli login ` once). Tools: `sharebox_guide`, `sharebox_create_project`, `sharebox_publish`, `sharebox_list`, `sharebox_info`, `sharebox_share`, `sharebox_rollback`, `sharebox_unshare`. There is deliberately no delete tool: deleting erases data, so it stays in the CLI behind a confirmation. The guide is also an MCP resource (`sharebox://guide`), and the `build_tool` prompt (arguments `idea` and optional `share_with`) asks the agent to build, publish and optionally share a tool with the guide attached. In Claude Code it shows up as `/mcp__sharebox__build_tool`. Then just ask: *"Build a vacation tracker for my team and publish it on ShareBox."* ## Commands | Command | What it does | |---|---| | `sharebox init [--name N]` | Starter folder with an example that uses the SDK | | `sharebox publish [folder] [--name N] [--tool T]` | Publish, or update the same tool on later runs (same address, data kept). `--tool` updates an existing tool from any folder, e.g. after an agent rebuilt it elsewhere | | `sharebox list` | Tools you can manage | | `sharebox info ` | Address, version and shares | | `sharebox share [--role use\|manage]` | ``: an email, `@domain.com` or `anyone` | | `sharebox unshare ` | Remove a share | | `sharebox secret set --host ` | Secret for an external service, typed without echo (or piped on stdin); the tool uses `{{secret:NAME}}` in requests to that domain | | `sharebox secret list ` · `sharebox secret remove ` | Secret names and domains (never values) · remove one | | `sharebox rollback ` | Go back to the previous version (published again as a new version, same link and data); run it again to undo | | `sharebox delete --yes` | Delete a tool and its data | | `sharebox guide` | How to build a tool (written for agents) | | `sharebox mcp` | MCP server on stdio | Messages are in English or Italian, following `SHAREBOX_LANG` or the system locale. ## License AGPL-3.0-or-later