Overview
Thesquash command is the primary interface for Splat’s AI-powered debugging. It executes your code, captures any errors that occur, and provides intelligent fixes based on comprehensive context analysis.
Basic Usage
splat squash:
How It Works
When you runsplat squash, the tool:
- Executes your command in a controlled subprocess environment
- Captures all output including stdout, stderr, and return codes
- Parses error tracebacks to identify affected files and line numbers
- Gathers context from your codebase (respecting .gitignore)
- Analyzes with AI using Groq’s fast inference models
- Provides actionable fixes with specific code suggestions
Example Output
When Splat detects an error, it provides structured analysis:Error Analysis
Splat’s AI engine analyzes errors and returns:- WHERE: Repository path, filename, and exact line number
- WHAT: Error type and clear explanation
- HOW: Line where error originated and suggested code solution
Response Format
The AI response is structured as JSON internally:Context Gathering
Splat automatically:- Parses error stack traces to identify relevant files
- Respects your
.gitignoreto avoid sensitive data - Uses
repomixto package file context efficiently - Sends only relevant code to the AI model
Performance
Splat is optimized for speed:- Uses Groq (llama3-70b-8192) for near-instant inference
- Captures output in real-time with threading
- Minimizes context sent to AI while maximizing relevance
Use Cases
Quick Bug Fixes
Development Workflow
Testing
Limitations
Suggested code fixes do not currently conform to your project’s formatting configuration (e.g., Black, Prettier).
Next Steps
- Learn about the
-rflag for enhanced context - Explore interactive mode for iterative debugging
- Understand how Splat gathers context