CLI
When you install Protean, you also get a handy command line interface - the protean script - in your virtualenv. Driven by Typer, the script gives access to commands that can help you scaffold projects, generate new code, and run background servers. The --help option will give more information about any commands and options.
Most commands accept a domain instance to load and initialize, prepping it for
shell access. The --domain option is used to specify how to
load the domain.
| Command | |
|---|---|
protean new |
Creating a domain |
protean shell |
Working with the shell |
protean server |
Running an async background server |
protean observatory |
Running the observability dashboard |
protean db setup |
Create all database tables |
protean db drop |
Drop all database tables |
protean db truncate |
Delete all data, preserve schema |
protean db setup-outbox |
Create only outbox tables |
protean snapshot create |
Create snapshots for ES aggregates |
protean projection rebuild |
Rebuild projections from events |
protean events read |
Read and display events from a stream |
protean events stats |
Show stream statistics across the domain |
protean events search |
Search for events by type |
protean events history |
Display aggregate event timeline |
Note
Developing Protean: There are a few additional commands to help you if you want to contribute to Protean.
| Command | |
|---|---|
protean docs |
Documentation helpers |
protean test |
Framework test runner |