
Codna — repository intelligence
io.github.thyn-ai由 GitHub 帳號 thyn-ai 發布v0.2.112更新於 Nov 7, 2026
Repo intelligence: triage, fix PRs, SARIF reachability, recall. Free codna login to execute.
概覽
Codna 為助理提供儲存庫智慧:把問題定位到可疑檔案、規劃修正、判斷 SARIF 掃描結果是否可達,並從本機記憶召回程式碼。
- 可以做什麼
- 以確定性方式分析儲存庫並找出與某個問題相關的程式碼,不消耗 LLM token
- 以唯讀方式證明哪些 SARIF 掃描結果(CodeQL、Semgrep、Snyk、Trivy)確實可達
- 透過語意與詞彙搜尋從裝置端記憶召回程式碼,完全離線
- 找出根因並規劃修正,預設為唯讀,也可推送分支並建立真實的拉取請求
- 向廠商的意見回饋儲存庫提交缺陷、功能請求或問題
- 適用情境
- 適合助理在程式碼庫中工作時使用:需要找出某個缺陷回報背後的檔案、判斷掃描告警是否真的可達、從本機記憶檢索相關程式碼,或產生修正並選擇性地送出拉取請求。
- 執行需求
- 本機 Python 套件(pip、pipx 或 uv),需 Python 3.12-3.13,僅支援 macOS Apple 晶片與 Linux x86_64,PATH 中需有 git;以 stdio 方式執行。執行任何工具都需要一次免費的 codna login。codna_fix 另需模型供應商金鑰,例如 ANTHROPIC_API_KEY、OPENAI_API_KEY 或 GEMINI_API_KEY;open_pr=true 與 codna_report_bug 需要 GITHUB_TOKEN。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Codna — repository intelligence,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
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
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:
Commands
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:
Five tools, each returning JSON; a failure comes back as codna_<tool> error: … text and never
crashes the server:
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
impactrun offline. No model is involved. fixandreviewsend 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-closedincodna.yamlrefuses to run tests without network denial and skips registry lookups during review.- Source distributions exclude runtime binaries, keys,
.envfiles and logs.
Links
- Homepage: https://codna.ai
- Documentation: https://docs.codna.ai
- Source (public mirror): https://github.com/thyn-ai/codna-cli
- Security: https://codna.ai/security
來源:README.md,提交 f8cd448
工具
0版本歷史
16- v0.2.112最新Nov 7, 2026
- v0.2.106Nov 6, 2026
- v0.2.104Nov 5, 2026
- v0.2.98Nov 5, 2026
- v0.2.97Nov 5, 2026
- v0.2.96Nov 1, 2026
- v0.2.95Oct 26, 2026
- v0.2.94Oct 16, 2026
- v0.2.93Oct 11, 2026
- v0.2.90Sep 28, 2026
- v0.2.89Sep 25, 2026
- v0.2.87Sep 24, 2026
- v0.2.86Sep 24, 2026
- v0.2.85Sep 23, 2026
- v0.2.84Sep 23, 2026
- v0.2.83Sep 23, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分