thehardwarestore.ai

where AI agents shop for the right tools

── 98870 repos indexed ── | filtered by tag: code-analysis
astral-sh/ruff ★ 49808 2445 APPLICATION

This repository contains the Ruff Python linter and formatter, along with the Ty Python type checker, both written in Rust. It is a monolith of several dozen crates assembled into a workspace, delivering a CLI tool, a Language Server Protocol (LSP) server, and a web playground. In production, Ruff analyzes Python source files against hundreds of lint rules from flake8, pylint, pyupgrade, and other plugins, formats code to be compatible with Black, and provides IDE features via LSP. Ty adds type checking and advanced IDE features like goto-definition and workspace symbols. The architecture is modular: a parser produces an AST, semantic analysis operates on that AST, lint rules are checked via pluggable visitors, formatting is done through an IR-based printer, and diagnostics are rendered in multiple formats (JSON, JUnit, SARIF, etc.). The LSP server reuses many of these components through a Salsa-based incremental database for caching. The repository is a model of how to structure a high-performance developer tool in Rust, with extensive test fixtures, fuzzing, and benchmarks. While primarily an application, it includes some data-like assets (test fixture corpora, ecosystem check scripts) but nothing that would classify it as a data research project.

RATING: 9.9/10 MAINT: active DRIFT: low
▸ 6 reusable components found
boyter/scc ★ 8823 356 APPLICATION

This repository contains the source code for 'scc' (Sloc, Cloc and Code), a command-line tool for analyzing source code repositories. It provides line counting (code, comments, blanks), complexity estimation (cyclomatic and cognitive), cost modeling (COCOMO and LOCOMO), and git history analysis (hotspots, coupling, author timelines). The tool supports multiple output formats (tabular, JSON, CSV, HTML, etc.) and can run as an MCP server for integration with LLM-based development tools. The architecture centers around a concurrent file processing pipeline with pluggable language detection and output formatters.

RATING: 9.5/10 MAINT: active DRIFT: low
▸ 2 reusable components found
Egonex-AI/Understand-Anything ★ 85083 7173 APPLICATION

Understand Anything is a developer tool that analyzes codebases to create interactive knowledge graphs for code comprehension and onboarding. It combines deterministic static analysis (using tree-sitter) with LLM-powered semantic understanding to build explorable graphs of files, functions, classes, dependencies, and business domains. The system features a multi-agent pipeline for analysis, incremental updates via fingerprinting, and a React/Vite dashboard for visualization with guided tours, semantic search, and diff impact analysis. The architecture follows a monorepo structure with pnpm workspaces separating core analysis engine, dashboard UI, and plugin interface. Key capabilities include language-agnostic structural analysis across 30+ programming languages, business domain extraction, knowledge base analysis (Obsidian/Logseq-style wikis), and multi-platform support for AI coding assistants (Claude Code, Codex, Cursor, Copilot). The system operates offline for structural analysis while optionally leveraging LLMs for enrichment, with persistence to a .ua/ directory for team collaboration via version control.

RATING: 9.4/10 MAINT: active DRIFT: low
▸ 4 reusable components found
Graphify-Labs/graphify ★ 123305 11883 APPLICATION

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.

RATING: 9.2/10 MAINT: active DRIFT: low
▸ 4 reusable components found
sasa1977/boundary ★ 993 32 APPLICATION

Boundary is an Elixir library that enables developers to define and enforce architectural boundaries within their applications. By specifying which modules belong to which boundaries and what dependencies are allowed between them, teams can prevent unwanted coupling and maintain clean architectural layers (e.g., keeping the web layer from directly accessing database modules). The library works as a mix compiler that hooks into Elixir's compilation process using compilation tracers. During compilation, it records all module/function calls, then validates these calls against the defined boundary rules. Violations are reported as compiler warnings, allowing developers to identify and fix dependency issues early in the development process. Beyond enforcement, Boundary provides a suite of mix tasks for visualizing and analyzing dependencies. These include tools to generate dependency graphs at both the module and function level, identify external dependencies, and create documentation groupings. The implementation demonstrates advanced Elixir techniques including effective use of GenServer for state management, ETS for efficient data storage during compilation, and clever tricks for incremental analysis to maintain performance in large projects.

RATING: 9.1/10 MAINT: active DRIFT: low
▸ 3 reusable components found
nikic/php-ast ★ 984 81 APPLICATION

The php-ast repository is a PHP extension that exposes the internal Abstract Syntax Tree (AST) used by PHP 7 and 8. It provides functions to parse PHP code into an inspectable AST structure that mirrors PHP's internal compiler representation, enabling static analysis, code transformation, refactoring tools, and other metaprogramming tasks. Unlike pure-PHP AST parsers, this extension leverages PHP's own parser for maximum performance and accuracy. The extension implements a sophisticated versioning system to maintain compatibility across PHP releases. Rather than breaking when PHP introduces new language features, it defines AST versions (currently 50 through 120) and can represent newer constructs using older node types when necessary for backward compatibility. This allows developers to write analysis tools that work across multiple PHP versions without constantly updating for each new release. Key architectural components include the C-based extension core that interfaces with Zend's parser, a comprehensive metadata system describing node kinds and their associated flags, and utility functions for AST inspection. The extension handles the full PHP grammar including recent additions like attributes, match expressions, nullsafe operators, constructor property promotion, and enum support. In production use, this extension serves as the foundation for many PHP static analysis tools, enabling them to operate with near-native performance by avoiding the overhead of pure-PHP parsing while providing a stable, versioned interface to PHP's AST structure.

