Command line interface (CLI)¶
The SweatStack CLI manages your SweatStack resources from the terminal. Use it to:
- Create private applications for development
- Deploy static sites to SweatStack Pages
SweatStack Skills
Install SweatStack Skills in your AI coding agent, and it knows how to use the CLI.
Installation¶
curl -LsSf sweatstack.no/install-cli | sh
powershell -ExecutionPolicy ByPass -c "irm sweatstack.no/install-cli-windows | iex"
The installer uses uvx.sh.
Verify the installation:
sweatstack --version
Alternative: install from PyPI
If you prefer, install it from PyPI with uv:
uv pip install sweatstack-cli
Authentication¶
Before you use the CLI, sign in with your SweatStack account:
sweatstack login
This opens your browser for the OAuth2 sign-in. When it completes, the CLI stores your credentials locally.
If your account has a passkey, your browser also asks for it. If a command later says that it needs your passkey, run sweatstack login and then the command again. See Protect your developer account. This needs CLI 0.14.0 or later.
Other auth commands:
| Command | Description |
|---|---|
sweatstack logout |
Remove stored credentials |
sweatstack status |
Show the signed-in user, the authentication status and the CLI version |
Commands¶
app create, app link and page init write the application, and its Page if it has one, to a sweatstack.toml file in the current directory. page serve and page deploy read their defaults from it.
Start a Pages app¶
Create an application, its Page and a working app in one command:
sweatstack page init "My App"
This creates a private application with a Page at my-app.pages.sweatstack.dev, and writes public/index.html: an app that signs in with SweatStack and plots the user's latest activity. If sweatstack.toml already names an application, page init uses that application. To use another application you have, add --client-id. If index.html exists, page init stops; add --force to overwrite it.
Preview a page locally¶
sweatstack page serve
This serves the directory from sweatstack.toml on a free port and prints the URL, for example http://localhost:8000. Open that URL, not 127.0.0.1: the application's redirect URIs allow localhost.
Deploy static sites¶
Deploy a static site to SweatStack Pages:
sweatstack page deploy
This uploads every file in the directory from sweatstack.toml to the Page from sweatstack.toml. Without a sweatstack.toml, give the Page slug and the directory:
sweatstack page deploy myapp --dir dist
This uploads every file in the dist directory to your Page at myapp.pages.sweatstack.dev.
Create pages first
Create the page on your app's Pages tab (open the app from Settings → API) before you deploy to it.
Create applications¶
Create an application:
sweatstack app create "My App"
Common options:
# Link the app to a SweatStack Page (sets the redirect URI for you)
sweatstack app create "My App" --page myapp
# Create a client secret, for confidential clients
sweatstack app create "My App" --secret
# Write the credentials to a .env file
sweatstack app create "My App" --secret --env
# Print JSON, for scripting
sweatstack app create "My App" --json
Full example with all options
sweatstack app create "My Streamlit App" \
--page my-streamlit-app \
--secret \
--env-file .env.local
This creates an application with:
- Name: "My Streamlit App"
- Redirect URIs:
http://localhostandhttps://my-streamlit-app.pages.sweatstack.dev. Each one also allows its sub-paths, such as/callback. - A client secret
- Credentials written to
.env.local
Info
This command creates a private application that only you can use, and prints a link to the app's Overview tab as the next step. To make an app public, fill in its Consent screen tab. See Going live.
Link a directory to an application¶
sweatstack app link
This lists your applications and writes the one you select to sweatstack.toml. Add --force to replace an existing sweatstack.toml.
Getting help¶
Every command supports --help:
sweatstack --help
sweatstack app --help
sweatstack app create --help