brokk  by BrokkAi

Code intelligence platform for massive codebases

Created 11 months ago
262 stars

Top 97.2% on SourcePulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

Brokk addresses the challenge of maintaining code intelligence and context for Large Language Models (LLMs) within massive, multi-million-line codebases. It targets enterprise staff, principal engineers, platform teams, and architects working on complex, long-lived services or modernization projects. Brokk offers a significant benefit by enabling LLMs to operate effectively on large code repositories, providing faster, more explainable, and scalable AI-assisted code development.

How It Works

Brokk employs a fragment-level context system, treating code elements, documentation, issues, and even images as first-class "fragments" rather than entire files. This approach, combined with agentic modes (ContextAgent, SearchAgent), allows for precise retrieval and management of relevant information. Its persistent, branchable history ensures no context is lost, enabling users to revert or fork from any past state. The Lutz Mode orchestrates LLM interactions, synthesizing outcomes like direct code edits or structured task lists, which are then validated through a tight edit-compile-test loop, feeding results back to the model for iterative refinement.

Quick Start & Requirements

  • Installation: Download an OS-specific installer from GitHub Releases or use the jDeploy script for macOS/Linux quick install.
  • Prerequisites: Java 21 or newer (JetBrains Runtime recommended).
  • Setup: Requires registration and an API key from https://brokk.ai (includes a $5 trial credit).
  • Supported Platforms: Recent macOS, Windows, and Linux distributions.

Highlighted Details

  • Context Engineering: Utilizes fragment-level context including classes, methods, summaries, images, URLs, stack traces, and notes. Features symbol-, type-, and structure-aware search.
  • Agentic Workflow: Employs ContextAgent for initial retrieval and SearchAgent for expansion/pruning, managed within a Workspace acting as explicit working memory.
  • Edit-Compile-Test Loop: Integrates an incremental Java compiler and test execution, feeding failures and diffs back to the LLM for rapid iteration.
  • Enterprise Scale Features: Includes BlitzForge for mass refactoring across many files, MergeAgent for blame-aware conflict resolution, and Dependency Intelligence with library decompilation to source.
  • Brokk Power Ranking (BPR): An open benchmark measuring LLM performance on real-world coding tasks within large Java repositories, providing an in-app "fitness" indicator.

Maintenance & Community

Licensing & Compatibility

  • License: Open source under the terms of the repository's LICENSE file. Specific license type and compatibility for commercial use or closed-source linking are not detailed in the provided text.

Limitations & Caveats

The project has a strong dependency on Java 21+ and requires an external API key, potentially introducing setup friction. Its advanced features like BlitzForge and Dependency Intelligence are primarily geared towards Java development, and its enterprise scale focus may make it less suitable for smaller projects or different language ecosystems.

Health Check
Last Commit

3 days ago

Responsiveness

Inactive

Pull Requests (30d)
110
Issues (30d)
123
Star History
16 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.