@within-7/jetr
v0.9.3
Published
CLI for Jetr static site hosting
Readme
@within-7/jetr
Static site hosting CLI. Deploy files to Cloudflare R2 with one command. Incremental uploads, custom domains, password protection.
Install
npm i -g @within-7/jetrOr use directly:
npx @within-7/jetr deploy my-site ./distQuick Start
# 1. Login
jetr login
# Username: lib
# Password: ****
# ✔ Logged in as lib
# 2. Deploy current directory
jetr
# Site name [my-blog]:
# ✔ Deployed!
# URL: https://my-blog.your-domain.com
# 3. Re-deploy (remembers site name)
jetr
# Using saved site: my-blog
# ✔ Deployed!Commands
jetr login [user] [password]
Login with username and password. Credentials are verified against auth-gateway, and the JWT token is saved locally.
jetr login # interactive prompts
jetr login lib mypassword # non-interactive
jetr login --token <jwt> # direct token (for CI)jetr create <name>
Create an empty site without deploying files.
jetr create my-blog
jetr create preview-site --password secret123
jetr create temp-demo --expires 86400 # expires in 24hjetr [directory] [name]
Deploy a directory. This is the default command — just run jetr in your project.
jetr # deploy current dir, name from .jetrrc or prompt
jetr ./dist # deploy ./dist
jetr ./dist my-blog # deploy ./dist as my-blogSite is auto-created if it doesn't exist. Name is saved to .jetrrc for next time. Uses incremental upload (10x concurrent) — only changed files are uploaded.
jetr list
List your sites.
jetr list
jetr lsjetr info <name>
Show site details including files and share tokens.
jetr info my-blogjetr delete <name>
Delete a site and all its files.
jetr delete my-blog
jetr rm my-blogjetr password <name> [password]
Set or remove site password.
jetr password my-blog secret123 # set password
jetr password my-blog # remove passwordjetr token create <site>
Create a share token for password-protected sites.
jetr token create my-blog --note "For QA team"
jetr token create my-blog --expires 3600 # 1 hourjetr token revoke <site> <id>
Revoke a share token.
jetr token revoke my-blog KTEaMnomEOPHlZizIvDNLjetr whoami
Show current config (API URL and token).
How It Works
jetr deployscans the directory and computes SHA-256 hashes for each file- Sends the file manifest to the API, which diffs against the current state
- Only uploads files that changed (incremental deploy)
- Finalizes the deploy — old files are cleaned up, new files go live
This means re-deploying a large site with one changed file only uploads that one file.
Config
Config is stored at ~/.jetr/config.json:
{
"apiUrl": "https://api.your-domain.com/jetr",
"token": "eyJhbG..."
}Override API URL with jetr login <token> --api-url <url>.
