@supacloud/admin
v0.3.2
Published
Platform administration CLI for SupaCloud operators
Readme
@supacloud/admin
Platform administration CLI for SupaCloud operators.
supacloud-admin is intended for server installation, SSH diagnostics, tenant runtime management, and platform-wide project administration.
Typical environment variables:
SUPACLOUD_HOSTSUPACLOUD_SSH_KEYorSUPACLOUD_SSH_PASSSUPACLOUD_SSH_HOST_FINGERPRINT— required for SSH actions, in OpenSSHSHA256:<base64>formSUPACLOUD_API_URLSUPACLOUD_API_TOKEN
SSH host keys are fail-closed: setting SUPACLOUD_HOST and credentials is not
enough to enable SSH actions. Obtain the fingerprint through a trusted channel,
compare it out of band, then set it explicitly. For example, the discovery
command below is useful only after independently authenticating its result:
ssh-keyscan -p 22 server.example.com | ssh-keygen -lf -
export SUPACLOUD_SSH_HOST_FINGERPRINT='SHA256:...'Examples:
npx @supacloud/admin status
npx @supacloud/admin ssh ping
npx @supacloud/admin ssh diagnose
npx @supacloud/admin project create --name my-app
npx @supacloud/admin project listProject commands owned by this CLI:
project listproject createproject deleteproject pauseproject restoreproject restartproject update_settings
Gateway / Caddy commands (config is injected via the Caddy JSON Admin API; requires admin privileges):
gateway routes— list custom gateway routesgateway 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/gateway update_certificategateway issue_certificate— issue or renew with legogateway deploy_certificate— deploy an existing PEM cert/key pairgateway rebuild— rebuild all tenant gateway configs (--cleanfor a full rebuild)gateway custom_hostname/gateway set_custom_hostname/gateway delete_custom_hostname/gateway verify_custom_hostname
supacloud-admin gateway routes --ref abc123
supacloud-admin gateway upsert_route --ref abc123 --route_id webhook \
--hosts "api.example.com" --paths "/webhook/*" --upstream 10.0.0.5:8080
supacloud-admin gateway config --ref abc123 --rate_limit_tier pro
supacloud-admin gateway rebuild --ref abc123 --clean