Skip to content

Repository files navigation

Square Cloud Banner

Square Cloud CLI

A command line application to manage your Square Cloud applications, databases and workspaces.

Installation

macOS, Linux, and WSL:

curl -fsSL https://cli.squarecloud.app/install | bash

Windows (needs npm installed):

npm install -g @squarecloud/cli

Or visit the @squarecloud/cli npm page for more information.

Getting started

squarecloud auth login # authenticate with your API token
squarecloud upload # zip & upload the current directory as a new app
squarecloud commit -r # commit the current directory and restart
squarecloud app logs # tail the latest logs (interactive app picker)

Every command accepts --json for raw machine-readable output, and app/db IDs can be omitted — the CLI falls back to the squarecloud.app config file or an interactive picker.

Commands

CommandDescription
auth login / logout / whoamiManage your Square Cloud session
statusSquare Cloud platform health
zipZip the current folder
uploadUpload a new application (also app upload)
commit [app id] [--restart] [--path <dir>]Commit the current dir or --file (also app commit)

app

CommandDescription
app listList your applications
app info [id]Detailed application info
app status [id] [--all] [--raw]Runtime status (one app or every app)
app logs [id]Most recent logs
app metrics [id]Last 24h of CPU/RAM/network metrics
app realtime [id]Stream realtime events (SSE)
app start / restart / stop [id]Lifecycle signals
app delete [id]Delete an application
app domainsEvery domain configured across your apps
app load-balancersCustom domains grouped by app
app env list/set/remove/replaceEnvironment variables (set KEY=VAL..., --from-file .env)
app file list/read/write/move/deleteRemote file manager
app deploy list/current/webhook/github link|unlinkDeployments & Git integrations
app network dns/domain/analytics/errors/logs/performance/purge-cacheDNS, custom domain & edge observability
app snapshot list/create/restoreApplication snapshots

db

CommandDescription
db listList your databases
db create --name --memory --type --versionCreate a database
db info/status/metrics [id]Inspect a database
db start/stop [id]Lifecycle signals
db update [id] --name/--memoryUpdate a database
db delete [id]Delete a database
db credentials certificate/resetTLS certificate & credential rotation
db snapshot list/create/restoreDatabase snapshots

workspace

CommandDescription
workspace list/create/info/delete/leaveManage workspaces
workspace app add/removeShare apps with a workspace
workspace member add/update/remove/invite-codeManage members

Destructive commands (delete, env replace, credentials reset, purge-cache, snapshot restore, ...) ask for confirmation; pass -y to skip.

Debugging

Set SQUARECLOUD_DEBUG=1 to log every API request/response to stderr.

Update

macOS, Linux, and WSL:

curl -fsSL https://cli.squarecloud.app/install.sh | sh

Windows:

squarecloud update

About

This package provides a direct way to interact with the official Square Cloud API.

Topics

Resources

Stars

16 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages