Skip to main content

Command-line interface for SweatStack — the sports data platform for developers

Project description

SweatStack CLI

Command-line interface for SweatStack — the sports data platform for developers.

Installation

pip install sweatstack-cli

Requires Python 3.13+.

Quick Start

# Authenticate with SweatStack
sweatstack login

# Check who you're logged in as
sweatstack whoami

# Deploy a static site
sweatstack pages deploy ./dist --prod

# View authentication status
sweatstack status

# Logout
sweatstack logout

Commands

Authentication

Command Description
sweatstack login Authenticate via browser
sweatstack login --force Force re-authentication
sweatstack logout Remove stored credentials
sweatstack whoami Show current user
sweatstack status Show token status and expiry

Pages

Command Description
sweatstack pages deploy <dir> Deploy static site
sweatstack pages deploy --prod Deploy to production
sweatstack pages list List all sites
sweatstack pages delete <name> Delete a site

CI/CD Usage

For automated environments, use environment variables instead of interactive login:

export SWEATSTACK_API_KEY="your-access-token"
export SWEATSTACK_REFRESH_TOKEN="your-refresh-token"

sweatstack pages deploy ./dist --prod

Configuration

Environment Variable Description Default
SWEATSTACK_URL API base URL https://app.sweatstack.no
SWEATSTACK_API_KEY Access token
SWEATSTACK_REFRESH_TOKEN Refresh token

Token Storage

Credentials are stored securely in your OS user data directory:

  • macOS: ~/Library/Application Support/SweatStack/SweatStack/tokens.json
  • Linux: ~/.local/share/SweatStack/SweatStack/tokens.json
  • Windows: %APPDATA%\SweatStack\SweatStack\tokens.json

This location is shared with the sweatstack Python library, so authenticating with either tool works for both.

Development

See DEVELOPMENT.md for development setup and contribution guidelines.

# Install with dev dependencies
uv pip install -e ".[dev]"

# Run tests
pytest

# Lint and format
ruff check . && ruff format .

# Type check
mypy src/sweatstack_cli

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sweatstack_cli-0.3.0.tar.gz (73.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sweatstack_cli-0.3.0-py3-none-any.whl (21.4 kB view details)

Uploaded Python 3

File details

Details for the file sweatstack_cli-0.3.0.tar.gz.

File metadata

  • Download URL: sweatstack_cli-0.3.0.tar.gz
  • Upload date:
  • Size: 73.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.10

File hashes

Hashes for sweatstack_cli-0.3.0.tar.gz
Algorithm Hash digest
SHA256 d2cbb1aba74fda6f14faacf882718d7fc0be4b7d8dbabc62d8168f11eb0117bb
MD5 8b433a29d1bfe1f19a7d9cb8c07d32d4
BLAKE2b-256 b8d09ea350ea110d0d9e2c7da8b11335a7a67202b1c847b1f23f01404600ee65

See more details on using hashes here.

File details

Details for the file sweatstack_cli-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sweatstack_cli-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1abc117a01c7d05b0ce17415d7045a30876f48acc7b4d10a32e2b0dc822011e5
MD5 1ea0335340885aa5a7d1038908267a83
BLAKE2b-256 4a6ab0aabe72de1122a5fb2f52d06929786cc9f54a07fa258c59e3d7a55bb52a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page