The Weesify CLI
Deploy a folder to your HTML website in one command, pull it back, check what changed and roll back. One file, no packages to install: it needs only Node.js 18 or newer.
Install
Download the file and run it with Node.js. There is nothing else to install, and no npx or package registry involved.
macOS and Linux
curl -fsSLo weesify.mjs https://weesify.com/developers/cli/weesify.mjs && node weesify.mjs login
Windows (PowerShell)
Invoke-WebRequest https://weesify.com/developers/cli/weesify.mjs -OutFile weesify.mjs; node weesify.mjs login
To type just "weesify" anywhere, put it on your PATH (macOS and Linux):
chmod +x weesify.mjs && sudo mv weesify.mjs /usr/local/bin/weesify
weesify --version
Login asks for an API token. Make one in your workspace under Settings → Developers with the scopes sites:read, sites:write and sites:deploy. It is saved in ~/.config/weesify/credentials.json, readable only by you, never in your project folder.
Check the file
Version 1.0.0, 44 KB. Compare its SHA-256 with this one before you run it:
e98494277685934e20bdfb05c7f9fe5087db5db66d80b2365a4d3f74ed51c8af
shasum -a 256 weesify.mjs # macOS
sha256sum weesify.mjs # Linux
Get-FileHash weesify.mjs # Windows
First deploy
cd my-site
weesify init # link this folder to a website (or create one)
weesify deploy -m "First version"
weesify status # live vs draft vs this folder
deploy zips the folder on your computer, uploads it, makes the website exactly that folder and publishes it. The previous version stays one weesify rollback away. Add --draft to update the draft only and publish later from the editor.
Left out automatically: node_modules/, .git/, .env, *.log and system files. Add your own patterns to .weesifyignore (the same syntax as .gitignore). Server code such as .php is never published.
Commands
| Command | Does |
|---|---|
weesify login | Save an API token (or read it from --stdin) |
weesify whoami | The workspace, token name and scopes in use |
weesify sites | List your websites |
weesify init [--site ID | --name NAME] | Link a folder to a website; writes weesify.json (no secrets in it) |
weesify deploy [dir] [-m MSG] [--draft] | Upload the folder and publish it, or only update the draft |
weesify pull [dir] [--live | --deployment ID] | Download the draft, the live site or a deployment |
weesify status | Last deployment, draft changes, your folder against the live site, domains |
weesify deployments | Deployment history |
weesify rollback [ID or #N] | Make an earlier deployment live again (default: the one before) |
weesify domains [list | add | verify | remove] HOST | Connect and check custom domains |
weesify open | Open the website in your browser |
Every command takes --json for machine-readable output, --site to pick a website and --host for a self-hosted Weesify.
CI and automation
In CI, set the token as a secret named WEESIFY_TOKEN; no login step is needed. Each deploy sends its own Idempotency-Key, so a retried upload never publishes twice.
# GitHub Actions
- run: curl -fsSLo weesify.mjs https://weesify.com/developers/cli/weesify.mjs
- run: echo "e98494277685934e20bdfb05c7f9fe5087db5db66d80b2365a4d3f74ed51c8af weesify.mjs" | sha256sum -c -
- run: node weesify.mjs deploy dist --site ${{ vars.WEESIFY_SITE }} -m "Build ${{ github.sha }}"
env:
WEESIFY_TOKEN: ${{ secrets.WEESIFY_TOKEN }}
A website that needs client approval can’t be published by a token until the current draft is approved; the deploy then stops with exit code 2.
Exit codes
| Code | Means |
|---|---|
| 0 | Done (for deploy: the website is live) |
| 1 | Something went wrong |
| 2 | Approval required before publishing |
| 3 | The deploy failed; the previous version stays live |
| 4 | Not signed in, or the token isn’t allowed to do this |
| 5 | Not found in this workspace |
| 6 | Network, server or rate limit problem: safe to retry |
| 64 | The command was used the wrong way |