The stavo CLI
Deploy, follow logs, change settings, reach your databases and buckets, upload files and make short links, from your terminal or from CI. One small program for macOS, Linux and Windows.
Install
Your server hands it out. On macOS and Linux:
curl -fsSL https://your-server/cli/install.sh | shOn Windows, download https://your-server/cli/download/windows-x64 and put stavo.exesomewhere on your PATH. The Developer app's stavo CLI page has the exact commands for your server. Admins turn it on in Admin > Features > stavo CLI.
Sign in
stavo login https://your-server
stavo whoamiA browser tab asks you to approve this computer; check that it shows the same code as your terminal. The CLI gets its own token that only reaches what it needs (services, projects, databases, buckets, uploads and links), kept in a file only you can read. Sign in to more servers or accounts and switch with stavo profiles use. The Developer app lists signed-in computers and signs them out.
Deploy
cd my-app
stavo project init # pick the project, writes stavo.toml
stavo deploy # uploads what changed, builds, prints the address
stavo logs -f
stavo env set GREETING="hello there"
stavo secrets set DISCORD_TOKEN
stavo rollbackOnly files that changed since your last deploy are sent, and never node_modules, .git, caches or your local .env (add more to .stavoignore). The build log streams right into your terminal. For a service that deploys from Git, stavo deploy builds its branch on the server andstavo deploy --preview makes a preview of the branch you're on.
Databases
stavo db ls
stavo db create shop
stavo db connect shop # psql or mysql
stavo db tunnel shop # shop on localhost:15432 for TablePlus, DBeaver, Prisma Studio
stavo db backup shopThe tunnel goes through your server's normal address over a WebSocket, so it works from anywhere, including behind Cloudflare Tunnel, without opening any port. It needs write access to the database.
Buckets, uploads and links
stavo bucket sync ./site s3://web/site
stavo bucket cp report.pdf s3://docs/
stavo upload screenshot.png # prints the share link
stavo link create https://example.com/a/long/pathIn CI
Set STAVO_SERVER and STAVO_TOKEN (an API token from your Stavo settings) and run the same commands. Every command takes --json. A Forgejo Actions workflow:
# .forgejo/workflows/deploy.yml
on:
push:
branches: [main]
jobs:
deploy:
runs-on: docker
steps:
- uses: actions/checkout@v4
- run: curl -fsSL https://your-server/cli/install.sh | STAVO_INSTALL_DIR=/usr/local/bin sh
- run: stavo deploy --service my-api
env:
STAVO_SERVER: https://your-server
STAVO_TOKEN: ${{ secrets.STAVO_TOKEN }}All commands
stavo login | logout | whoami | profiles
stavo project ls | open | init
stavo status | deploy | logs | env | secrets | restart | stop | start | run | rollback | open | previews
stavo db ls | create | url | connect | tunnel | backup | backups | restore | clone
stavo bucket ls | cp | sync | rm
stavo upload <file> | link create <url>
stavo help