Overview
Splat supports command-line flags to customize its behavior and enhance debugging capabilities.Relational Flag (-r)
The-r flag enables relational context gathering, which significantly improves debugging accuracy by analyzing not just the files in the error stack, but also their dependencies.
Usage
Examples
How It Works
Without -r (Default Behavior)
When you run splat squash without the -r flag:
- Splat captures the error traceback
- Extracts only the files mentioned in the stack trace
- Sends those specific files as context to the AI
With -r (Relational Analysis)
When you run splat squash -r:
- Splat captures the error traceback
- Extracts files from the stack trace
- Builds an adjacency graph of all related files
- Finds Nth-degree connections (imports, dependencies)
- Includes all related files in the context sent to AI
Implementation Details
The relational analysis works by:When to Use -r
Use
-r when:- Errors involve imported modules or dependencies
- The error message doesn’t clearly indicate the root cause
- You need deeper analysis of inter-file relationships
- Working with complex, multi-file applications
Performance Considerations
The-r flag will:
- Increase context size: More files sent to AI
- Increase processing time: Building dependency graph takes time
- Improve accuracy: More context = better debugging suggestions
Context Size Comparison
Without-r:
-r:
Flag Position
The flag must come before the entrypoint command:Future Flags
Additional flags may be added in future versions for:
- Custom AI model selection
- Output format control (JSON, plain text, etc.)
- Verbosity levels
- Auto-fix application
Technical Details
Adjacency List Construction
The-r flag triggers building a file dependency graph:
Nth-Degree Traversal
Collects files connected to error files:Repopack Integration
Both modes userepomix to package context:
Environment Variables
Splat requires configuration via environment variables:API Key
.env file or export in your shell:
Best Practices
- Start without
-rfor quick debugging - Use
-rif the initial suggestion isn’t helpful - Check .gitignore to ensure sensitive files are excluded
- Keep entrypoint commands quoted to preserve arguments