Free · Open Source · 9 Languages

Codebase
intelligence.

Five tools to understand, clean, and improve your codebase — all from one install.

pip3 install archaeologist
$ deadcode ./my-project --explain
85% clearLocalLogs · logger.dart · 10mo untouched · No callers
 
$ archaeologist-impact ./my-project [your-file]
Blast radius: 42/100 MEDIUM · 8 callers · 3 test files
 
$ archaeologist-complexity ./my-project --html
✓ Report opened · 12 very complex · 34 complex functions

// install

One command.
All five tools.

Install
pip3 install archaeologist
Requires Python 3.11+. After install, all commands work from anywhere — no need to navigate to a specific folder.
To upgrade: pip3 install --upgrade archaeologist

// tools

Five tools.
Click one to explore.

Codebase
Graph
Change
Impact
Complexity
Scorer
Duplicate
Detector
Dead Code
Finder
☠ Unused Code Finder
Finds functions nobody calls. Combines static analysis with git history into a confidence score. Can auto-delete on a new branch, run your tests, and open a PR.
deadcode [path] Scan and show results — read only, no changes
STABLE
Basic scan
deadcode ./my-project --explain
High confidence only
deadcode ./my-project --min-confidence 80
Key flags
--explainShow why each function was flagged
--min-confidence 75Only show above this score (default: 40)
--no-gitSkip git history — faster, less accurate
deadcode-report [path] Generate a shareable HTML dashboard
STABLE
Generate and open
deadcode-report ./my-project && open dead_code_report.html
Teammates can open the HTML file without installing anything.
deadcode-clean [path] --dry-run Preview what would be removed — zero changes
β BETA
Always start here before the full clean
deadcode-clean ./my-project --dry-run --min-confidence 85
deadcode-clean [path] Auto-clean — branch, delete, test, PR
β BETA⚠ RISK
Always dry-run first. Your main branch is never touched — auto-rolls back if tests fail.
Full auto-clean
deadcode-clean ./my-project --min-confidence 85
Without PR — review branch locally first
deadcode-clean ./my-project --min-confidence 85 --no-pr
Key flags
--min-confidence 85Only remove functions scoring 85%+ (higher = safer)
--limit 10Max functions to remove in one run
--no-prCommit locally, don't push or open PR
--lang dartOnly clean a specific language
⬡ Codebase Graph
Opens an interactive browser map of your codebase. Files are nodes — sized by function count, colored by health. Arrows show which files call which.
archaeologist-graph [path] Open interactive graph in browser
β BETA
Open in browser
archaeologist-graph ./my-project
Save to share with team
archaeologist-graph ./my-project --output graph.html
Node colors
■ PurpleEntry point (main.dart etc.)
■ GreenClean — no unused code detected
■ GreyMixed — some unused functions
■ RedFully unused — entire file may be removable
Dynamic dispatch and reflection-based calls may not appear as connections. Always verify before removing red nodes.
◎ Change Impact Analyzer
Before changing any file, see what could break — every caller, every importer, test coverage, and a 0–100 blast radius score.
archaeologist-impact [project] [file] Analyze blast radius of changing a file
STABLE
Analyze all files at once
archaeologist-impact ./my-project --all --html
Analyze a specific file
archaeologist-impact ./my-project [your-file] --html
Blast radius score
70–100 HIGHMany callers. Run full test suite. Write tests if none exist.
40–69 MEDIUMSeveral callers. Review them before changing signatures.
0–39 LOWFew or no callers. Safe to change freely.
◈ Complexity Scorer
Scores every function on cyclomatic complexity — decision branches, nesting, and length. Ranks worst-first so you know what to refactor.
archaeologist-complexity [path] Score complexity of every function
STABLE
Terminal output
archaeologist-complexity ./my-project
Visual HTML report
archaeologist-complexity ./my-project --html
Labels
Very Complex 30+Break into smaller functions
Complex 15–29Good candidate for refactoring
Moderate 8–14Watch as it grows
Simple 0–7No action needed
Key flags
--min-score 15Only show above this score (default: 8)
--htmlOpen interactive HTML report
--lang dartFilter by language
⧉ Duplicate Detector
Finds copy-paste code and near-identical functions. Detects same names in different files, exact body copies, and high-similarity implementations.
archaeologist-dupes [path] Find duplicate and near-duplicate functions
STABLE
Terminal output
archaeologist-dupes ./my-project
Visual HTML report
archaeologist-dupes ./my-project --html
What gets flagged
Same name, diff filesformatDate() in 6 files — consolidate into one
Exact copy-pasteIdentical function body — 100% confidence
Near-identicalSame logic, different variable names
Key flags
--min-similarity 85Similarity threshold (default: 85)
--htmlOpen interactive HTML report
--lang dartFilter by language

// codebase graph

Your architecture.
Visually.

Run archaeologist-graph ./my-project and your browser opens an interactive map of your entire codebase. Files grouped by folder, colored by health, connected by real call relationships.

☠ archaeologist-graph | 584 functions · 2954 unused · 149 files
home_page · _buildAppBarActions · _buildBody · _buildGroups home/ events_list_scr… 3☠ ☠ _refreshAllProviders · showDialog · _buildEmptyState events/ group_detail_in… · drawStar · degToRad · showDialog groups/ auth_service 5☠ ☠ getUserProfileV1 · fetchUser · updateProfile services/ notification_ser… 8☠ ☠ registerChannelHandler ☠ sendPushNotification ☠ scheduleNotification services/ logger 10☠ ☠ clearLocalLogs ☠ exportLogsAsJson ☠ critical utils/ member_reposit… 4☠ ☠ updateComment · getMembers · addMember repos/ email_se… ☠ sendInvit… ☠ genLink svc/
scroll to zoom · drag to pan · click any card
Grouped by folder
Each folder is a visual row. UI screens on top, services in the middle, repositories and utils below.
Color coded by health
Green = clean. Gold = has some unused code. Red = entire file is unused. Purple = entry point.
Click to explore
Click any card to see what depends on it, what it imports, and the full list of functions inside.

// git flow

Your main branch
is never touched.

The auto-clean always works on an isolated branch.

1
New branch created
Named with today's date — e.g. cleanup-2026-05-28
2
Tests run before anything is committed
Auto-detects Flutter, pytest, Jest, Go, Gradle, Cargo. If tests fail — branch deleted, nothing changes.
3
Review the diff
git checkout cleanup-2026-05-28

git diff main cleanup-2026-05-28
4
Merge or roll back
git merge cleanup-2026-05-28

git branch -D cleanup-2026-05-28

// languages

Nine languages.
Honest about each.

Production tested ✓
Python
Dart / Flutter
JavaScript
TypeScript
Beta — may have false positives
Go β
Java β
Kotlin β
Ruby β
Rust β
Swift β

// vs other tools

Other tools give you a list.
We go further.

Other tools
Static analysis only — no git intelligence
One language per tool
Outputs a list — you do the rest manually
No test verification before deletion
No architecture visualization
No change impact analysis
No complexity scoring
No duplicate detection
Archaeologist
Static analysis + git history combined
9 languages, one install
All the way to a merged PR
Tests run before anything is committed
Interactive architecture graph
Change impact with blast radius score
Cyclomatic complexity scorer
Duplicate and near-duplicate detector

📦 pypi.org/project/archaeologist ☆ github.com/prathik-arun