snapbase-cli
v0.1.0
Published
Noninteractive agent-oriented CLI for Snapbase PostgreSQL projects.
Readme
snapbase-cli
Noninteractive, agent-friendly CLI for Snapbase. The package installs the snapbase executable.
Configure
Install it globally with:
npm install -g snapbase-cliSet SNAPBASE_URL and provide SNAPBASE_TOKEN through a secret manager, or pipe a token using --token-stdin. Never put a token in command arguments, scripts, committed .env files, shell history, or ordinary logs. Use --json --non-interactive for agent workflows.
export SNAPBASE_URL="https://your-snapbase-host"
# Load SNAPBASE_TOKEN through your secret manager, then:
snapbase --json --non-interactive projects listExamples
snapbase projects create customer-api
snapbase projects list
snapbase projects connection <project-id>
snapbase projects rename <project-id> --name customer-api-prod
snapbase projects delete <project-id> --yes
snapbase developer apps list
snapbase developer apps create --name Acme --home-url https://acme.example --redirect-url https://acme.example/auth/snapbase/callback
snapbase developer tokens create --label deploy-agent --scope projects:read --scope projects:write --expires-days 90
snapbase developer tokens revoke <token-id> --yesA newly created PAT or app client secret appears once in the response. Send stdout directly to an approved secret manager rather than ordinary logs. Noninteractive destructive operations refuse to continue without --yes.
