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.
Agentic Metric is a local-only monitoring tool for AI coding agents that tracks token usage and costs across Claude Code, Codex, OpenCode, Qwen Code, and VS Code (Copilot Chat). It features a TUI dashboard and CLI for real-time monitoring, historical trends, and cost estimation. The architecture uses a plugin-based collector system for each agent type, incremental file parsing for efficient live updates, and a SQLite database for data aggregation. Key design strengths include smart session upsert logic to prevent metric regression, cross-platform process detection, and a flexible pricing system with family-based fallbacks.