CLI
Ships with the repo (cli.js, no extra dependencies). Run it via node cli.js, or without cloning:
npx github:anvilnine/artifacts <command>
Configure
export ARTIFACTS_URL=https://artifacts.example.com
export ARTIFACTS_API_KEY=...
--url and --key override the env vars per call. --key accepts a scoped managed key or the bootstrap ARTIFACTS_API_KEY; the keys subcommands need the bootstrap admin key.
Publish
artifacts publish page.html --slug hello
# https://artifacts.example.com/a/hello
artifacts deploy ./my-site --slug my-site
# https://artifacts.example.com/a/my-site/ (12 files)
Type is inferred from the extension (.html, .jsx, .tsx, .md); pass --type to override. deploy zips a directory and posts it to the zip endpoint. publish also takes --title, --tags a,b, --project p, --expires ISO, --frame on|off, and --visibility public|private|password [--password pw].
Manage
artifacts list [--tag t] [--project p]
artifacts rename <slug> <new-slug>
artifacts disable <slug> | enable <slug>
artifacts visibility <slug> <public|private|password> [--password pw]
artifacts expire <slug> <ISO-date|never>
artifacts tag <slug> <a,b,c|none>
artifacts project <slug> <name|none>
artifacts source <slug> [-o file]
artifacts delete <slug>
API keys
Mint scoped bearer tokens for CLI/MCP clients instead of sharing the bootstrap key (needs the bootstrap admin key):
artifacts keys create laptop-cli --scopes publish
artifacts keys create ci --scopes read,publish --expires 2027-01-01
artifacts keys list
artifacts keys revoke <id>
The full token prints once, so store it; the server keeps only a hash.