Skip to main content

SUM Platform CLI: single control plane for site lifecycle management

Project description

SUM CLI (v3.1)

PyPI

The SUM CLI is the single control plane for deploying and managing SUM Platform client sites on staging and production servers.

Install

pip install sum-cli
sum-platform --version

With Gitea Support

If using Gitea instead of GitHub for repository hosting:

pip install sum-cli[gitea]

Initial Setup

Before using the CLI, configure your infrastructure settings:

sudo sum-platform setup

This interactive command creates /etc/sum/config.yml with your staging/production server settings.

Commands

Command Description Requires Sudo
setup Configure infrastructure settings Yes
init Create new site at /srv/sum/<name>/ Yes
update Pull updates, migrate, restart No (staging)
backup Database and media backup No
promote Deploy staging site to production No
check Validate project setup No
themes List available themes No

Creating Sites

With GitHub

sudo sum-platform init acme --git-provider github --git-org acme-corp

With Gitea

sudo sum-platform init acme --git-provider gitea --git-org clients \
  --gitea-url https://gitea.agency.com

With Gitea (Custom SSH Port)

sudo sum-platform init acme --git-provider gitea --git-org clients \
  --gitea-url https://gitea.agency.com --gitea-ssh-port 2222

Without Git

sudo sum-platform init acme --no-git

Additional Init Options

sudo sum-platform init acme --git-provider github --git-org acme-corp \
  --theme theme_a \
  --profile sage-stone \
  --content-path /path/to/custom/content

Managing Sites

# Update a deployed site (pull, migrate, restart)
sum-platform update acme

# Backup database and media
sum-platform backup acme --include-media

# Promote staging to production
sum-platform promote acme --domain acme.example.com

# Validate project setup
sum-platform check acme

# List available themes
sum-platform themes

Configuration

Global Config (/etc/sum/config.yml)

Infrastructure settings only. Created via sum-platform setup.

agency:
  name: Your Agency Name

staging:
  server: staging.example.com
  domain_pattern: "{slug}.staging.example.com"
  base_dir: /srv/sum

production:
  server: prod.example.com
  ssh_host: 10.0.0.1
  base_dir: /srv/sum

templates:
  dir: /opt/your-ops/infra
  systemd: systemd/sum-site-gunicorn.service.template
  caddy: caddy/Caddyfile.template

defaults:
  theme: theme_a
  seed_profile: starter
  deploy_user: deploy
  postgres_port: 5432

Site Config (/srv/sum/<site>/.sum/config.yml)

Per-site configuration. Auto-created when you run init.

GitHub site:

site:
  slug: acme
  theme: theme_a
  created: 2026-02-03T14:30:00Z

git:
  provider: github
  org: acme-corp

Gitea site:

site:
  slug: acme
  theme: theme_a
  created: 2026-02-03T14:30:00Z

git:
  provider: gitea
  org: clients
  url: https://gitea.agency.com
  ssh_port: 2222
  token_env: GITEA_TOKEN

No-git site:

site:
  slug: acme
  theme: theme_a
  created: 2026-02-03T14:30:00Z

git: null

Git Provider Setup

GitHub

Requires the GitHub CLI (gh) to be installed and authenticated:

gh auth login

Gitea

Set the API token environment variable:

export GITEA_TOKEN=your-token-here

Or use a custom environment variable name:

sudo sum-platform init acme --git-provider gitea --git-org clients \
  --gitea-url https://gitea.agency.com --gitea-token-env MY_GITEA_TOKEN

Development Install (monorepo)

pip install -e ./cli

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

sum_cli-3.1.0.tar.gz (126.1 kB view details)

Uploaded Source

Built Distribution

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

sum_cli-3.1.0-py3-none-any.whl (115.2 kB view details)

Uploaded Python 3

File details

Details for the file sum_cli-3.1.0.tar.gz.

File metadata

  • Download URL: sum_cli-3.1.0.tar.gz
  • Upload date:
  • Size: 126.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sum_cli-3.1.0.tar.gz
Algorithm Hash digest
SHA256 6240b70654cca2c408ba4aec8aaaed57cd9e179ad57bc1dc83bb1d1b71a12b47
MD5 972e9d2802f3e8466767d9ded660c2b2
BLAKE2b-256 8a211a809d1d829f014739c54b5ffe0728945f3f26a9dd94ff390899ef299994

See more details on using hashes here.

File details

Details for the file sum_cli-3.1.0-py3-none-any.whl.

File metadata

  • Download URL: sum_cli-3.1.0-py3-none-any.whl
  • Upload date:
  • Size: 115.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sum_cli-3.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 77421bcf7c69ba5911a90a3d1be69468826e2b173bbf9209a01e62096fb04a93
MD5 8f6ff9abbd765b3455d8b763f1dd2797
BLAKE2b-256 2b391929d94f61e8be7e61f7501e2a4742eafe8e6688762d658573d6b1c1f05e

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