sourcecode: Open-Source CLI to Compress Large Java/Spring Monorepos for Claude

An open-source CLI tool called sourcecode was released to compress large enterprise repositories into Claude-friendly context. Aimed at Java/Spring monorepos, it targets the problem of excessive token usage when feeding codebases to LLMs like Claude.
What It Does
The tool provides several features out of the box:
- Repo context compression — reduces a real Java Spring Boot + Angular monorepo (~4k files) from roughly ~3M tokens (manual estimate) to
--agentmode: ~5k structured tokens, or--compactmode: ~1.7k tokens. - Git hotspots / churn detection — identifies files with frequent changes.
- TODO / FIXME extraction — pulls all code annotations.
- Symbol lookup — across duplicated modules and projects.
- PR delta workflows — produces structured JSON/YAML output for Claude workflows.
Current Limitations
The author notes that deep Java semantics, Spring/MyBatis understanding, cross-file reasoning, and full architecture comprehension are still major works in progress. The tool is far more useful today as a context compression + navigation tool than as a generic AI code intelligence platform.
Future Focus
Going forward, the project will concentrate on:
- Java/Spring monorepos specifically
- Semantic symbol graphs
- Impact analysis
- Working-tree awareness
Installation
Available via PyPI and npm:
pip install sourcecode==1.0.0
# or
npm install sourcecode-npmGitHub repo: HarounDominique/sourcecode
Who It's For
Developers using Claude with large Java/Spring monorepos who need to reduce context size while preserving navigability and key code structure.
📖 Read the full source: r/ClaudeAI
👀 See Also

Rift: A Better Alternative to Git Worktrees with Instant Copy-on-Write Snapshots
Rift uses btrfs or APFS snapshots to create instant, space-efficient copies of Git repositories. Initialization, creation, and listing via CLI or JavaScript FFI.

Logseq Brain v0.6.0: Persistent Memory Plugin for Claude Code Adds Journey Log and Section-Targeted Reads
Logseq Brain v0.6.0 adds a journey log for all operations, section-targeted reads for token savings, and progressive disclosure for skill files.

MCP Server Indexes Codebases into Knowledge Graph for 10x Token Reduction
A new MCP server called codebase-memory-mcp parses codebases into a persistent knowledge graph using tree-sitter, reducing token usage by at least 10x for structural queries. Benchmarked across 35 real-world repositories, it replaces file-by-file exploration with graph queries.

Paper Lantern MCP Server Connects Claude Code to Research Papers
Paper Lantern is an MCP server built with Claude Code that connects coding agents to over 2 million CS and 43 million biomedical research papers, enabling them to find benchmarked methods instead of defaulting to training data.