@supacloud/cli
v0.10.0
Published
Project-scoped CLI for SupaCloud users
Downloads
1,324
Readme
@supacloud/cli
Project-scoped CLI for SupaCloud users.
Use the explicit supacloud-cli command for project workflows. The old supacloud
binary name is kept as a compatibility alias only; it is easy to confuse with the
server binary installed at /usr/local/bin/supacloud.
Install:
npm install -g @supacloud/cli
supacloud-cli statusOne-off execution:
npm exec --package @supacloud/cli -- supacloud-cli statussupacloud-cli defaults to the current workspace's project context. If you do not pass explicit flags, it tries to auto-link from .env:
SUPABASE_URLorSUPACLOUD_API_URLSUPABASE_SERVICE_ROLE_KEYorSUPACLOUD_API_TOKEN
Examples:
supacloud-cli status
supacloud-cli project get
supacloud-cli project logs --log_type database
supacloud-cli project task_stats
supacloud-cli project task_detail --task_id task_123
supacloud-cli queue stats --queue emails
supacloud-cli queue dlq --queue emails --limit 20
supacloud-cli task_events inspect_webhook --ref abc123
supacloud-cli database query --sql "select now()"
supacloud-cli database query --ref abc123 --file ./queries/vector-search.sql
supacloud-cli database push_migrations --ref abc123 --dir supabase/migrations --dry_run
supacloud-cli frontend list --ref abc123Use database query --file for complex SQL, pgvector queries, and single-request transaction blocks.
CREATE EXTENSION IF NOT EXISTS vector;
CREATE TABLE documents (
id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
content text NOT NULL,
embedding vector(1536)
);
CREATE INDEX documents_embedding_hnsw_idx
ON documents
USING hnsw (embedding vector_cosine_ops);Transaction boundary: SupaCloud supports transaction blocks inside one SQL request and transactional migrations. It does not expose long-lived HTTP transaction sessions; use a direct Postgres DSN for application-side long transactions.
Project commands owned by this CLI:
project getproject healthproject logsproject api_keysproject settingsproject tasksproject task_detailproject task_statsproject task_cancelproject task_retryproject dlqproject background_settingsproject update_background_settings
Queue commands:
queue sendqueue receivequeue ackqueue releasequeue failqueue retryqueue delete_messagequeue list_messagesqueue statsqueue dlqqueue get_settingsqueue update_settings
Task event commands:
task_events register_webhooktask_events unregister_webhooktask_events inspect_webhook
Gateway / Caddy commands (require admin privileges; config is injected via the Caddy JSON Admin API):
gateway routes— list custom gateway routes (reverse_proxy / static sites / redirects)gateway upsert_route— create or replace a routegateway update_route— replace a route by idgateway delete_route— remove a route by idgateway config— update rate-limit tier, CORS origins, or JWT settingsgateway get_certificate— read certificate automation settingsgateway update_certificate— save certificate automation settingsgateway issue_certificate— issue or renew a certificate with legogateway deploy_certificate— deploy an existing PEM cert/key pairgateway rebuild— rebuild all tenant gateway configs (--cleanfor a full rebuild)gateway custom_hostname— read the bound custom hostnamegateway set_custom_hostname— bind a custom hostnamegateway delete_custom_hostname— remove the custom hostnamegateway verify_custom_hostname— verify a custom hostname
supacloud-cli gateway routes --ref abc123
supacloud-cli gateway upsert_route --ref abc123 --route_id webhook \
--hosts "api.example.com" --paths "/webhook/*" --upstream 10.0.0.5:8080
supacloud-cli gateway upsert_route --ref abc123 --route_id canonical-https \
--hosts "www.example.com" --paths "/*" --protocol http \
--redirect_to 'https://www.example.com{http.request.uri}' --redirect_status 308
supacloud-cli gateway config --ref abc123 --rate_limit_tier pro
supacloud-cli gateway rebuild --ref abc123 --cleanFor server installation, SSH diagnostics, and tenant administration, use @supacloud/admin.
