Skip to content
alesmartanPublic

About

Share HTML pages, Markdown docs and files from your terminal or AI agent. Short links on your own domain, free on Cloudflare.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

sharecli

Share pages, docs and files from your terminal or AI agent.
Short links on your own domain, free on Cloudflare.

MIT license Runs on Cloudflare Workers Node 20 or newer

Sharing a page and a private doc with the share command

Set it up with your agent

Paste this into Claude Code, Codex or any coding agent:

Set up sharecli for me. Read https://github.com/alesmartan/sharecli to see how it installs
and works, then install it and run the setup. Ask me for anything only I can decide or do,
like my domain or the Cloudflare login. Finish by sharing a test page and sending me the link.
A shared Markdown doc in the reader

Features

HTML, Markdown, any file Pages run untouched under a slim bar to copy the link or download. Docs open in a clean reader with dark mode.
Private links --private adds a passcode, plus a one-tap link for friends.
Auto cleanup Links expire after 30 days, or never with --permanent.
Versions update keeps the link. rollback undoes the last change.
Built for agents --json on every command, and a skill for Claude Code, Codex and more.
Free Runs on the Cloudflare free plan: Workers, R2 and D1.

Quick start

npm install -g @alesmartan/sharecli
share setup --domain s.example.com
share page.html

setup logs you in to Cloudflare and deploys your own server. Skip --domain for a free workers.dev address.

An HTML page, a Markdown doc and the passcode screen on a phone

Commands

share <file|folder> [--private] [--ttl 7d | --permanent] [--slug name]

share ls                     share update <link> <file>
share info <link>            share rollback <link>
share private <link>         share extend <link>
share public <link>          share rm <link>

share setup | connect | doctor | usage
share upgrade                # update the CLI, the agent skill and your server

Run share --help for every flag.

For AI agents

npx skills add alesmartan/sharecli

Then ask your agent to "make an HTML page about X and share it".

Good to know
  • R2 needs a card on file. Cloudflare asks once, even on the free plan. You won't be charged under the limits.
  • More machines: share connect https://s.example.com --token <token>. Get the token with share config --reveal.
  • Passcodes keep casual visitors out. They are not meant for secrets.
  • Limits: 95 MB per file, 1,000 files per share, 10 GB in total on the free plan.

Develop

pnpm install
pnpm dev     # local server on localhost:8787
pnpm test    # end-to-end tests against a throwaway server

License

MIT

About

Share HTML pages, Markdown docs and files from your terminal or AI agent. Short links on your own domain, free on Cloudflare.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages