Open Devin - Cheatsheet

Overview

Quick reference: Essential commands, configuration patterns, and automation workflows for effective Open Devin usage

Basic Commands

Task Execution

# Run simple task
python main.py --task "Create user login form"

# Specify workspace
python main.py --task "Fix bug in auth" --workspace ./project

# Set iterations limit
python main.py --task "Add tests" --max-iter 50

# Enable detailed logging
python main.py --task "Refactor API" --verbose

Configuration

# Set environment variables
export LLM_MODEL=gpt-4
export LLM_API_KEY=your_key
export WORKSPACE_BASE=/workspace

# Use configuration file
python main.py --config config.yaml

# Override settings
python main.py --model claude-3 --sandbox docker

Task Patterns

Development Tasks

# Feature implementation
"Implement user authentication with JWT tokens"

# Bug fixes  
"Fix the memory leak in the image processing module"

# Refactoring
"Refactor the payment service to use modern patterns"

# Testing
"Add comprehensive unit tests for the user service"

Complex Workflows

# Full feature development
"Build complete shopping cart functionality with backend API, frontend components, and tests"

# Migration projects
"Migrate the entire project from JavaScript to TypeScript"

# Performance optimization
"Optimize database queries and add caching layer"

Configuration Templates

Basic Configuration

model: gpt-4
max_iterations: 100
workspace: ./project
sandbox_type: docker
auto_save: true
enable_tools: true

Advanced Configuration

model:
  name: gpt-4
  temperature: 0.1
  max_tokens: 4000

workspace:
  base_path: ./workspace
  auto_backup: true
  git_integration: true

automation:
  auto_test: true
  auto_deploy: false
  quality_checks: true

Common Workflows

Development Cycle

  1. Describe task clearly
  2. Review generated plan
  3. Monitor execution progress
  4. Validate results
  5. Provide feedback for improvements

Quality Assurance

  1. Run automated code analysis
  2. Execute comprehensive tests
  3. Review security implications
  4. Check performance impact
  5. Validate business requirements

Automation Examples

CI/CD Automation

# Pipeline setup
"Create complete CI/CD pipeline with testing, security scanning, and deployment"

# Quality gates
"Set up automated code quality checks with ESLint, Prettier, and tests"

# Deployment automation
"Implement blue-green deployment with health checks and rollback"

Maintenance Tasks

# Dependency updates
"Update all dependencies and fix breaking changes"

# Security patches
"Scan for security vulnerabilities and apply fixes"

# Performance optimization
"Identify and fix performance bottlenecks"

Troubleshooting

Common Issues

  • Task timeout: Increase max_iterations
  • Permission errors: Check workspace permissions
  • API failures: Verify API key and model
  • Tool errors: Check tool availability

Debug Commands

# Enable debug logging
python main.py --debug --task "your task"

# Check system status
python main.py --health-check

# Validate configuration
python main.py --validate-config

Best Practices

✅ Effective Usage

  • Write clear, specific task descriptions
  • Include context and requirements
  • Specify testing and quality expectations
  • Use version control for all changes
  • Review and validate all outputs

⚠️ Safety Guidelines

  • Always backup before major changes
  • Test in non-production environments first
  • Review security implications
  • Validate business logic accuracy
  • Monitor system resources