Devin.cursorrules
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)
Installation
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/project
Using Docker
You 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 up
Available 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
Staying Updated
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 --force
Quick Start
The 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-venv
The script will:
- Copy necessary configuration files
- Set up Python virtual environment
- Install required dependencies
- Configure environment variables
Manual Setup
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
Tools Included
- Web scraping with JavaScript support (using Playwright)
- Search engine integration (DuckDuckGo)
- LLM-powered text analysis
- Process planning and self-reflection capabilities
Command-line Tools
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
Development
Running Tests
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 unit
Continuous Integration
The 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
Changelog
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
Deployment
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
Contributing
- 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
Background
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
License
MIT License
Metadata
Release files for cursor-agent 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cursor_agent-0.1.4.tar.gz | 24.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cursor_agent-0.1.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 46.1 kB
Release files / cursor_agent-0.1.4.tar.gz
| Download URL | cursor_agent-0.1.4.tar.gz |
|---|---|
| Size | 24.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
934632206049a2abc42af002a761b62f3c11f905a819bfa09dc019893abfc59c
|
|
BLAKE2b-256 checksum How to use checksums |
97652567dd3ce89e328032d3a39434620251949447e3753b41acfad96ed2fea0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.11.6
|
Release files / cursor_agent-0.1.4-py3-none-any.whl
| Download URL | cursor_agent-0.1.4-py3-none-any.whl |
|---|---|
| Size | 21.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
148477720205e9db70bb06e80a83aa8feb39cfd85832cae83a110f34ccbf3c4f
|
|
BLAKE2b-256 checksum How to use checksums |
6c6ca8932e6bcb194c1b24d5d0144934f96bb1c1e535ab5a7a3299b77f4ee190
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.11.6
|