shotgun_code  by glebkudr

Desktop tool for LLM-powered codebase edits via structured context injection

created 2 months ago
1,611 stars

Top 26.6% on sourcepulse

GitHubView on GitHub
Project Summary

Shotgun is a desktop utility designed to streamline large-scale code manipulation with Large Language Models (LLMs). It addresses the challenge of providing comprehensive codebase context to LLMs, enabling complex tasks like bulk bug fixing, large-scale refactoring, and documentation generation by packaging entire projects into a single, LLM-friendly text payload. The target audience includes developers working with LLMs for code-related tasks, particularly those using tools like Cursor or Gemini.

How It Works

Shotgun operates by scanning a selected project directory and generating a structured text output that includes the file tree and the content of selected files. This payload is designed for easy parsing by LLMs. The tool uses a Go backend with Wails for a cross-platform desktop UI (Vue.js). Users can interactively exclude files and directories (e.g., node_modules, build artifacts) to optimize the prompt size and cost. The output is then pasted into an LLM, which can return a diff-style patch that Shotgun aims to facilitate applying.

Quick Start & Requirements

  • Install: Requires Go ≥ 1.20 and Node.js LTS. Install Wails CLI: go install github.com/wailsapp/wails/v2/cmd/wails@latest. Clone the repo, run go mod tidy, cd frontend, npm install, then wails dev to run.
  • Prerequisites: Go, Node.js.
  • Setup: Development setup involves cloning, dependency installation, and running wails dev.
  • Docs: https://github.com/glebkudr/shotgun_code

Highlighted Details

  • Fast tree scan (Go + Wails backend) for thousands of files in milliseconds.
  • Interactive exclude list for fine-grained control over context.
  • Deterministic delimiters for reliable LLM parsing.
  • Cross-platform native executable (Windows, macOS, Linux).
  • Lightweight, single native executable with a Vue UI.

Maintenance & Community

  • Open to PRs and issues.
  • Go code should be formatted with go fmt, Vue 3 style guidelines recommended.

Licensing & Compatibility

  • License: Custom MIT-like (see LICENSE.md).
  • Compatible with commercial use and closed-source linking.

Limitations & Caveats

The "Execute Prompt" and "Apply Patch" steps are currently stubbed/conceptual, meaning the tool currently focuses on generating the context payload and composing the prompt, not directly executing LLM calls or applying patches within the application. The roadmap indicates these features are planned.

Health Check
Last commit

1 month ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
1
Star History
1,646 stars in the last 90 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), Anil Dash Anil Dash(Former CEO of Glitch), and
13 more.

cline by cline

0.8%
48k
VS Code extension for autonomous coding agent
created 1 year ago
updated 1 day ago
Feedback? Help us improve.