springbot
v1.0.2
Published
Generate a Semantic Map of your Spring Boot project for LLMs
Downloads
59
Maintainers
Readme
SpringBot
SpringBot is a high-performance, zero-dependency CLI tool designed to scan Spring Boot repositories and generate a token-optimized "Semantic Map" in Markdown.
When feeding large codebases into Large Language Models (LLMs) like GPT-4 or Gemini, raw source code often exhausts the context window. SpringBot solves this by using advanced AST parsing to extract only the critical architectural elements (Beans, Repositories, REST Endpoints, Data Entities, and Configuration) while ignoring method bodies and stripping fully-qualified package names to save tokens.
Quick Start
The fastest way to use SpringBot is without installing it at all! Just use npx in the root of any Spring Boot project:
npx springbot packThis will instantly generate a semantic-map.md file in your current directory.
Installation
If you prefer to install it globally on your machine:
npm install -g springbotThen you can run it anywhere:
springbot packUsage
SpringBot uses a simple subcommand architecture.
Scan a Specific Project
Provide the absolute or relative path to a Spring Boot project root:
npx springbot pack /path/to/your/spring-boot-projectAdvanced Options
# Specify a custom output file
npx springbot pack . -o custom-architecture.md
# View the built-in help menu
npx springbot --helpKey Features
- No Setup Required: Works instantly via
npxwithout needing to compile the target project. - Deep AST Parsing: Accurately identifies Spring annotations (
@Service,@RestController,@Entity, etc.). - Modern Java Support: Fully supports modern Java constructs up to Java 17+, including
recorddeclarations (DTOs), enhancedswitchexpressions, and pattern matching. - Smart Discovery: Recursively scans directories for
.java,application.properties, and.ymlfiles, flattening nested YAML configurations automatically. - Secure Configuration Extraction: Automatically redacts sensitive keys containing "password", "secret", "token", or "key" before passing them to the LLM.
- Token-Optimized Output: Generates a highly dense, hierarchical Markdown file (no heavy Markdown tables) specifically formatted for optimal LLM consumption.
Built with ❤️ by Vishwanath Hiremath.
