SocratiCode  by giancarloerra

Deep codebase intelligence for AI assistants

Created 1 month ago
806 stars

Top 43.7% on SourcePulse

GitHubView on GitHub
Project Summary

SocratiCode provides enterprise-grade codebase intelligence for AI assistants, enabling deep semantic understanding of large codebases (40M+ lines). It targets developers, researchers, and power users seeking efficient, private, and local code exploration, offering significant performance gains over traditional methods like grep. The primary benefit is accelerated code comprehension and navigation, reducing token costs and improving AI agent efficiency.

How It Works

SocratiCode employs a hybrid search approach, fusing BM25 lexical search with dense semantic vector search via Reciprocal Rank Fusion (RRF). It utilizes Abstract Syntax Tree (AST)-aware chunking for higher-quality code segmentation, falling back to line-based methods for unsupported languages. Polyglot code dependency graphs are generated using static analysis for over 18 languages, capable of visualizing circular dependencies. The system is designed for zero-setup, local execution primarily via Docker, leveraging Qdrant for vector storage and Ollama for embeddings, with optional cloud provider integration.

Quick Start & Requirements

  • Primary Install: Docker and Node.js 18+ are required. Installation is typically via npx -y socraticode or by installing the Claude Code plugin.
  • Prerequisites: Docker must be running for default managed modes.
  • Setup Time: Approximately 5 minutes for the one-time download of Docker images and embedding models.
  • Links: Claude Code Plugin, Repository

Highlighted Details

  • Performance Benchmark: Achieves 61% less context, 84% fewer tool calls, and is 37x faster than grep-based AI exploration on a 2.45M line codebase.
  • Hybrid Search: Combines semantic and BM25 search for robust query results.
  • Polyglot Dependency Graph: Static analysis for 18+ languages with circular dependency detection and Mermaid visualization.
  • AST-Aware Chunking: Improves search relevance by segmenting code at function/class boundaries.
  • Zero-Setup & Privacy: Runs locally by default with Docker, requiring no API keys and keeping code private.
  • Multi-Agent Ready: Multiple AI agents can share a single index seamlessly.
  • Context Artifacts: Indexes external knowledge like database schemas, API specs, and infrastructure configs.

Maintenance & Community

The project is sponsored by Altaire Limited. No explicit community channels (e.g., Discord, Slack) are listed in the README.

Licensing & Compatibility

SocratiCode is dual-licensed:

  • AGPL-3.0: Free for use, modification, and distribution, but requires modifications offered as a network service to be released under AGPL-3.0.
  • Commercial: Available for organizations needing to integrate into proprietary products without AGPL obligations; contact giancarlo@altaire.com for details.

Limitations & Caveats

The AGPL-3.0 license imposes copyleft restrictions on network services. Docker containers on macOS and Windows cannot access host GPUs, potentially impacting performance on large codebases; native Ollama installation is recommended for acceleration. Docker and Node.js 18+ are mandatory dependencies.

Health Check
Last Commit

6 days ago

Responsiveness

Inactive

Pull Requests (30d)
15
Issues (30d)
7
Star History
733 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.