Skip to main content

Codna

Understand. Fix. Evolve.

Agents read your code. Codna understands it.

Codna maps a repository before it spends a token. It then reviews pull requests, fixes bugs and proves which scanner findings are reachable. The same codna command runs on your machine, in the GitHub Action and behind the GitHub App.

Runs on your machine or your cloud. Your code never leaves without your key.

Install

pip install codna          # or: pipx install codna · uv tool install codna
codna --version

Python 3.12–3.13. Wheels for macOS on Apple silicon and Linux x86_64. git on your PATH. Nothing else to install: no Node, Bun, Docker or server. The agent runtime ships inside the wheel.

Local commands need no Codna key. fix and review use your own model provider key, stored in the OS keychain and never printed:

codna key set anthropic    # also: openai, gemini, google, groq, mistral, openrouter, xai, cursor

Commands

codna triage . --issue "checkout total is wrong"     # suspect files. Deterministic. 0 LLM tokens.
codna review . --pr 123 --post                        # findings with a verdict on the pull request
codna fix . --tests --apply --max-iterations 3        # patch, re-run your tests, re-fix until green
codna fix <git url> --ref <sha> --issue "…" --open-pr # push a branch and open a pull request
codna secure . --from-sarif results.sarif             # which scanner findings are reachable. 0 LLM tokens.

codna fix prints the root cause, the impacted symbols, the blast radius, its confidence and a regression risk. --open-pr needs a git URL and a GitHub write token. codna review posts one inline comment per finding with severity, category and a suggestion block, and an Approve when the diff is clean at medium and high. codna secure reads SARIF 2.1.0 from CodeQL, Semgrep, Snyk, Trivy or any other scanner.

Other commands: init, status, doctor, login, key, impact, memory export, report. Full reference: docs.codna.ai/reference/cli.

MCP server

Run Codna as a Model Context Protocol server over stdio — the same engine the CLI uses, inside Cursor, Claude Desktop, or your own agent:

pipx install "codna[mcp]"       # or: pip install "codna[mcp]"
codna mcp                       # serve over stdio
codna mcp install --client cursor     # optional: write the client config for you (or --client claude)

Five tools, each returning JSON; a failure comes back as codna_<tool> error: … text and never crashes the server:

Tool What it does Needs
codna_triage Understand a repo and locate the code relevant to an issue. Deterministic, 0 LLM tokens. free codna login
codna_secure Prove which SARIF scanner findings (CodeQL, Semgrep, Snyk, Trivy) are reachable. Read-only, 0 LLM tokens. free codna login
codna_recall Recall code from local on-device memory — semantic + lexical search, fully offline. free codna login (which also installs the on-device runtime)
codna_fix Root-cause and plan a fix (read-only by default); with open_pr=true pushes a branch and opens a real PR. free codna login + provider key (BYOK; + GITHUB_TOKEN for open_pr=true)
codna_report_bug File a bug, feature, or question to thyn-ai/feedback. free codna login + GITHUB_TOKEN (else returns a pre-filled URL)

Introspection (initialize/tools/list) needs no credentials. Executing any of the five tools requires the one-time free community login (codna login — device authorization, free community license) — fully offline thereafter. codna_fix additionally needs a provider key (BYOK, e.g. ANTHROPIC_API_KEY); codna_report_bug needs GITHUB_TOKEN or it returns a pre-filled issue URL; codna_recall additionally uses the on-device memory runtime that the same codna login installs. Full reference: docs.codna.ai/guides/mcp.

Code memory

Code memory and recall run on your machine after a one-time free codna login (device authorization), which also installs the signed on-device runtime. From then on, recall runs fully offline: no key, no network calls. The optional codna[memory] extra adds the on-device semantic reranker; without it, recall ranks lexically.

What leaves your machine

  • Repository mapping, triage, recall and impact run offline. No model is involved.
  • fix and review send one issue-specific evidence bundle to the provider you chose, under your key. Not the repository.
  • Secret redaction is always on and cannot be turned off.
  • privacy.egress: fail-closed in codna.yaml refuses to run tests without network denial and skips registry lookups during review.
  • Source distributions exclude runtime binaries, keys, .env files and logs.

Metadata

Release files for codna 0.2.113

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for codna 0.2.113
File Size Uploaded Provenance Actions
codna-0.2.113.tar.gz 5.9 MB Without provenance Details for codna-0.2.113.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for codna 0.2.113
File Interpreter ABI Platform Actions
codna-0.2.113-py3-none-manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.28+ x86-64 Details for codna-0.2.113-py3-none-manylinux_2_28_x86_64.whl
codna-0.2.113-py3-none-macosx_14_0_arm64.whl Python 3 none macOS 14.0+ ARM64 Details for codna-0.2.113-py3-none-macosx_14_0_arm64.whl

Total release size: 86.1 MB

Release files / codna-0.2.113.tar.gz

Download URL codna-0.2.113.tar.gz
Size 5.9 MB
Tags Source
SHA-256 checksum
How to use checksums
4ac627f73910dc81cd142ef99f9d9e22c14e7a870ab6587863de1ad52ab75990
BLAKE2b-256 checksum
How to use checksums
f260f3c6e35d7dba45c934f82b343285689cba6210c741352e5c48aca71bbf06
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.2

Release files / codna-0.2.113-py3-none-manylinux_2_28_x86_64.whl

Download URL codna-0.2.113-py3-none-manylinux_2_28_x86_64.whl
Size 48.1 MB
Tags Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
ff61500423b4c78e4ff83c4b094ded0966372342772e6a7686492e2d0b960811
BLAKE2b-256 checksum
How to use checksums
c029a205f949288cf68e9624e61a9dd75fab278384dc2bae40b2cc6c8c44d6a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.2

Release files / codna-0.2.113-py3-none-macosx_14_0_arm64.whl

Download URL codna-0.2.113-py3-none-macosx_14_0_arm64.whl
Size 32.1 MB
Tags Python 3 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
2defa11b381bc873a0f1db3025113fd400eed3204edd1c40459eb399a9f640a1
BLAKE2b-256 checksum
How to use checksums
c1a6732381f4dcc480adff195096713c3f7db745dfefc9376c93bbeef23a2e90
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.2

Security for codna 0.2.113

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.113 This release

3 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page