Skip to content

Installation

cobra4 needs Python ≥ 3.11.

With pip

pip install cobra4

This installs two console scripts on your PATH: c4 (short) and cobra4 (alias).

c4 --version
# cobra4 0.1.0
pipx install cobra4

pipx keeps c4 separate from your system Python and lets you upgrade or remove it cleanly.

Optional extras

cobra4 has optional features behind pip extras:

pip install "cobra4[aws]"     # boto3 → S3 reads, SQSQueue, AWS Lambda deploy
pip install "cobra4[data]"    # pandas + pyarrow → parquet & DataFrame
pip install "cobra4[ssh]"     # paramiko → fleet.run over SSH
pip install "cobra4[yaml]"    # pyyaml → lang use yaml + read .yml
pip install "cobra4[otel]"    # OpenTelemetry → log export
pip install "cobra4[dev]"     # pytest + black for development

You can combine them: pip install "cobra4[aws,data,ssh]".

VS Code extension

The VS Code extension is in the repository at editor/vscode/cobra4. A Marketplace release is planned. For now, install the local .vsix:

git clone https://github.com/cobra4-lang/cobra4.git
cd cobra4/editor/vscode/cobra4
npm install
npx vsce package
code --install-extension cobra4-0.1.0.vsix

The extension activates on .c4 files, attaches to c4 lsp for diagnostics / hover / completion / signature help, and registers Run / Build / Format / Check / Test commands.

From source

git clone https://github.com/cobra4-lang/cobra4.git
cd cobra4
pip install -e ".[dev]"
pytest -q          # run the test suite