cpsl, the Python app API you use to define handlers, pages, collections, tasks, channels, and pricingcapsule, the CLI that talks to the Capsule platform forlogin,serve,deploy, secrets, channels, and filesystems
Requirements
- Python
3.10+ - a virtual environment or
uvproject - access to a Capsule workspace if you want to
serve,deploy, manage secrets, create channels, or mount filesystems
Install with uv
If you useuv, add Capsule to your project:
Install with pip
Verify the CLI
Authenticate to your workspace
Before you use the Capsule platform from your local machine, log in:serve, deploy, secret, channel, and fs commands can talk to Capsule.
This step matters earlier than people often expect. capsule serve is not just a local script runner. It boots the Capsule dev loop around your app definition, so workspace auth is part of the normal setup.
If you are targeting a local gateway, set the gateway URL first:
Scaffold a project
To start from a template instead of a blank file:minimalfor a tiny message handlerchatbotfor a BAML-backed chat appdashboardfor chat plus a custom React page
What gets installed
Thecpsl package includes both the Python app API and the CLI:
cpsl.App,cpsl.Session,cpsl.Image,cpsl.Secret, and the rest of the app-building surface- the
capsuleCLI for workspace auth, live serve, deploys, secrets, channels, and filesystems
Next steps
- Follow the Quickstart to go from one Python file to a live Capsule app.
- Read Why Capsule if you want the platform story before diving into APIs.
- Use First Chat App if you want a fuller walkthrough.
- See CLI Reference for every command and subcommand.