AI Code Transparency Tool - detect AI-written code and measure developer understanding
Project description
๐งฌ CodeDNA โ AI Code Transparency Tool
Understand every line of code you commit. Is it really yours, or AI's?
Detect which code was written by AI, measure how well developers actually understand their commits, and map out "understanding debt" across your entire team.
Quick Start โข Features โข Commands โข Pricing โข Docs
๐ฏ The Problem
In 2026, developers write 78% of their code with AI help (Copilot, Cursor, ChatGPT, Claude). The result?
- ๐ฐ "Understanding Debt" โ Code is committed, but no one actually knows how it works
- ๐ Bus Factor = 1 โ Everyone uses the same AI, no one understands the codebase
- ๐ฐ Technical Debt Explosion โ Without human review, AI-generated code decays fast
- ๐ Bug Multiplication โ 3 months later: "Who wrote this? I don't even know what it does"
CodeDNA solves this. Every commit is scored. Every developer is measured. Every team gets visibility.
โจ Features
๐ AI Detection (4-metric fingerprint)
CodeDNA uses 4 heuristics to detect AI-generated code:
| Metric | AI Signature | Score |
|---|---|---|
comment_ratio > 0.3 |
AI over-comments its code | +0.20 |
avg_function_length > 50 |
AI produces large monolithic blocks | +0.15 |
single_commit_ratio > 0.7 |
Bulk-paste commits are AI-red flag | +0.30 |
| High complexity + single commit | AI imzasฤฑ โ +0.25 |
Total > 0.50 โ AI suspected. Combined with Tree-sitter AST analysis, this gives 80%+ accuracy.
๐ค Developer Understanding Score
- Interview-based โ Structured Q&A after each commit
- AI-powered โ Generates questions about the code you just committed
- Tracked over time โ See your understanding curve
๐ Bus Factor Analysis
- Ownership tracking โ Who owns which file?
- Risk identification โ Single points of failure
- Refactoring suggestions โ "Pair X with Y on module Z"
๐ฐ Technical Debt Estimation
- Cost in USD โ How much would it cost to fix this?
- Trend over time โ Is debt increasing?
- Prioritization โ What to fix first?
๐ Sprint Health
- Velocity tracking โ Real commits vs. AI-assisted
- Code review load โ Who reviews what?
- Quality metrics โ Per-sprint scoring
๐ค AI Tool Comparison (Enterprise)
- Copilot vs. Cursor vs. ChatGPT โ Which tool produces more debt?
- Per-developer breakdown โ Who uses what?
- Productivity vs. quality โ Real metrics
๐ฏ Interview Tool (Enterprise)
- Auto-generates questions โ "What does this function do? Why?"
- Records responses โ For HR and compliance
- Exportable reports โ PDF/CSV
๐ Developer Onboarding
- Ramp-up curve โ How long to productivity?
- Mentor matching โ AI suggests pairs
- First PR analysis โ What did they ship?
๐ก๏ธ Protected Modules
- Mark critical files โ "AI may not touch auth/, payment/, security/"
- Pre-commit hook โ Blocks AI-generated commits to protected areas
- Override workflow โ With approval
๐ Web Dashboard
- Real-time metrics โ Live commit feed
- Charts โ Time-series, breakdowns, comparisons
- Multi-repo view โ All your projects in one place
- Team analytics โ Who's growing, who's stagnating
๐ฌ Multi-Channel Support
- Telegram bot โ
/codedna scanfrom your phone - WhatsApp โ Slash-prefix commands
- iMessage โ Direct Mac integration
- Discord/Slack โ Webhook support
๐ Quick Start
Installation
# PyPI'den
pip install codedna
# Veya uv ile (daha hizli)
uv pip install codedna
# Veya gelistirme ortamindan
git clone https://github.com/natureco-official/codedna.git
cd codedna
pip install -e .
First Use (60 seconds)
# 1. Git repo'ya git
cd your-awesome-project
# 2. CodeDNA'yi baslat (git hook + DB olusturur)
codedna init
# 3. Repoyu tara
codedna scan
# 4. Son commit skorunu gor
codedna status
# 5. Gecmis commit'leri gor
codedna history
That's it. Every commit from now on is auto-analyzed.
Run the Dashboard (optional)
# Web dashboard (port 3000) + REST API (port 8000)
codedna dashboard
# Then open http://localhost:3000
# Login with your account or register new
๐ Commands (25 total)
๐ Analysis & Reporting
codedna init # Git hook + DB olustur
codedna scan # Repoyu tara
codedna status # Son commit skoru
codedna history # Gecmis commit'ler
codedna report # HTML rapor olustur
codedna ai-compare # AI arac karsilastirmasi (Enterprise)
๐ก๏ธ Protection & Policies
codedna protect-add <path> # Korunan modul ekle
codedna protect-remove <path> # Korumayi kaldir
codedna protect-list # Korunan modulleri listele
codedna protect-check <file> # Dosya korunuyor mu?
๐ฅ Team & Process
codedna onboarding # Gelistirici ramp-up (Team+)
codedna interview-start # Mulakat baslat (Enterprise)
codedna interview-list # Mulakatlari listele
codedna interview-score # Mulakat skorla
codedna bus-factor # Sahiplik analizi (Team+)
codedna debt # Teknik borc (Team+)
codedna sprint-olustur # Sprint olustur
codedna sprint-sagligi # Sprint sagligi
codedna sprint-gecmisi # Sprint gecmisi
๐ Infrastructure
codedna serve # FastAPI REST (port 8000)
codedna dashboard # Web dashboard (port 3000)
codedna pr-comment # GitHub PR yorumu
codedna plan # Plan/lisans yonetimi
codedna plan demo pro # 7 gunluk demo Pro lisans
codedna natureco # NatureCo CLI entegrasyonu (Pro+)
codedna uninstall # Hook kaldir
๐ง Utility
codedna doctor # Sistem saglik kontrolu
codedna reset # Sifirla (DANGEROUS)
๐ Pricing
| Plan | Price | Repos | Files/Scan | History | Dashboard | Features |
|---|---|---|---|---|---|---|
| Free | $0 | 1 | 50 | 7 days | โ | AI detection, local only |
| Pro | โบ400/mo | โ | โ | 90 days | โ | + GitHub Actions, NatureCo CLI |
| Team | โบ800/mo | โ | โ | 365 days | โ | + Bus Factor, Sprint, Onboarding |
| Enterprise | โบ1,650/mo | โ | โ | โ | โ | + AI Compare, Interview Tool, SSO |
Start with codedna plan demo pro to test Pro features for 7 days.
Payment via Lemon Squeezy โ TRY pricing for Turkish market, USD for global.
๐ Integrations
CI/CD
- GitHub Actions โ Auto-comment on PR
- GitLab CI โ Pipeline integration
- Bitbucket Pipelines โ Snippets
Issue Trackers
- Jira โ Story โ commit mapping
- Linear โ Issue tracking
- GitHub Issues โ Auto-link
Notifications
- Slack โ Real-time alerts
- Discord โ Webhook support
- Telegram โ Bot commands
- Email โ Daily digest
AI Tools
- GitHub Copilot โ Detection
- Cursor โ Detection
- ChatGPT/Claude โ Detection
- Codeium โ Detection
๐ ๏ธ Architecture
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ CLI (Python 7,000+ LOC) โ
โ โโโ Typer framework โ
โ โโโ Tree-sitter parsers (Python, JS, TS, JSX, TSX) โ
โ โโโ GitPython (commit analysis) โ
โ โโโ SQLite (local DB) โ
โ โโโ JWT (auth) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โ HTTP
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ REST API (FastAPI) โ
โ โโโ /auth (register, login, me) โ
โ โโโ /billing (checkout, webhook, subscription) โ
โ โโโ /commits (list, scores) โ
โ โโโ /files (analysis) โ
โ โโโ /repo (bus-factor, debt, sprint) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โ HTTP
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Web Dashboard (Next.js) โ
โ โโโ /dashboard (metrics) โ
โ โโโ /files (file list) โ
โ โโโ /commits (commit history) โ
โ โโโ /bus-factor (ownership) โ
โ โโโ /debt (technical debt) โ
โ โโโ /sprints (sprint health) โ
โ โโโ /ai-compare (tool comparison) โ
โ โโโ /onboarding (developer ramp-up) โ
โ โโโ /protected (module list) โ
โ โโโ /interview (Q&A tool) โ
โ โโโ /settings/integrations โ
โ โโโ /pricing (plan comparison) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
3-Layer Stack
- CLI โ Terminal-first developers
- REST API โ Backend for dashboard + integrations
- Web Dashboard โ Manager/CTO view
๐๏ธ Tech Stack
Backend
- Python 3.10+ โ Core language
- Typer โ Modern CLI framework
- FastAPI โ High-performance REST API
- Tree-sitter โ Incremental parsing
- GitPython โ Git repository access
- SQLite โ Local database
- bcrypt โ Password hashing
- PyJWT โ Token management
- Pydantic โ Data validation
- uv โ Fast Python package manager
Frontend
- Next.js 14+ โ React framework
- TypeScript โ Type safety
- Tailwind CSS โ Styling
- i18n โ Multi-language (EN/TR)
Billing
- Lemon Squeezy โ Merchant of Record
- HMAC-SHA256 โ Webhook signature verification
DevOps
- GitHub Actions โ CI/CD
- CodeQL โ Security scanning
- Dependabot โ Dependency updates
- uv โ Python packaging
๐ Security
- โ HMAC-SHA256 webhook signature verification
- โ bcrypt password hashing (cost factor 12)
- โ JWT tokens with 7-day expiry
- โ httpOnly + secure + sameSite cookies
- โ CORS protection
- โ SQL injection protection (parameterized queries)
- โ Pydantic input validation
- โ Rate limiting (FastAPI middleware)
- โ HTTPS only in production
- โ No telemetry โ Your code stays yours
๐ Languages Supported
CodeDNA's Tree-sitter parsers support:
- โ
Python (
.py) - โ
JavaScript (
.js) - โ
TypeScript (
.ts) - โ
JSX (
.jsx) - โ
TSX (
.tsx)
Coming soon: Go, Rust, Java, C#, Ruby, PHP
๐ฆ Project Structure
codedna/
โโโ cli.py # 25 CLI commands
โโโ api.py # FastAPI REST endpoints
โโโ auth.py # JWT authentication
โโโ plan.py # License/plan management
โโโ db.py # SQLite database
โโโ scorer.py # AI risk scoring
โโโ analyzer.py # Code analysis
โโโ ai_fingerprint.py # AI detection
โโโ bus_factor.py # Ownership analysis
โโโ tech_debt.py # Technical debt
โโโ sprint_health.py # Sprint metrics
โโโ survey.py # Onboarding
โโโ interview.py # Q&A tool
โโโ protection.py # Module protection
โโโ rate_limit.py # API throttling
โโโ onboarding.py # Developer tracking
โโโ integrations/
โ โโโ lemonsqueezy.py # Billing integration
โ โโโ github.py # GitHub API
โโโ dashboard/ # Next.js frontend
โ โโโ app/ # 13 pages
โ โโโ components/ # UI components
โ โโโ lib/ # Utilities
โโโ tests/ # Pytest suite
โโโ pyproject.toml # Python config
โโโ README.md # This file
โโโ CHANGELOG.md # Release notes
โโโ LICENSE # MIT
โโโ CONTRIBUTING.md # How to contribute
โโโ SECURITY.md # Security policy
๐งช Testing
# Tum testleri calistir
pytest
# Coverage ile
pytest --cov=codedna
# Specific test
pytest tests/test_ai_fingerprint.py
Test coverage: 80%+ across all modules.
๐ Documentation
- Installation Guide โ INSTALL.md
- CLI Reference โ docs/CLI.md
- API Reference โ http://localhost:8000/docs (when running)
- Webhook Guide โ docs/WEBHOOKS.md
- Architecture โ docs/ARCHITECTURE.md
- Roadmap โ docs/ROADMAP.md
๐ค Contributing
We welcome contributions! See CONTRIBUTING.md for guidelines.
Development Setup
git clone https://github.com/natureco-official/codedna.git
cd codedna
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
pytest
Code Style
๐ License
MIT License โ see LICENSE file.
MIT License - Copyright (c) 2026 NatureCo
๐ Acknowledgments
- Tree-sitter โ For blazing-fast parsing
- Typer โ For beautiful CLI
- FastAPI โ For modern API framework
- Lemon Squeezy โ For hassle-free billing
- All our beta testers โ For feedback and bug reports
๐ฌ Community
- ๐ฌ Discord: https://discord.gg/4FwumbWph
- ๐ฆ Twitter: @naturecoofficial
- ๐ GitHub: https://github.com/natureco-official/codedna
- ๐ฆ PyPI: https://pypi.org/project/codedna/
- ๐ Website: https://natureco.me
๐บ๏ธ Roadmap
v0.3.0 (Q3 2026)
- VSCode extension (real-time)
- Go/Rust/Java support
- Slack bot
- Jira integration
v0.4.0 (Q4 2026)
- Team analytics dashboard
- AI coach (suggests learning resources)
- Custom AI fingerprinting
- Cloud sync (optional)
v1.0.0 (2027)
- Self-hosted option
- Enterprise SSO (SAML, OIDC)
- SOC 2 compliance
- Custom training data
Made with ๐ฟ in Turkey
โญ Star us on GitHub โข ๐ฆ Install from PyPI โข ๐ฆ Follow on Twitter
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file codedna-0.2.11.tar.gz.
File metadata
- Download URL: codedna-0.2.11.tar.gz
- Upload date:
- Size: 5.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6e9808a26c54bcc7ad77ae03eca84b9019be7ac9ba7d4ae24e21d9b7f8e1b73
|
|
| MD5 |
080ca014333acea56bf425ed7d59314c
|
|
| BLAKE2b-256 |
eea72d15b2949b1642f170cfbc5523707cbaa72795d3ca17667a4683f14e023b
|
File details
Details for the file codedna-0.2.11-py3-none-any.whl.
File metadata
- Download URL: codedna-0.2.11-py3-none-any.whl
- Upload date:
- Size: 83.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5193553b453a9d0e426cad72a1a76bdb889e53e22c593c6bfc6e511f540d25f1
|
|
| MD5 |
876e51b6e06849771158a39d533be5c8
|
|
| BLAKE2b-256 |
26d82f488f21f5d765e08ed25497dc290d57a84b9cb5997cee0e6108b0d37619
|