1. Scaffold a project
If you want a starting point instead of a blank directory:minimalfor the smallest runnable appchatbotfor a BAML-backed assistantdashboardfor chat plus a React page
2. Authenticate once
3. Start the live dev loop
Serve the app:serve, Capsule:
- resolves the entry point
- uploads your source tree
- boots a live runtime
- hot-reloads when watched files change
- regenerates page type stubs when needed
4. Bind external channels during local testing
If you have a named channel resource already:5. Create workspace assets
As your app grows, these commands become part of the normal loop:6. Deploy a version
When you are happy with the local behavior:cpsl.App plus everything it references:
- runtime image packages and commands
- pages and data handlers
- collections, settings, and integrations
- schedules
- secrets and mounted filesystems
- pricing and keep-warm configuration
7. Smoke test the deployed app from Python
Capsule also ships a simple programmatic client:8. Inspect deployed apps
Theapp command group helps you inspect what is already in the workspace:
app create at first and let capsule deploy handle the deploy flow from code.
9. A practical local-to-prod loop
The normal Capsule workflow looks like this:- edit
app.pyand anypages/*.tsxfiles - run
capsule serve app:app - test the chat, pages, tasks, and integrations
- create or update secrets, channels, and filesystems as needed
- run
capsule deploy app:app - smoke test with the web UI or
cpsl.Client
Common pitfalls
serveanddeployboth expect an entry point likemodule:symbol.- Functional apps require
image=oncpsl.App(...). - React pages need the correct
component=path relative to the project root. - External channels should use named
cpsl.Channel("name")resources rather than deprecated inline channel classes. - If a command says you are not logged in, run
capsule loginagain.
Next steps
- Learn the app surface in App API Reference
- Review every command in CLI Reference
- Combine the dev loop with Tasks And Schedules and React Pages And Theme