Open SWE - Cheatsheet
Overview
Quick reference: Essential commands, configuration patterns, and workflow shortcuts for effective Open SWE usage
Basic Commands
Repository Analysis
# Analyze repository structure
python -m opendevin --analyze ./project
# Generate dependency map
python -m opendevin --deps --format=json
# Security scan
python -m opendevin --security-scan
# Performance analysis
python -m opendevin --perf-analysis
Code Modifications
# Apply refactoring
python -m opendevin --refactor "task description"
# Cross-file changes
python -m opendevin --modify-files "*.py,*.js"
# Generate tests
python -m opendevin --generate-tests
# Update documentation
python -m opendevin --update-docs
Task Patterns
Analysis Tasks
# Code quality analysis
"Analyze code quality and suggest improvements"
# Architecture review
"Review system architecture and identify issues"
# Security audit
"Perform comprehensive security analysis"
# Performance review
"Identify performance bottlenecks"
Modification Tasks
# Large refactoring
"Refactor [component] to use modern patterns"
# Bug fixes
"Fix [issue] across all affected files"
# Feature addition
"Add [feature] with proper error handling"
# Migration
"Migrate from [old] to [new] framework"
Configuration Options
Analysis Settings
{
"analysis": {
"max_files": 500,
"include_patterns": ["*.py", "*.js", "*.ts"],
"exclude_dirs": ["node_modules", ".git"],
"depth_limit": 10
}
}
Safety Settings
{
"safety": {
"backup_files": true,
"dry_run": false,
"confirm_changes": true,
"max_changes": 100
}
}
Common Workflows
Code Review Workflow
- Run comprehensive analysis
- Review suggested changes
- Apply approved modifications
- Run tests and validation
- Generate updated documentation
Migration Workflow
- Analyze current codebase
- Plan migration strategy
- Execute incremental changes
- Validate each step
- Update build and deploy
Best Practices
✅ Effective Usage
- Start with analysis before modifications
- Use specific, detailed task descriptions
- Always backup before major changes
- Validate changes thoroughly
- Review all generated code
⚠️ Safety Tips
- Use version control for all changes
- Test changes in staging first
- Review security implications
- Validate business logic accuracy
- Monitor performance after changes