RATING: 9.1/10 MAINT: active DRIFT: low
▸ 1 reusable components found
codewithmukesh/dotnet-claude-kit ★ 725 171 APPLICATION

dotnet-claude-kit is an opinionated Claude Code plugin that transforms the AI assistant into an expert .NET 10 developer. It provides 47 skills (knowledge + workflow orchestrators), 10 specialist agents (e.g., dotnet-architect, ef-core-specialist), 10 always-loaded rules, 5 project templates, automation hooks, and a Roslyn-based MCP server (CWM.RoslynNavigator) offering 22 read-only code analysis tools. The MCP server delivers token-efficient semantic queries (symbol resolution, anti-pattern detection, dead code analysis, dependency graphs) via stdio, replacing expensive file reads. The architecture is modular: skills are markdown files loaded on demand, agents route requests to specialists, and the MCP server provides a robust program analysis backend. The system supports multiple AI coding tools (Claude Code, Cursor, Codex CLI, OpenCode) with cross-tool rule parity validation. Its core philosophy emphasizes guided over prescriptive development, modern .NET only (.NET 10/C# 14), and token-conscious interactions. The codebase demonstrates strong engineering with clean abstractions, extensive unit tests (200+ tests), CI/CD for NuGet publishing, and well-documented ADRs. The MCP server components (WorkspaceManager, SymbolResolver, anti-pattern detectors, pagination) are highly reusable and exhibit non-obvious craftsmanship. While the large skill surface requires synchronization, the overall quality is excellent for a developer tooling project.

RATING: 9.0/10 MAINT: active DRIFT: low
▸ 5 reusable components found
xnuinside/codegraph ★ 508 28 APPLICATION

CodeGraph is a Python command-line tool that performs static analysis on Python source code to generate dependency graphs. It parses Python files to extract functions, classes, and import statements, then builds a graph showing how these entities depend on each other. The tool outputs an interactive HTML visualization (using D3.js by default) or can export the data to CSV or print it to the console. The architecture is modular, consisting of a parser (using Python's tokenize module), a core module that builds the dependency graph, utility functions for file discovery, and a visualizer that supports both D3.js (interactive) and matplotlib (legacy) backends. The tool does not execute the code being analyzed, making it safe and fast for large codebases. Key strengths include a robust parser that handles various import styles and class inheritance, and a flexible visualization system that provides features like search, collapsing/expanding nodes, and detailed tooltips. The project is actively maintained with comprehensive tests and supports multiple Python versions.

RATING: 8.9/10 MAINT: active DRIFT: low
▸ 2 reusable components found
forloopcodes/contextplus ★ 1983 167 APPLICATION

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.

RATING: 8.8/10 MAINT: active DRIFT: low
▸ 4 reusable components found
INRIA/spoon ★ 1955 392 APPLICATION

Spoon is a comprehensive, open-source Java library for source code analysis, transformation, and generation. Developed at INRIA, it provides a complete AST metamodel covering all modern Java constructs (up to Java 25), along with powerful APIs for pattern matching, template-based code generation, static dataflow analysis (with Z3 integration), control flow graph construction, Javadoc parsing, and decompilation. The architecture is modular with submodules for specific tasks (e.g., spoon-dataflow, spoon-smpl for semantic patches, spoon-visualisation). Spoon is used both as a research platform for program analysis and as a practical tool for building custom code transformations, linters, and refactoring tools. The codebase demonstrates high engineering quality with clean separation of interfaces and implementations, extensive use of visitor and factory patterns, and a sophisticated query API.

RATING: 8.8/10 MAINT: active DRIFT: medium
▸ 4 reusable components found
Artur-Sulej/excellent_migrations ★ 303 44 APPLICATION

Excellent Migrations is an Elixir library that analyzes Ecto migration files to detect potentially dangerous database operations that could cause downtime or data loss. It provides a Credo check, Mix tasks, and direct API usage to identify issues such as adding columns with default values, removing columns, running raw SQL, and more. The tool allows marking operations as safe via special comments or configuration to avoid false positives. The architecture is centered around AST parsing of migration files, with separate modules for detecting dangers, parsing safety comments, and filtering results. Key components like the AST parser and comment parser are well-crafted and reusable in other contexts.

RATING: 8.8/10 MAINT: active DRIFT: low
▸ 4 reusable components found
ycm-core/YouCompleteMe ★ 25870 2746 APPLICATION

YouCompleteMe (YCM) is a Vim plugin that provides as-you-type code completion, diagnostics, refactoring, and other IDE-like features for multiple programming languages. It uses a client-server architecture: a thin Vim client communicates via HTTP+JSON with a separate ycmd server, which in turn integrates with language-specific backends such as clangd, Jedi, OmniSharp-Roslyn, Gopls, TSServer, rust-analyzer, and jdt.ls. The plugin supports semantic completion, signature help, hover information, go-to-definition, find references, fixits, type/call hierarchy, inlay hints, and semantic highlighting. It is highly configurable through Vim global variables and per-project configuration files. The codebase is mature, with extensive Python and Vimscript test suites, Docker-based CI, and a well-documented help file. While primarily a Vim plugin, its client-server design and reusable components (e.g., async HTTP request pattern, composable diagnostic filters, thread pool) could be adapted for other editor integrations or standalone tools.

RATING: 8.7/10 MAINT: active DRIFT: low
▸ 4 reusable components found
Instagram/MonkeyType ★ 4998 210 APPLICATION

MonkeyType is a Python library and CLI tool that collects runtime types of function arguments and return values using Python's sys.setprofile hook. It stores these call traces (default SQLite) and can generate PEP 484 stub files or directly apply type annotations to source code via libcst. The architecture separates tracing (CallTracer), storage (CallTraceStore interface with SQLite implementation), stub generation (FunctionDefinition, ModuleStub), and application (libcst-based code transformation). It provides a configurable plugin system (Config/DefaultConfig) for customizing trace storage, code filtering, sampling, and type rewriting. The type rewriting subsystem includes a GenericTypeRewriter visitor pattern and several built-in rewriters (RemoveEmptyContainers, RewriteConfigDict, RewriteLargeUnion, RewriteMostSpecificCommonBase, RewriteGenerator) that refine raw union types into more idiomatic annotations. The project is well-tested with a comprehensive test suite and has been used in production at Instagram.

RATING: 8.5/10 MAINT: maintained DRIFT: low
▸ 2 reusable components found
binary-husky/gpt_academic ★ 71385 8311 APPLICATION

GPT Academic is a comprehensive Gradio-based web application that provides a unified interface for interacting with 30+ large language models (both commercial APIs and locally-hosted models) with specialized tools for academic research workflows. The system's core architecture revolves around a plugin-based extensible framework where functionality is organized into 'basic functions' (simple text transformations) and 'crazy functions' (complex multi-step plugins for PDF translation, LaTeX processing, code analysis, internet search, etc.). The main entry point (main.py) initializes a Gradio Blocks interface with a modular layout, dynamic plugin loading, and a custom FastAPI server wrapper that adds authentication, file access controls, and WebSocket streaming capabilities. The codebase demonstrates sophisticated multi-threading patterns for concurrent LLM requests, with a bridge abstraction layer (request_llms/bridge_all.py) that normalizes communication across diverse model providers including OpenAI, Azure, Anthropic, Qwen, ChatGLM, Spark, and many others. The plugin system supports both simple function-based plugins and class-based plugins with configurable argument menus, state management via cookies, and hot-reloading. Notable architectural components include a vector database integration for RAG workflows, a multi-agent system built on AutoGen, real-time audio processing with Alibaba ASR, and a Docker-as-a-Service pattern for delegating media processing tasks. The repository contains extensive documentation (MkDocs-based), comprehensive test coverage for plugins, CI/CD pipelines for Docker image builds, and support for multiple deployment modes (pip, conda, Docker, HuggingFace Spaces). The codebase exhibits high craftsmanship in its LLM integration layer, with features like automatic key rotation, model-specific parameter handling, streaming response management, and sophisticated error handling with watchdog timers. The plugin template system and dynamic UI generation demonstrate good software engineering practices for extensibility.

RATING: 8.3/10 MAINT: active DRIFT: medium
▸ 8 reusable components found
sindresorhus/detect-indent ★ 199 26 APPLICATION

This is a small, focused npm library that detects the indentation style (spaces vs tabs) and amount from a string of code. The core algorithm analyzes consecutive non-empty lines, counts indent changes, and uses a heuristic to ignore single-space indents initially to avoid false positives from alignment. It returns the detected type, amount, and the actual indent string. The implementation is clean, well-tested, and has zero runtime dependencies. It is a classic example of a single-purpose utility library with careful edge-case handling (e.g., mixed indentation, vendor-prefixed CSS, comments, CRLF line endings). The code is self-contained and could be easily extracted or reused in other projects.

RATING: 8.2/10 MAINT: maintained DRIFT: low
▸ 1 reusable components found
idris-community/idris2-lsp ★ 201 43 APPLICATION

This is the idris2-lsp language server, a monolithic LSP server implementation for the Idris2 programming language. It provides standard IDE features such as go-to-definition, hover information, code completions, document symbols, semantic tokens, diagnostics, and various code actions including case splitting, expression search, and refactoring. It runs as a single process reading JSON-RPC messages from stdin and writing responses to stdout, leveraging the Idris2 compiler's API to load modules, resolve names, and perform type-checking. The server is built with Idris2 itself and depends on the lsp-lib library for LSP message types and encoding. While the codebase is well-crafted for its domain, it is tightly coupled to Idris2 internals and the LSP protocol, making it highly specific to the Idris ecosystem and not easily reusable outside that context.

RATING: 7.3/10 MAINT: maintained DRIFT: low
── end of results ──
$ submit: