EveryDev.ai
Subscribe
Home
Tools

5,089+ AI tools

  • New
  • Trending
  • Featured
  • Rate tools
  • Compare
  • Arena
Categories
  • Agents2594
  • Coding1910
  • Infrastructure898
  • Projects718
  • Research640
  • MCP611
  • Marketing497
  • Analytics495
  • Design422
  • Testing406
  • Data378
  • Security328
  • Integration259
  • Communication250
  • Prompts246
  • Extensions219
  • Commerce171
  • Voice170
  • DevOps168
  • Web123
  • Learning114
  • Finance35
AI Tools by Topic
  • AI Coding Assistants
  • Agent Frameworks
  • MCP Servers
  • AI Prompt Tools
  • Vibe Coding Tools
  • AI Design Tools
  • AI Database Tools
  • AI Website Builders
  • AI Testing Tools
  • LLM Evaluations
Follow Us
  • X / Twitter
  • LinkedIn
  • Reddit
  • Discord
  • Threads
  • Bluesky
  • Mastodon
  • YouTube
  • GitHub
  • Instagram
Get Started
  • Users
  • Rate Tools
  • About
  • Editorial Standards
  • Corrections & Disclosures
  • Community Guidelines
  • Advertise
  • Contact Us
  • Newsletter
  • Submit a Tool
  • Start a Discussion
  • Write A Blog
  • Share A Build
  • Terms of Service
  • Privacy Policy
Explore with AI
  • ChatGPT
  • Gemini
  • Claude
  • Grok
  • Perplexity
Agent Experience
  • llms.txt
Theme
With AI, Everyone is a Dev. EveryDev.ai ©
    1. Home
    2. Tools
    3. ContextCraft
    ContextCraft icon

    ContextCraft

    Code Intelligence
    Featured

    Open-source Python tool that compresses a Git repository into a token-budgeted Markdown, XML, or JSON context artifact for LLMs using AST analysis and dependency-graph ranking.

    Visit Website

    At a Glance

    Pricing
    Open Source

    ContextCraft CLI and Python SDK released under the MIT License; free to use, copy, modify and distribute.

    Engagement

    Available On

    Web
    API
    SDK
    CLI

    Resources

    WebsiteDocsGitHubllms.txt

    Topics

    Code IntelligenceContext EngineeringCommand Line Assistants

    Alternatives

    CartographerCliffCompactionRepo Wizard
    Developer
    Khanh Quoc TranPhD Candidate in Computer Science @NUSSOC | Trustworthy AI |…

    Listed Oct 2026

    About ContextCraft

    ContextCraft is an open-source Python tool, published under the MIT License, that compiles a Git repository into a Markdown, Claude XML, or JSON context artifact sized to a chosen token budget such as 4k, 16k, 32k, or 128k. It is available as a command-line tool, a Python SDK, and a local web playground. The latest release listed on GitHub is v0.3.1.

    What It Is

    ContextCraft is a codebase compressor for LLM prompts. Rather than concatenating every file verbatim, it parses source with Tree-sitter, ranks files by architectural importance, and decides how much detail each file gets so the output fits a target token budget. The README positions it against repository packers such as repomix, gitingest, and code2prompt.

    How the Compression Pipeline Works

    The README describes a five-stage pipeline:

    • A repository scanner honors hierarchical .gitignore and .contextignore files, filters binary and oversized files, and a sanitizer scrubs API keys, PEM blocks, and high-entropy secrets before parsing.
    • A registry of 35 languages and formats produces ASTs with symbols, docstrings, and a lexical scope graph, and unused imports are trimmed in signature mode.
    • A dependency-graph scorer combines Personalized PageRank with BM25F, biased by an optional focus query, to rank files.
    • Each file is rendered at one of four fidelity tiers: FULL, SKEL (signatures, types, and docstrings), SIGS (public declarations), or TREE (a directory-tree entry).
    • A multiple-choice knapsack optimizer allocates tiers by marginal utility density, which keeps very large files from consuming the full-detail budget.

    Usage Paths

    The CLI runs via uvx or after pip install contextcraft-ai, with options for budget, focus query, output format, clipboard copy, tokenizer encoding, and include/exclude patterns. The Python SDK can analyze a repository once and then render several budgets or formats from the same snapshot without reparsing. A FastAPI-based web playground lets users tune budgets, inspect PageRank scores, and compress public GitHub repositories by URL.

    Benchmark Claims

    The README reports a reproducible benchmark on its own repository (258 files, 119,813 raw tokens), with an 8k budget emitting 7,991 tokens at a stated 14.99x compression ratio. The README also recommends pairing the output with local models for offline workflows.

    ContextCraft - 1

    Community Discussions

    Be the first to start a conversation about ContextCraft

    Share your experience with ContextCraft, ask questions, or help others learn from your insights.

    Pricing

    OPEN SOURCE

    Open Source (MIT)

    ContextCraft CLI and Python SDK released under the MIT License; free to use, copy, modify and distribute.

    • MIT License (OSI-approved)
    • CLI installable via pip or uvx from PyPI (contextcraft-ai)
    • Python SDK
    • Optional local web playground (self-hosted)
    • Parses 35 languages and formats with Tree-sitter

    Capabilities

    Key Features

    • AST-aware parsing of 35 languages and formats with Tree-sitter
    • Personalized PageRank and BM25F file ranking with focus query
    • Token-budgeted output via multiple-choice knapsack optimizer
    • Four fidelity tiers: FULL, SKEL, SIGS, TREE
    • Markdown, Claude XML, and JSON output formats
    • Secret sanitization of API keys, PEM blocks, and high-entropy strings
    • Hierarchical .gitignore and .contextignore support
    • Include/exclude patterns and focus-file scoping
    • Selectable tokenizer encoding (cl100k_base, o200k_base)
    • Python SDK with reusable analyzed snapshots
    • Interactive web playground with GitHub URL swap
    • Clipboard copy of output

    Integrations

    Tree-sitter
    PyPI
    uvx
    Ollama
    vLLM
    llama.cpp
    Anthropic Claude XML
    API Available
    View Docs

    Ratings & Reviews

    No ratings yet

    Be the first to rate ContextCraft and help others make informed decisions.

    Rate other tools you’ve used

    Developer

    Khanh Quoc Tran

    PhD Candidate in Computer Science @NUSSOC | Trustworthy AI | ML System | Causal Reasoning | Turning logic into code

    Read more about Khanh Quoc Tran
    GitHubLinkedIn
    1 tool in directory

    Similar Tools

    Cartographer icon

    Cartographer

    Cartographer is an open-source CLI tool that generates structured maps of codebases to provide AI agents and LLMs with rich context about project architecture and file relationships.

    CliffCompaction icon

    CliffCompaction

    Transparent API proxy that autocompacts long coding-agent sessions to keep them under a token budget.

    Repo Wizard icon

    Repo Wizard

    AI-powered CLI tool for generating project structures, configuration files, and documentation from natural language prompts.

    Browse all tools

    Related Topics

    Code Intelligence

    AI tools that analyze, generate, and transform code through natural language understanding and programming language comprehension.

    135 tools

    Context Engineering

    Techniques for optimizing context windows to improve AI responses.

    92 tools

    Command Line Assistants

    AI-powered command-line assistants that help developers navigate, search, and execute terminal commands with intelligent suggestions and context awareness.

    323 tools
    Browse all topics
    Back to all toolsSuggest an edit
    ratings
    discussions