@arkforge/share-cli
v1.0.3
Published
CLI to publish TSX artifacts as public shareable links
Maintainers
Readme
share-cli
Publish TSX/React artifacts as public shareable links — your own self-hosted Claude Publish.
Overview
share-cli is a monorepo containing:
src/— Cloudflare Worker that serves as the backend API and renderercli/— Bun-powered CLI to publish TSX files from your terminal
Requirements
- Bun v1.0+
- A Cloudflare account with Workers and KV enabled
Worker Setup (Self-Hosting)
1. Clone and install
git clone https://github.com/arkforge/share-cli
cd share-cli
bun install2. Create a KV namespace
bun run kv:createCopy the resulting KV namespace ID into wrangler.toml.
3. Set secrets via Wrangler
# API key used by the CLI to authenticate uploads
bunx wrangler secret put API_KEY
# Admin credentials for the /apps management UI
bunx wrangler secret put APPS_USER
bunx wrangler secret put APPS_PASS4. Deploy
bun run deployCLI Installation
From npm (recommended)
bun add -g @arkforge/share-cli
# or
npm install -g @arkforge/share-cliFrom source
bun run install:cliCLI Usage
Configure
share config --url https://share.yourdomain.com --key your-api-keyPublish a file
share my-presentation.tsx
share dashboard.tsx --title "Q4 Dashboard"Preview locally with hot-reload
share preview dashboard.tsxPreview and auto-publish on every save
share preview dashboard.tsx --publishUpdate a published snippet
share update my-dashboard-ab12cd34 dashboard.tsx
share update my-dashboard-ab12cd34 --title "New Title"List published snippets
share listEnvironment Variables (Worker)
| Variable | Required | Description |
|--------------|----------|------------------------------------------|
| API_KEY | Yes | Secret key used by the CLI to authenticate |
| APPS_USER | Yes | Username for the /apps admin UI |
| APPS_PASS | Yes | Password for the /apps admin UI |
Set these via bunx wrangler secret put <VAR> — never commit them to the repo.
Scripts
| Command | Description |
|----------------------|------------------------------------------|
| bun run dev | Start local Wrangler dev server |
| bun run deploy | Deploy worker to Cloudflare |
| bun run typecheck | Run TypeScript type checking |
| bun run install:cli| Install the share CLI globally via Bun |
License
MIT