Installation
What this page is: Step-by-step COGANT installation instructions for PyPI, source, and editable/development setups, including optional extras.
Prerequisites: Python 3.11+ and pip (or
uv/pipx).Reading time: ~5 minutes
Next steps: Quick Start · Tutorial 1: Quickstart · API quick start
COGANT targets Python 3.11+ and ships a Typer-based CLI (cogant) plus a stable Python API (cogant.api).
From PyPI (when available)
Not yet published. COGANT is not on PyPI yet, so the two commands in this section apply once the release is published. Use one of the source installs below today.
pip install cogant
With all optional extras (visualization, multi-language parsers, dev tools):
pip install "cogant[all]"
Extras
| Extra | Contents | When to install |
|---|---|---|
dev |
pytest, pytest-cov, ruff, mypy |
contributing |
viz |
plotly, matplotlib, jinja2 |
HTML site + PNG export |
multilang |
tree-sitter Python / JS / TS grammars |
non-Python repos |
all |
everything above | full experience |
From source (uv, recommended)
git clone https://github.com/ActiveInferenceInstitute/COGANT.git
cd cogant
uv sync --all-extras
uv run cogant --help
From source (pip)
git clone https://github.com/ActiveInferenceInstitute/COGANT.git
cd cogant
pip install -e ".[dev,viz]"
cogant --help
Verify the install
cogant --help # authoritative command index, including finite, plugin, and migrate groups
cogant scan . # run a minimal static analysis on the current directory
If cogant --help lists subcommands, the install is working. Leaves: 29 runnable subcommands in total — the two groups add plugin list, plugin info, and migrate migrate under the 26 @app.command registrations. The analysis and artifact commands (analyze-static, analyze-graph, visualize, export) run real package APIs and write JSON/diagram/export files — see CLI reference. If the cogant entry point is missing or --help fails, re-check Python 3.11+ and that the venv containing COGANT is activated.