Skip to main content

stml — the partner CLI

Pull an app you built on the platform down to a local folder, edit it with your own editor and git, push it back to test, and publish a finished version to the App Store — without cloning the stml4 monorepo.

Spec: docs/user-stories/feature/024-app-authoring-platform.md.

Requirements

  • Python 3.11 or newer on your PATH. That's the only hard requirement.
    • macOS: brew install python@3.12 (or python.org). Not the system /usr/bin/python3 — it's often 3.9, which is too old.
    • Linux: your distro's Python 3.11+, or pipx/pyenv/uv.
    • Windows 10/11: the python.org installer (gives you the py launcher).

Install

Method Command
pipx (recommended) pipx install stml-cli
pip (in a venv) pip install stml-cli
single file (no installer) curl -fsSL <backend>/cli/stml -o stml && chmod +x stml

Runs on macOS, Linux, and Windows — it's pure-Python and touches nothing platform-specific beyond the filesystem and HTTPS.

Quickstart

# Talks to https://api.stml.io by default — nothing to set.
# Override only for local dev:  export STML4_BACKEND=http://localhost:8010

# 1. Sign in — opens your browser; approve, and a session is cached locally.
stml login
stml whoami

# 2. See your apps and their URLs (the handle you pull/push by).
stml list

# 3. Pull an app's source into a folder — identify it by its URL (copy from
#    `stml list` or the browser; a trailing /flows/… or /sessions/… is fine).
stml pull https://app.stml.io/orgs/acme/ws/main/apps/my-app-a1b2 ./my-app

# 3. Edit with your own tools, commit to git, whatever.

# 4. Push it back — checks, writes the overlay, and deploys in one step.
stml push ./my-app          # app remembered from pull
#   or: stml push https://app.stml.io/orgs/acme/ws/main/apps/my-app-a1b2 ./my-app

# 5. When ready, publish a version to the App Store.
#    (bump project.version in pyproject.toml first; set [tool.stml].issuer-org)
stml publish ./my-app

Authentication

stml login runs the platform's browser OAuth flow: you authenticate in the browser, approve, and a refresh token is cached under your OS config dir (~/Library/Application Support/stml, $XDG_CONFIG_HOME/stml, or %APPDATA%\stml). Access tokens are minted per-command and never written to disk.

STML4_TOKEN, if set, overrides the cache verbatim — how CI and the monorepo (STML4_TOKEN=$(npm run --silent token)) authenticate.

Commands

Command What
stml login / logout / whoami session auth
stml list [--workspace <ws>] list your apps with mode + app URLs
stml status <app-url> one app's mode (attached / detached / scratch) + provenance
stml pull <app-url> [<dir>] pull an app to a folder — src/ library layout, page, assets (bare slug also works)
stml push [<app-url>] <dir> push a folder to the overlay and deploy (--no-deploy, --prune)
stml detach <app-url> fork an installed app: own the full source, stop library updates (reversible)
stml revert <app-url> [--yes] ⚠️ discard every customisation, restore the clean library version
stml publish <dir> [--org <slug>] publish a library version from a folder
stml init <dir> [--name <name>] scaffold a new library directory

Authoring & collaboration walkthrough (modes, forking, team workflow): docs/guides/authoring-apps.md.

Download files

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

Source Distribution

stml_cli-0.1.8.tar.gz (24.6 kB view details)

Uploaded Source

Built Distribution

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

stml_cli-0.1.8-py3-none-any.whl (22.8 kB view details)

Uploaded Python 3

File details

Details for the file stml_cli-0.1.8.tar.gz.

File metadata

  • Download URL: stml_cli-0.1.8.tar.gz
  • Upload date:
  • Size: 24.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.8

File hashes

Hashes for stml_cli-0.1.8.tar.gz
Algorithm Hash digest
SHA256 426c7e9acd11ab81938763e0b661a5329feeb88478684b83e9af849b88c59e9d
MD5 54d8da6bbc7855f7baaac79a2787bdec
BLAKE2b-256 6e420cb9f6ebf02a49866b81da74658fdbbef23970bc8b1ac4327a9c869914e7

See more details on using hashes here.

File details

Details for the file stml_cli-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: stml_cli-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 22.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.8

File hashes

Hashes for stml_cli-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 33880b51ce0bbb7910d5879d0d7f960146f84035fa7a29070f9caf3b3e38e1b8
MD5 e65ed5f8c96ad13314a7e517e373768f
BLAKE2b-256 828dcf4e318d1dfb37a1c4ffa7deb60214ad6b50fb6ebffc87bfdc37a14661bf

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