CodeGraph is a local-first, cross-language code intelligence engine designed to give AI coding agents structured knowledge of a codebase: symbols, references, call graphs, import graphs, inheritance, routes, and framework-specific dynamic dispatch. It indexes source with tree-sitter WASM grammars (or an optional native Rust kernel for speed), stores the resulting graph in SQLite with FTS5, then resolves cross-file references and synthesizes edges for indirect patterns like web frameworks, DI containers, callbacks, and event dispatch. The primary interfaces are a CLI (codegraph), an MCP server exposing tools for agents, an embeddable programmatic API, and a Svelte web viewer.
This is the core tree-sitter repository, providing a parser generator toolchain and an incremental parsing runtime library. In production, it consumes grammar definitions written in a JavaScript DSL or JSON format and generates standalone C parsers (or WebAssembly modules) that can parse source code incrementally at keystroke speed. The architecture comprises a minimal C library (`lib/src/`) that implements a GLR parser with error recovery, a Rust-based generator (`crates/generate/`) that compiles grammars into LR parse tables and emits C code, a CLI tool (`crates/cli/`) for developing/testing grammars and performing syntax highlighting/querying, and bindings for Rust, Node.js/TypeScript, and Web. The system is designed for integration into editors (e.g., VS Code, Neovim) and code analysis tools, offering incremental parsing, tree queries, syntax highlighting, and symbol tagging. External dependencies are minimal for the C core (none), while the Rust toolchain depends on wasmtime, QuickJS, and standard crates. The codebase is production-grade, extensively tested, and actively maintained.
GitNexus is a graph-powered code intelligence platform that indexes any codebase into a knowledge graph, then exposes it through MCP tools and a web UI. It supports 14+ languages with deep scope-based resolution (RFC #909), cross-file type inference, control-flow graphs (CFG), program dependence graphs (PDG), taint analysis, and hybrid search (BM25 + semantic + RRF). The system has two main components: a CLI/MCP server (Node.js) for AI agent integration with tools like Cursor, Claude Code, and Codex; and a web UI (React + Vite) for visual graph exploration. The architecture is a multi-phase ingestion pipeline: scan → structure → parse → scope resolution → clustering → process detection → search indexing. The codebase demonstrates strong engineering with comprehensive test coverage (1100+ tests), a shared types package (gitnexus-shared), vendored tree-sitter grammars with prebuilt binaries, Docker containerization with cosign signing, and CI/CD with security scanning. The eval harness for SWE-bench evaluation shows research-grade rigor. Key architectural decisions include the registry-primary scope resolution system, the language provider pattern with compile-time exhaustive dispatch, and the worker pool for parallel parsing with self-healing capabilities.
Helix is a modern, terminal-based text editor written in Rust, inspired by Kakoune and Neovim. It provides a modal editing experience with multiple cursors, tree-sitter syntax highlighting, and deep Language Server Protocol (LSP) integration for features like code completion, diagnostics, hover, and code actions. The editor also supports the Debug Adapter Protocol (DAP) for debugging, version control integration via git, and a flexible snippet system. Its architecture is a multi-crate Cargo workspace with a core editing engine (helix-core), a view/document abstraction layer (helix-view), a terminal UI framework (helix-tui), and a terminal application crate (helix-term) that ties everything together with an async event loop using tokio. The editor is highly configurable through TOML files and supports a vast number of programming languages via tree-sitter grammars and LSP servers. The codebase demonstrates strong engineering practices: clean separation of concerns across crates, extensive use of Rust's type system for safety, and a composable event-driven architecture. Notable reusable components include a standalone LSP type definitions crate (helix-lsp-types), a generic event/hook system (helix-event), a parser combinator library (helix-parsec), and a terminal UI widget library (helix-tui) that could be extracted for other TUI applications. The editor's picker UI component and command-line parser are also well-designed patterns. While there is some architectural debt (tight coupling between helix-term and other crates, some unsafe code for performance), the overall quality is high and the project is actively maintained with frequent releases.
Graphify is a CLI tool and library that extracts structural and semantic knowledge graphs from source code across 36+ programming languages. It parses files using tree-sitter grammars, builds a graph of nodes (functions, classes, modules, etc.) and edges (calls, imports, inheritance, etc.), performs community detection via Leiden/Louvain, and generates reports, wikis, and exports to formats like Obsidian, Neo4j, and FalkorDB. The system integrates with AI coding assistants through an MCP server (stdio/HTTP), skill files (SKILL.md, CLAUDE.md), and git hooks for automatic graph updates. Key entry points include `graphify extract`, `graphify query`, `graphify serve`, and `graphify install`. External dependencies include tree-sitter grammars, LLM APIs (OpenAI, Anthropic, Gemini, Ollama), and optional databases. The architecture is modular: per-language extractors in `graphify/extractors/`, graph assembly in `build.py`, clustering in `cluster.py`, and export in `export.py`. The codebase demonstrates strong engineering practices with extensive tests, atomic file writes, security validation (SSRF, path traversal), and cross-platform support.
Aider is a mature, well-architected CLI application that enables AI pair programming in the terminal. It integrates with 100+ LLMs via LiteLLM to help developers edit code in local git repositories. The system is built around a sophisticated coder abstraction that supports multiple edit formats (whole file, diff, search/replace blocks, unified diffs) to accommodate different LLM capabilities. The architecture is plugin-based with a clear separation between the main CLI loop, coder implementations, model management, and repository mapping. Aider automatically commits changes with sensible commit messages, provides linting/testing integration, and supports advanced features like prompt caching, voice input, and a browser-based GUI. The codebase demonstrates strong engineering practices with comprehensive testing, CI/CD pipelines, and careful dependency management. The repo map feature using tree-sitter for code analysis is particularly notable, providing intelligent context about codebases to LLMs. The project maintains high quality through extensive test coverage, pre-commit hooks, and automated benchmarking against coding tasks.
Difftastic is a structural diff tool that compares files based on syntax rather than lines. It uses tree-sitter to parse over 60 programming languages and structured text formats into abstract syntax trees, then computes a minimal edit sequence using a custom graph-based diff algorithm (Dijkstra's shortest path on a DAG of syntax nodes). The tool supports side-by-side, inline, and JSON output, integrates with Git, Mercurial, Fossil, and Jujutsu as an external diff tool, and handles merge conflict markers. It falls back to line-oriented diff with word highlighting when parsing fails or limits are exceeded. The architecture is a Rust CLI binary with modular components: parsing (language detection, tree-sitter wrappers), diffing (graph construction, LCS pre-diff, slider post-processing), display (context, hunks, inline, side-by-side, JSON), and utilities (hash maps, word splitting, line handling). Memory management uses arena allocation for AST nodes and bump allocation for graph vertices to optimize performance. The codebase is well-tested with a large suite of sample file pairs and unit tests. Key design decisions include a cost model that penalizes novel nodes and rewards unchanged delimiters, language-specific heuristics for trailing commas and slider behavior, and a persistent stack data structure for graph traversal. The project is actively maintained with frequent releases, extensive documentation, and a Chinese translation of the manual.
vim-matchup is a Vim/Neovim plugin that extends the `%` key to navigate between matching language constructs (e.g., if/endif, for/endfor, HTML tags, LaTeX environments) and highlights matching pairs. Its architecture is a classic Vim plugin: `plugin/matchup.vim` is the entry point that initializes configuration, loads modules, and sets up autocommands. Core logic lives in `autoload/matchup/*.vim` files, which are lazy-loaded on demand. The plugin supports both a Vimscript-based matching engine (using `b:match_words` regex patterns) and a Neovim-only treesitter-based engine (Lua code in `lua/treesitter-matchup/`). Key modules include `delim` (delimiter detection and matching), `motion` (movements like `%`, `[%`, `]%`), `text_obj` (text objects `i%`, `a%`), `matchparen` (highlighting and off-screen display), and `perf` (performance timing). It depends on Vim 7.4+ or Neovim 0.5+, and optionally on installed treesitter parsers for enhanced matching. The codebase is well-structured, extensively tested, and demonstrates advanced Vimscript and Lua craftsmanship.
CotEditor is a native macOS text editor written in Swift, designed for code editing with syntax highlighting, file management, find/replace, and scripting support. It uses a hybrid AppKit/SwiftUI architecture, with core editing logic in the EditorCore package, syntax parsing in the Syntax package (supporting both regex-based and tree-sitter incremental parsing), and macOS-specific UI controls in the MacUI package. The application follows an MVVM pattern with @Observable models, async task-based background processing, and extensive localization across 19 languages. Key entry points include the DocumentWindow and DocumentViewController for the main editing interface, the SettingsWindow for configuration, and the command-line tool `cot`. Data flows involve file opening with encoding detection, syntax highlighting via incremental parsers, find/replace operations with progress tracking, and remote editing via the rmate protocol. External dependencies include tree-sitter grammars for 20+ languages, Sparkle for updates, and various macOS system APIs. The codebase demonstrates strong engineering practices: modular package design, protocol-oriented interfaces, reactive state management, and comprehensive test coverage. It is actively maintained with frequent releases and security fixes.
gitlogue is a terminal-based Git commit visualization tool that animates repository history as a cinematic typing experience. It replays commits with realistic character-by-character typing animations, syntax highlighting via tree-sitter, and dynamic UI panes showing file trees, editor views, and terminal output. The application is built in Rust using ratatui for terminal rendering, git2 for repository access, and features a modular architecture with separate concerns for Git processing, animation engine, theme management, and UI components. Key features include commit filtering, configurable playback speed, screensaver mode, and 16 built-in color themes.
Context+ is an MCP (Model Context Protocol) server that provides AI agents with structural and semantic awareness of large codebases. It operates over stdio and exposes 17 tools for code discovery, analysis, version control, and memory management. The architecture is layered: a core layer handles multi-language AST parsing via tree-sitter (36 languages with WASM grammars and regex fallback), gitignore-aware recursive directory walking with nested .gitignore support, vector embedding generation (Ollama or OpenAI-compatible APIs) with disk caching and adaptive batching, and an in-memory property graph for long-term memory with decay scoring and auto-similarity edges. A tools layer wraps these capabilities into MCP tools for context tree generation, file skeleton extraction, semantic search (file-level and identifier-level with call-site ranking), blast radius analysis, static analysis runner, commit validation with shadow restore points, spectral clustering-based semantic navigation, and Obsidian-style feature hub navigation. A git layer provides a shadow restore point system for undo without touching git history. The server includes process lifecycle management (idle timeout, parent process monitoring, broken pipe detection) and a realtime embedding tracker that incrementally refreshes embeddings on file changes. The landing page is a separate Next.js application deployed on Cloudflare Workers that serves the documentation and instructions API.
curlconverter is a command-line tool and library that converts curl commands into equivalent code snippets in over 30 programming languages and HTTP libraries. It features a modular architecture with a tree-sitter based Bash parser for robust curl command parsing, language-specific generators for target code production, and extensive test coverage. The tool handles complex curl features including authentication, headers, data uploads, multipart forms, proxies, and SSL options, producing runnable code in languages ranging from Python and JavaScript to Rust, Go, and specialized tools like Ansible and HTTPie.
Chiasmus is a neurosymbolic verification engine packaged as a TypeScript library and Model Context Protocol (MCP) server. It bridges LLMs with formal solvers — Z3 (SMT) and SWI-Prolog (WASM) — by translating natural-language problems into template-based formal specifications that are verified with mathematical certainty. It also performs static code analysis: tree-sitter-based extraction of call graphs for TypeScript/JavaScript, Python, Go, Rust, Clojure, Scheme, Racket, and Common Lisp, followed by 16 analyses (reachability, dead code, impact, cycles, layer violations, community detection, hubs, bridges, diffs). Architecturally, the repo is a modular ESM library with an MCP server entry point (src/mcp-server.ts) exposing 11 tools over stdio (chiasmus_graph, chiasmus_map, chiasmus_formalize, chiasmus_verify, chiasmus_search, chiasmus_review, chiasmus_learn, etc.). Core subsystems: graph extraction with per-file content-hash caching and snapshot diffing; a formalization engine that selects from 8 built-in skill templates via BM25/embedding retrieval and runs an LLM-driven correction loop against the solvers; a SQLite-backed skill library that learns new templates from verified solutions; and pluggable LLM adapters (Anthropic, OpenAI-compatible, Azure, local via node-llama-cpp). Data flows: source files are parsed by tree-sitter into a CodeGraph, which can be emitted as Prolog facts for symbolic queries or analyzed natively with O(V+E) algorithms (Tarjan SCC, BFS). For verification, a problem statement is embedded, matched to a template, slot-filled by an LLM, linted, and iteratively corrected until the Z3/Prolog solver confirms the property or finds a counterexample. The benchmark suite compares Chiasmus against traditional implementations across RBAC, dependency resolution, taint analysis, workflow validation, and validation consistency. Maintenance is active (v0.1.28, CI on Node 22/24, 70+ test files covering graph extraction, solvers, MCP tools, search, and skills). The codebase is well-engineered with several genuinely reusable components — native graph algorithms, an LRU extraction cache, a BM25 index, and a tsconfig alias resolver — though some coupling exists between the extractor and the TypeScript type environment, and the vendored WASM grammars require periodic upstream syncs.
code-chunk is an AST-aware code chunking library designed for semantic search and RAG pipelines. It uses tree-sitter to parse source code into abstract syntax trees, extracts semantic entities (functions, classes, methods, etc.), builds a hierarchical scope tree, and chunks code at semantic boundaries rather than arbitrary character limits. Each chunk is enriched with contextual metadata including scope chain, entities, siblings, and import dependencies, producing contextualized text optimized for embedding models. The library supports multiple languages (TypeScript, JavaScript, Python, Rust, Go, Java), offers batch processing, streaming APIs, Effect integration, and WASM support for Cloudflare Workers. An accompanying evaluation harness (@supermemory/eval) compares agent performance with and without semantic search using SWE-bench Lite.
MD-TUI is a Rust-based terminal markdown viewer (TUI) that renders `.md` files with full keyboard navigation, syntax highlighting via tree-sitter, inline images, foldable `<details>` blocks, mermaid diagrams, table rendering, search, and link following (internal/external/wiki). It can be used as a standalone binary (`mdt`) or as a library. The architecture is monolithic but modular: a custom PEG parser (`src/md.pest`) converts markdown into a component tree (`ComponentRoot`) composed of `TextComponent` and `ImageComponent` nodes; these are rendered to the terminal using `ratatui`. Configuration is loaded from `~/.config/mdt/config.toml` or environment variables. The repository demonstrates strong Rust craftsmanship with well-separated modules, optional feature flags (`tree-sitter`, `network`), thread-local caching for syntax highlighting, and a comprehensive test suite covering parsing edge cases, search, and rendering behavior.
GritQL is a declarative query language and CLI tool for searching, linting, and transforming source code across many programming languages (JS/TS, Python, Java, Go, Rust, Ruby, PHP, SQL, etc.). The repository implements a Rust workspace comprising a pattern-matching engine (grit-pattern-matcher) that compiles GritQL patterns into executable AST-based matchers, a CLI client (grit) with commands like `apply`, `check`, `list`, `patterns`, and `lsp`, an LSP server for IDE integration, WebAssembly bindings for browser use (playground), and Node.js NAPI bindings for programmatic access. Patterns are authored in `.grit` files or embedded in Markdown with sample-based testing. The system uses tree-sitter parsers (vendored grammars) to parse source files, supports pattern caching for performance, and includes authentication, analytics, and remote module resolution. The architecture is modular: core pattern matching is isolated in `crates/grit-pattern-matcher`, pattern compilation in `crates/core`, language support in `crates/language`, and UX in `crates/cli`. The documentation site (Next.js with Markdoc) provides an interactive playground. External dependencies include tree-sitter parsers, NAPI-RS, WebAssembly tooling, and optional LLM APIs for AI-assisted patterns.
nvim-test is a Neovim plugin that provides a unified interface for running tests across multiple programming languages. It integrates with Neovim's terminal system to execute test commands (like jest, pytest, etc.) and displays results in a split window. The plugin features language-specific runners that use tree-sitter queries to identify test functions and navigate to the nearest test from the cursor. Key components include a base Runner class for abstraction, utility functions for file path resolution, and terminal adapters for both built-in and toggleterm implementations. The plugin is actively maintained with recent commits and CI workflows, showing low technical debt as it relies on Neovim's stable APIs and external test runners without complex dependencies.
Android Code Studio (formerly AndroidIDE) is a full-featured Integrated Development Environment (IDE) designed to run natively on Android devices. It enables users to write, compile, and debug Android and Java applications directly on mobile hardware. The architecture is a modular monolith built with Kotlin and Java, utilizing a composite build system to bundle critical dependencies like the OpenJDK compiler, Logback, and XML parsers directly into the application rather than relying on external Maven repositories. Key functionality includes a custom code editor powered by Tree-sitter, a Language Server Protocol (LSP) implementation for Java and XML, a UI Designer for visual layout editing, and a terminal integration via Termux.
Globstar is a static analysis toolkit that enables developers to write custom checkers in YAML or Go and run them via a single portable binary. It uses tree-sitter for AST-based analysis, supporting multiple languages (Go, Java, JavaScript, Python, Ruby, etc.). The tool is designed to be fast, dependency-free, and CI-friendly, with a focus on enforcing learned patterns such as security vulnerabilities and code quality issues. The architecture consists of a CLI layer, an analysis engine for parsing and scope resolution, and a checker system with built-in and custom checker support.
This repository contains a build toolchain for compiling tree-sitter grammar dynamic libraries (.so/.dylib/.dll) for use with Emacs 29+. The core is a Python CLI (`langman.py`) that wraps shell scripts (`build.sh` and `batch.sh`) to clone, compile, and install tree-sitter grammars from GitHub. It supports versioned builds (via git tags) with caching, cross-platform extended attribute versioning, and parallel builds. The architecture is a simple CLI application with separate commands for building, installing, and querying versions. The codebase is well-structured, includes unit and end-to-end tests, and demonstrates clean separation of concerns between the Python frontend and the shell-based build logic. The tool is practical for Emacs users who need a streamlined way to manage tree-sitter language grammars.