subir
v0.2.0
Published
Publish a static site or a single HTML file to a public URL.
Readme
subir
Command-line client for Subir, a small self-hosted static-site host. Publish a folder or a single HTML file to a public URL with one command.
npm install -g subir
subir upload ./sitePublished:
https://pages.subir.dev/quiet-red-panda/
(copied to clipboard)Requirements
- Node.js 22 or newer
- A running Subir server (this is only the client)
Configure
Point the CLI at your server and authenticate once:
export SUBIR_SERVER=https://pages.subir.dev
subir loginOr pass credentials per-command with --server and --token, or via the
SUBIR_SERVER and SUBIR_TOKEN environment variables.
Commands
subir login # store an API token
subir upload ./site # publish a directory (needs index.html)
subir upload ./page.html # publish a single file as index.html
subir upload ./site --slug demo # publish at a chosen name
subir upload ./site --slug demo --replace
subir list # list published sites, with a size total
subir list --sort size # biggest first — find what's taking space
subir info demo # details for one site
subir open demo # open it in a browser
subir delete demo # delete a site
subir delete old-a old-b old-c # delete several in one call
subir whoami # show the IP the server sees you as
subir update # update the CLI itself (--check to only look)
subir logoutFlags
--slug · --replace · --open · --no-copy · --json · --server ·
--token · --expires <30m|12h|7d|ISO> · --spa · --sort <date|size|name>
Bulk delete needs a server running Subir with the bulk-delete endpoint
(deleting a single slug works against any version).
Security note
This package is only the client. It holds no secrets — your API token is supplied at runtime and never bundled here. All upload validation (path traversal, symlinks, size limits, gzip bombs) is enforced by the server, which treats every upload as untrusted regardless of which client sent it.
License
MIT
