Skip to content

Using snlctl

Before using any command, authenticate with your Google account:

Terminal window
snlctl auth login

This opens your browser for Google SSO. After signing in, the token is saved to ~/.snl/token.json.

Check your auth status:

Terminal window
snlctl auth status
snlctl <resource> <action> [flags]

Examples:

Terminal window
snlctl deploy list
snlctl pods get my-pod
snlctl db create --name mydb --engine postgres
snlctl domain create --name myapp --service myapp --port 3000
FlagDescription
--jsonOutput raw JSON instead of tables
--quietSuppress non-essential output
--no-colorDisable colored output
--no-updateSkip the daily auto-update check
--api-url <url>Override API endpoint
--token <token>Override auth token
Terminal window
# Create a deployment
snlctl deploy create --name myapp --image nginx:latest --port 80 --replicas 2
# Expose it on a subdomain
snlctl domain create --name myapp --service myapp --port 80
# Check status
snlctl status

Your app is now live at myapp.synoralab.dev.

Terminal window
# Scale to 3 replicas
snlctl deploy scale myapp --replicas 3
# Restart (rolling)
snlctl deploy restart myapp
Terminal window
# PostgreSQL (default)
snlctl db create --name mydb --engine postgres
# MySQL
snlctl db create --name mydb --engine mysql
# MongoDB
snlctl db create --name mydb --engine mongo
# Get connection credentials
snlctl db credentials mydb
Terminal window
# Set env vars on a deployment
snlctl env set myapp --key DATABASE_URL --value "postgres://..."
# Import from a .env file
snlctl env import myapp --file .env
# Link database credentials automatically
snlctl env link-db myapp --db mydb
Terminal window
# Tail logs from a pod
snlctl logs my-pod-abc123
# Logs from a specific deployment's pods
snlctl pods list # find the pod name
snlctl logs <pod-name>
Terminal window
# Create a bucket
snlctl s3 bucket-create --name assets
# Create an access token
snlctl s3 token-create --bucket assets --permissions readwrite
# Link S3 credentials to your deployment's env
snlctl env link-s3 myapp --bucket assets
Terminal window
# Let's Encrypt (automatic TLS)
snlctl custom-domain create --domain myapp.example.com --service myapp --port 80 --tls-mode letsencrypt
# Verify DNS is set up correctly
snlctl custom-domain verify myapp.example.com

Point your domain’s CNAME to cname.synoralab.dev first.

Terminal window
# Enable push-to-deploy
snlctl build enable --repo my-org/my-repo --name myapp --branch main
# Check recent builds
snlctl build runs <id>

If the bot doesn’t have access to your repo, the CLI will prompt you to invite @ST4RCHASER-Automation as a collaborator. After you send the invite, press Enter and it will automatically accept and retry.

Terminal window
# View deployment history
snlctl deploy history myapp
# Rollback to previous revision
snlctl rollback myapp
ResourceActions
authlogin, status, refresh, logout
deploycreate, list, get, delete, restart, scale, history
podslist, get, status, delete
serviceslist, get, delete
apply(apply k8s manifest)
exec(exec into pod)
jobcreate
cronjobcreate, list, get, delete
events(show namespace events)
envlist, set, delete, import, link-db, link-s3
dbcreate, list, credentials, delete, backup, backups, restore
s3bucket-create, bucket-list, bucket-delete, token-create, token-list, token-update, token-delete
domaincreate, list, check, update, delete
directportcreate, list, delete
custom-domaincreate, list, verify, delete
pagesdeploy, list, status, upload, set-domain, delete
buildenable, list, update, delete, runs, check-access, accept-invites
rollback(rollback deployment)
logs(view logs), archive, archives
notifycreate, list, update, delete, test
sharegrant, revoke, list
diagnose(auto-diagnose issues)
autoscalecreate, list, update, delete
schedulecreate, list, delete
quotaget, update
status(overview), usage, events, reset
kubeconfig(generate kubeconfig)
templatelist, deploy
adminusers, cluster, delete-user, cleanup, offboard, reprovision
  • Use --json when piping output to jq or scripts
  • snlctl deploy list shows the same info as kubectl get deployments
  • All destructive actions (delete) ask for confirmation — use --quiet to skip in scripts
  • Config is stored in ~/.snl/config.json for settings, token.json for auth
  • You can override the API URL with SNL_API_URL env var or --api-url flag