Skip to main content

Code archaeologist - reconstruct function decision history via AST-aware lineage tracking

Project description

Archeologist - Code Lineage Tracker

CLI tool that reconstructs function decision history via AST-aware lineage tracking. Outputs JSON with commit messages and diffs - perfect for LLM context.

Install

pip install archeologist

Usage

# Analyze a specific function
arc analyze-function path/to/file.py function_name

# Get commit history with diffs
arc history path/to/file.py

# List all functions in a file
arc list-functions path/to/file.py

Output

JSON with commit hash, message, author, date, and diff:

{
  "file": "src/flask/helpers.py",
  "function": "stream_with_context",
  "repo": "/path/to/repo",
  "language": "python",
  "lineage_edges": 10,
  "changes": [
    {
      "commit_hash": "abc123...",
      "commit_message": "redirect defaults to 303",
      "author": "David Lord",
      "date": "2026-01-24T16:50:54-08:00",
      "diff": "diff --git a/src/flask/helpers.py..."
    }
  ]
}

Environment

# Optional: for PR details
export GITHUB_TOKEN=ghp_xxx

# Optional: for narrative synthesis
export CLAUDE_API_KEY=sk-ant-xxx

Languages Supported

Python, JavaScript, TypeScript, Go, Rust, Java, C, C++, Ruby, PHP

Commands

  • analyze - Analyze file lineage
  • analyze-function - Analyze specific function
  • history - Show commit history with diffs
  • list-functions - List all functions in file
  • search - Search for function across repo
  • stats - Repository statistics

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

archeologist-0.2.0.tar.gz (21.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

archeologist-0.2.0-py3-none-any.whl (22.1 kB view details)

Uploaded Python 3

File details

Details for the file archeologist-0.2.0.tar.gz.

File metadata

  • Download URL: archeologist-0.2.0.tar.gz
  • Upload date:
  • Size: 21.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for archeologist-0.2.0.tar.gz
Algorithm Hash digest
SHA256 9651937d9a7799ed0796ed4032e8dcdbd03fcf1b2a7f658aeb10586037d479db
MD5 8bf5ff365a1c76ae7c418e3ffbf4f5d6
BLAKE2b-256 dfe1af04ade08d214ffa033e2cbd465a0b4e9f65467f3620fa6499a4804892f0

See more details on using hashes here.

File details

Details for the file archeologist-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: archeologist-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 22.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for archeologist-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cff87a31337a5d97f3617b4d076decd34d604725bfac31b0f288b4a03325d6bc
MD5 cbedc2131c92b4ca711d0349effe0c59
BLAKE2b-256 b9e4c57e7c69b3c7fda8b435895a86ea0eccfc80a126f0d5de0b1cda15478a14

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page