better-context  by davis7dotsh

Codebase querying tool for up-to-date library context

Created 1 month ago
395 stars

Top 73.0% on SourcePulse

GitHubView on GitHub
Project Summary

better-context (btca) is a command-line interface tool designed to provide developers with up-to-date context on libraries and frameworks by directly searching their source code. It addresses the challenge of understanding evolving codebases by cloning repositories locally, enabling precise, context-aware queries. The tool benefits developers by offering a more reliable alternative to outdated documentation or broad web searches.

How It Works

The core mechanism involves cloning specified project repositories locally. Users can then interact with the tool via a CLI, a terminal-based UI (TUI), or a server API to ask questions about the codebase. The system searches the cloned source files to retrieve relevant information, aiming to provide answers grounded directly in the library's implementation. This approach ensures answers reflect the current state of the code.

Quick Start & Requirements

  • Installation: Requires the Bun JavaScript runtime. Install globally via bun add -g btca.
  • Prerequisites: Bun runtime, Git.
  • Configuration: A default configuration file is created at ~/.config/btca/btca.json on first run, managing repo lists and model/provider settings.
  • Documentation: btca.dev and dev docs located in apps/cli.

Highlighted Details

  • Direct source code searching for library/framework context.
  • Multiple interaction modes: CLI (ask), TUI (chat), and server (serve).
  • Supports POST requests to /question endpoint when running in server mode.
  • Planned features include TUI enhancements, multi-repo support, and improved output streaming.

Maintenance & Community

No specific details regarding maintainers, community channels (like Discord/Slack), or roadmap were provided in the README excerpt.

Licensing & Compatibility

The license type is not specified in the provided README content. This omission requires clarification for assessing commercial use or closed-source integration compatibility.

Limitations & Caveats

The tool relies on the Bun package manager for installation, which may be a barrier for users not already utilizing Bun. Several features, such as multi-repo support and enhanced TUI capabilities, are listed under "stuff I want to add," indicating the project is under active development and may not yet possess its full intended functionality. The license status is currently unknown.

Health Check
Last Commit

22 hours ago

Responsiveness

Inactive

Pull Requests (30d)
30
Issues (30d)
24
Star History
274 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.