Development workflow¶
A Cobra4 project usually starts with a template, then uses the same compiler path from the CLI, Studio, tests, and CI.
Start a project¶
Useful templates:
| Template | Use it for |
|---|---|
http-service |
API handlers and serve workflows. |
etl-pipeline |
read / transform / save data jobs. |
daemon |
every, on event from, scheduler, and queue work. |
agent |
LLM agent examples with a mock provider. |
List templates with:
Daily loop¶
Use c4 run FILE --watch while iterating on one entry point. Use
c4 studio when you want the project tree, snippets, terminal, graph,
and generated Python/source-map view in one place.
Inspect generated Python¶
Studio shows the same generated Python interactively and highlights the mapping between Cobra4 source lines and generated Python lines.
Dependencies and plugins¶
cobra4.toml is the project root signal. It can declare runtime
dependencies, language plugins, secrets backend, and host inventory.
c4 doctor checks declared dependencies and configured language plugins,
then reports missing optional extras as informational warnings.
Daemons and services¶
For long-running files that contain every, on event from, or serve
handlers:
During development you can still smoke-test the same file with:
CI baseline¶
A minimal CI job should run:
For libraries or deployment scripts, also build the generated Python: