shary-artifacts
v0.2.1
Published
CLI for publishing self-contained artifacts to Shary.
Maintainers
Readme
shary-artifacts
Publish anything your AI agent builds as a shareable URL.
shary-artifacts is the public command-line interface for Shary. It lets any AI agent — Claude Code, Codex, Cursor, Kimi Code, Aider, or anything else that can run a shell command — turn a self-contained HTML or Markdown file into a clean public link.
No copying code out of chat. No forcing your audience to sign up for Claude, OpenAI, or any other platform. Build in the agent you already use, share like it's a finished product.
Why Shary exists
AI agents are great at producing interactive output — dashboards, reports, prototypes, presentations, walkthroughs — but getting that output in front of someone else is harder than it should be:
- Vendor lock-in. Claude Code Artifacts live on
claude.ai; Codex Sites live inside OpenAI. Recipients need accounts or workspace access. - No public sharing. First-party artifact tools keep links inside their ecosystems.
- Manual copy/paste. Generic HTML hosts break the agent workflow and force users to export, switch apps, and re-upload.
- Fragmented tooling. Every agent invents its own way to publish, and none of them talk to each other.
Shary solves this by giving every agent the same small command. The result is a public URL that opens in any browser, on any device, with no login required.
What the CLI does
shary-artifacts is the public CLI that agents and end users run locally to:
- Inline local images, fonts, and CSS into a single self-contained file.
- Publish that file to Shary and receive a public URL.
- Upgrade an existing artifact in place, keeping the same slug and URL.
Everything travels disk → Shary. The multi-megabyte payload never has to be typed into the conversation, so it does not eat your context window.
Quick start
No install required — run with npx to publish a self-contained artifact:
npx shary-artifacts publish path/to/artifact.html --title "My Artifact"The CLI prints the public URL:
https://shary.cc/a/my-artifact-7x2kAuthentication
The CLI resolves the Shary API key automatically, in this order:
SHARY_API_KEYenvironment variable.~/.shary/api-keycache file.
Set the environment variable once:
export SHARY_API_KEY=ask_...Or save a key to ~/.shary/api-key after provisioning it through the Shary API.
Commands
publish
Inline local assets and upload a self-contained artifact in one step.
npx shary-artifacts publish path/to/artifact.html --title "My Artifact"On success, the public URL is printed:
https://shary.cc/a/slugupgrade
Replace the content of an existing artifact while keeping the same slug and URL.
npx shary-artifacts upgrade existing-slug path/to/artifact.htmlAdd --title to change the stored title:
npx shary-artifacts upgrade existing-slug path/to/artifact.html --title "Updated Title"inline
Preview the self-contained version without uploading. Useful for debugging missing assets, external references, or size issues.
npx shary-artifacts inline path/to/artifact.html --output path/to/artifact-inlined.htmlSelf-contained requirements
Shary artifacts must have no external network dependencies:
- Images must be inlined as base64
data:URIs. - CSS and JavaScript must be embedded, not linked externally.
- Fonts must use
@font-facewith base64 data URIs. - File size must be ≤ 16 MiB.
The publish and inline commands automatically resolve relative local references and inline them. External HTTP(S) references are left in place and reported as warnings, and the server will reject the file if they remain.
Updating the CLI
The CLI checks npm once per day and prints a warning when a newer version is available. To update immediately:
npx shary-artifacts@latest --versionOr, if installed globally:
npm install -g shary-artifacts@latestSupport
For help using the CLI, visit https://shary.cc.
