Transform your $20 Cursor/Windsurf into a Devin-like experience in one minute! This repository contains configuration files and tools that enhance your Cursor or Windsurf IDE with advanced agentic AI capabilities similar to Devin, including:
- Process planning and self-evolution
- Extended tool usage (web browsing, search, LLM-powered analysis)
- Automated execution (for Windsurf in Docker containers)
You can install cursor-agent using pip:
# Install from PyPI
pip install cursor-agent
# Initialize in current directory
cursor-agent
# Or specify a target directory
cursor-agent /path/to/projectYou can also run cursor-agent using Docker:
# Using docker directly
docker run -v $(pwd):/workspace -e OPENAI_API_KEY=your_key cursor-agent /workspace
# Or using docker-compose
export TARGET_DIR=$(pwd) # Directory to initialize
export OPENAI_API_KEY=your_key # Your API keys
docker-compose upAvailable environment variables:
TARGET_DIR: Directory to initialize (default: current directory)OPENAI_API_KEY: OpenAI API keyANTHROPIC_API_KEY: Anthropic API keyDEEPSEEK_API_KEY: DeepSeek API keyGOOGLE_API_KEY: Google API key
To get the latest version:
# Check and update to latest version
python -m cursor_agent.update
# Force update even if current version is up to date
python -m cursor_agent.update --forceThe easiest way to add Cursor agent capabilities to your project is using the initialization script:
# Initialize in current directory
python init_cursor_agent.py
# Or specify a target directory
python init_cursor_agent.py /path/to/project
# Force overwrite existing files (creates backups)
python init_cursor_agent.py --force
# Skip virtual environment creation
python init_cursor_agent.py --skip-venvThe script will:
- Copy necessary configuration files
- Set up Python virtual environment
- Install required dependencies
- Configure environment variables
If you prefer manual setup, follow these steps:
- Create Python virtual environment:
# Create a virtual environment in ./venv
python3 -m venv venv
# Activate the virtual environment
# On Unix/macOS:
source venv/bin/activate
# On Windows:
.\venv\Scripts\activate- Configure environment variables:
# Copy the example environment file
cp .env.example .env
# Edit .env with your API keys and configurations- Install dependencies:
# Install required packages
pip install -r requirements.txt
# Install Playwright's Chromium browser (required for web scraping)
python -m playwright install chromium- Web scraping with JavaScript support (using Playwright)
- Search engine integration (DuckDuckGo)
- LLM-powered text analysis
- Process planning and self-reflection capabilities
After installation, the following command-line tools are available:
-
cursor-agent: Initialize a directory with Cursor agent capabilitiescursor-agent [directory]
-
cursor-llm: Interact with various LLM providerscursor-llm --prompt "Your prompt" --provider "anthropic" # Supported providers: OpenAI (default), DeepSeek, Anthropic, Gemini, Local LLM
-
cursor-scrape: Web scraping with JavaScript supportcursor-scrape --max-concurrent 3 URL1 URL2 URL3
-
cursor-search: Search engine integrationcursor-search "your search keywords" -
cursor-update: Update cursor-agent to latest versioncursor-update cursor-update --force # Force update -
cursor-verify: Verify setup and dependenciescursor-verify
The project uses pytest for testing. To run tests:
# Install test dependencies
pip install pytest pytest-cov
# Run all tests with coverage
pytest
# Run specific test file
pytest tests/test_init_cursor_agent.py
# Run tests excluding slow ones
pytest -m "not slow"
# Run only unit tests
pytest -m unitThe project uses GitHub Actions for continuous integration, running tests on:
- Multiple Python versions (3.8, 3.9, 3.10, 3.11)
- Multiple operating systems (Ubuntu, Windows, macOS)
The CI pipeline:
- Runs all tests
- Generates coverage reports
- Uploads coverage to Codecov
- Fails if coverage drops below threshold
The project uses automated changelog generation based on conventional commits.
-
Commit Message Format:
type(scope): description [optional body] [optional footer]Types:
feat: New featurefix: Bug fixdocs: Documentationstyle: Formattingrefactor: Code restructuringperf: Performance improvementtest: Testsbuild: Build systemci: CI/CDchore: Maintenance
-
Generate Changelog:
# Preview changelog python tools/generate_changelog.py # Update CHANGELOG.md python tools/generate_changelog.py --update # Specify version python tools/generate_changelog.py --version v1.0.0
-
Automated Generation:
- Changelog is automatically generated on new releases
- Generated from commits since last tag
- Categorized by commit type
- Included in GitHub release notes
The project supports multiple deployment methods:
-
PyPI Package:
# Install latest release pip install cursor-agent # Install specific version pip install cursor-agent==1.0.0
-
Docker Container:
# Build locally docker build -t cursor-agent . # Run with volume mount docker run -v /path/to/project:/workspace cursor-agent
-
Manual Setup:
git clone https://github.com/grapeot/devin.cursorrules.git cd devin.cursorrules python init_cursor_agent.py /path/to/project
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Run tests locally (
pytest) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
For detailed information about the motivation and technical details behind this project, check out the blog post: Turning $20 into $500 - Transforming Cursor into Devin in One Hour
MIT License