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 Key needed
codna_triage Understand a repo and locate the code relevant to an issue. Deterministic, 0 LLM tokens. none
codna_secure Prove which SARIF scanner findings (CodeQL, Semgrep, Snyk, Trivy) are reachable. Read-only, 0 LLM tokens. none
codna_recall Recall code from local on-device memory — semantic + lexical search, fully offline. no key — one-time free codna login (device authorization)
codna_fix Root-cause and plan a fix (read-only by default); with open_pr=true pushes a branch and opens a real PR. provider key (+ GITHUB_TOKEN for open_pr=true)
codna_report_bug File a bug, feature, or question to thyn-ai/feedback. GITHUB_TOKEN (else returns a pre-filled URL)

Introspection (initialize/tools/list) needs no credentials. Executing tools requires a free community login (codna login — one-time device authorization that installs the on-device runtime) — fully offline thereafter. Zero-credential exceptions: codna_triage and codna_secure run fully local with no login and no key. 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. 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 — it provisions 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.

Release files for codna 0.2.84

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.84
File Size Uploaded
codna-0.2.84.tar.gz 3.9 MB Details

Built distributions (wheels)

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

Total release size: 97.8 MB

Release files / codna-0.2.84.tar.gz

Download URL codna-0.2.84.tar.gz
Size 3.9 MB
Tags Source
SHA-256 checksum
How to use checksums
69248aa1caf53615bb43fe6872d1b3c06c37d7566c7aa32ebe24fcb25db45c72
BLAKE2b-256 checksum
How to use checksums
4f76b36fe8f7694300029d164240458bb3dddf87d3be1fb71c562f989aff2a0e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

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

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

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

Download URL codna-0.2.84-py3-none-macosx_14_0_arm64.whl
Size 29.7 MB
Tags Python 3 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
0bff0862f3aee685ce17d3ad8e6df65c6c88db7d0e27163318859a5f63b9e9ae
BLAKE2b-256 checksum
How to use checksums
965d0c8c038041021b0975aab98bf19f7775f1bd50d64cbfdf4160c91cea4b78
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

0.2.87

3 release files

0.2.86

3 release files

0.2.85

3 release files

This release

0.2.84 This release

3 release files

0.2.83

3 release files

0.2.82

3 release files

0.2.81

3 release files

0.2.80

3 release files

0.2.79

3 release files

0.2.78

3 release files

0.2.77

3 release files

0.2.76

3 release files

0.2.75

3 release files

0.2.74

3 release files

0.2.73

3 release files

0.2.72

3 release files

0.2.71

3 release files

0.2.70

3 release files

0.2.69

3 release files

0.2.68

3 release files

0.2.67

3 release files

0.2.66

3 release files

0.2.65

3 release files

0.2.64

3 release files

0.2.63

3 release files

0.2.62

3 release files

0.2.61

3 release files

0.2.60

3 release files

0.2.59

3 release files

0.2.58

3 release files

0.2.57

3 release files

0.2.56

3 release files

0.2.55

3 release files

0.2.54

3 release files

0.2.53

3 release files

0.2.52

3 release files

0.2.51

3 release files

0.2.50

3 release files

0.2.49

3 release files

0.2.48

3 release files

0.2.47

3 release files

0.2.46

3 release files

0.2.45

3 release files

0.2.44

3 release files

0.2.43

3 release files

0.2.42

3 release files

0.2.41

3 release files

0.2.40

3 release files

0.2.39

3 release files

0.2.38

3 release files

0.2.37

3 release files

0.2.36

3 release files

0.2.35

3 release files

0.2.34

3 release files

0.2.33

3 release files

0.2.32

3 release files

0.2.31

3 release files

0.2.30

3 release files

0.2.29

3 release files

0.2.28

3 release files

0.2.27

3 release files

0.2.26

3 release files

0.2.25

3 release files

0.2.24

3 release files

0.2.23

3 release files

0.2.22

3 release files

0.2.21

3 release files

0.2.20

3 release files

0.2.19

3 release files

0.2.18

3 release files

0.2.17

3 release files

0.2.16

3 release files

0.2.15

3 release files

0.2.14

3 release files

0.2.13

3 release files

0.2.12

3 release files

0.2.11

3 release files

0.2.10

3 release files

0.2.9

3 release files

0.2.8

3 release files

0.2.7

3 release files

0.2.6

3 release files

0.2.5

3 release files

0.2.4

3 release files

0.2.3

3 release files

0.2.2

3 release files

0.2.1

3 release files

0.2.0

3 release files

0.1.49

3 release files

0.1.48

3 release files

0.1.47

3 release files

0.1.46

3 release files

0.1.45

3 release files

0.1.44

3 release files

0.1.43

3 release files

0.1.42

3 release files

0.1.41

3 release files

0.1.40

3 release files

0.1.39

3 release files

0.1.38

3 release files

0.1.37

3 release files

0.1.36

3 release files

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