Docs · CLI
The Shareable CLI
One command turns a local HTML file into a shareable link your team can revisit. Works the same way from your terminal, from Claude Code, and from Codex.
Install
One copy-paste sets up the CLI and wires it into your agent. Pick the one you use and run it in your terminal:
What that script does, in order: installs shareable globally via npm, drops the shareable-publish skill into your agent’s skills folder, appends a short note to your agent’s instructions file so it knows when to offer Shareable, then runs shareable login to authorize this device. Requires Node.js 20+ and npm.
Just want the CLI, no agent setup?
Install from npm directly. You’ll need to run shareable login yourself.
npm install -g shareable-cli
shareable loginConfirm it landed on your PATH:
shareable --versionLog in
The CLI authorizes your device through your browser — no copy-pasted tokens.
shareable loginA verification URL opens automatically. Approve the device, and the CLI writes a token to ~/.shareable/env. Sanity-check:
shareable whoamiPublish an artifact
Point the CLI at a single HTML file. The share URL is the only thing printed to stdout, so it composes well with other commands.
shareable publish ./report.htmlWith supporting assets (images, CSS, fonts, data files), point--assets at the directory. Shareable preserves the paths your HTML references.
shareable publish ./report.html \
--assets ./assets \
--title "Q2 forecast" \
--description "Short context for the recipient"To update an existing artifact at the same share URL, pass its id:
shareable publish ./report.html --artifact-id <id>Commands
| Command | Does |
|---|---|
| shareable login | Authorize this device through the browser. Writes the token to ~/.shareable/env. |
| shareable logout | Remove the saved token. |
| shareable whoami | Print the account this device is signed in as. |
| shareable publish <file> | Upload <file> (and optional assets) and print the share URL. |
| shareable --version | Print the CLI version. |
| shareable --help | Show usage. |
Publish options
| Flag | Does |
|---|---|
| --assets <dir> | Include a directory of supporting files (images, CSS, JS, fonts, data). |
| --title <title> | Title for the artifact. Inferred from the filename if omitted. |
| --description <text> | Short context shown alongside the share link. |
| --source <claude|codex|cli> | Records which agent or tool produced the artifact. |
| --artifact-id <id> | Update an existing artifact at the same share URL instead of creating a new one. |
Environment
The CLI auto-loads ~/.shareable/env (and falls back to~/.annexo/env for installs from before the rename). The variables it reads:
| Variable | Purpose |
|---|---|
| SHAREABLE_API_TOKEN | Auth token. Written by `shareable login`. |
| SHAREABLE_BASE_URL | API host. Defaults to https://www.shareable.page. |
| SHAREABLE_SOURCE | Default upload source for `shareable publish` (cli, claude, codex). |
Use it from your agent
The “Get started with Claude” and “Get started with Codex” buttons on the home page run a one-line installer that (1) installs the CLI from npm, (2) drops the shareable-publish skill into the agent’s skills directory, (3) adds a small note to your agent’s instructions file so it knows to offer Shareable when an HTML artifact is ready, and (4) runs shareable login.
Once installed, the agent runs the same command you would:
shareable publish ./dist/index.html --assets ./dist --title "Pipeline walkthrough"Troubleshooting
Token is invalid or expired
Run shareable login again. Tokens are not revoked automatically — old ones keep working until you revoke them in dashboard settings.
Could not reach https://…
Override the host if you self-host Shareable or hit a corporate proxy:
SHAREABLE_BASE_URL=https://shareable.example.com shareable loginThe HTML does not include a viewport meta tag…
Shareable serves uploaded HTML inside a sandboxed iframe. Warnings don’t block publishing, but they are worth reading before sharing the link.
Security
- Tokens are stored locally in
~/.shareable/envat mode 600. They are not synced to a cloud config. - Uploaded HTML is rendered in a sandboxed iframe and external resources are flagged with warnings.
- Don’t publish content with secrets, credentials, or regulated data unless your recipient is authorized.