# 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)
[![Tests](https://github.com/grapeot/devin.cursorrules/actions/workflows/test.yml/badge.svg)](https://github.com/grapeot/devin.cursorrules/actions/workflows/test.yml)
[![PyPI version](https://badge.fury.io/py/cursor-agent.svg)](https://badge.fury.io/py/cursor-agent)
[![Python versions](https://img.shields.io/pypi/pyversions/cursor-agent.svg)](https://pypi.org/project/cursor-agent/)
## Installation
You can install cursor-agent using pip:
```bash
# 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:
```bash
# 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 key
- `ANTHROPIC_API_KEY`: Anthropic API key
- `DEEPSEEK_API_KEY`: DeepSeek API key
- `GOOGLE_API_KEY`: Google API key
### Staying Updated
To get the latest version:
```bash
# 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:
```bash
# 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:
1. Copy necessary configuration files
2. Set up Python virtual environment
3. Install required dependencies
4. Configure environment variables
## Manual Setup
If you prefer manual setup, follow these steps:
1. Create Python virtual environment:
```bash
# 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
```
2. Configure environment variables:
```bash
# Copy the example environment file
cp .env.example .env
# Edit .env with your API keys and configurations
```
3. Install dependencies:
```bash
# 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:
1. `cursor-agent`: Initialize a directory with Cursor agent capabilities
```bash
cursor-agent [directory]
```
2. `cursor-llm`: Interact with various LLM providers
```bash
cursor-llm --prompt "Your prompt" --provider "anthropic"
# Supported providers: OpenAI (default), DeepSeek, Anthropic, Gemini, Local LLM
```
3. `cursor-scrape`: Web scraping with JavaScript support
```bash
cursor-scrape --max-concurrent 3 URL1 URL2 URL3
```
4. `cursor-search`: Search engine integration
```bash
cursor-search "your search keywords"
```
5. `cursor-update`: Update cursor-agent to latest version
```bash
cursor-update
cursor-update --force # Force update
```
6. `cursor-verify`: Verify setup and dependencies
```bash
cursor-verify
```
## Development
### Running Tests
The project uses pytest for testing. To run tests:
```bash
# 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:
1. Runs all tests
2. Generates coverage reports
3. Uploads coverage to Codecov
4. Fails if coverage drops below threshold
### Changelog
The project uses automated changelog generation based on conventional commits.
1. **Commit Message Format**:
```
type(scope): description
[optional body]
[optional footer]
```
Types:
- `feat`: New feature
- `fix`: Bug fix
- `docs`: Documentation
- `style`: Formatting
- `refactor`: Code restructuring
- `perf`: Performance improvement
- `test`: Tests
- `build`: Build system
- `ci`: CI/CD
- `chore`: Maintenance
2. **Generate Changelog**:
```bash
# 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
```
3. **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:
1. **PyPI Package**:
```bash
# Install latest release
pip install cursor-agent
# Install specific version
pip install cursor-agent==1.0.0
```
2. **Docker Container**:
```bash
# Build locally
docker build -t cursor-agent .
# Run with volume mount
docker run -v /path/to/project:/workspace cursor-agent
```
3. **Manual Setup**:
```bash
git clone https://github.com/grapeot/devin.cursorrules.git
cd devin.cursorrules
python init_cursor_agent.py /path/to/project
```
### Contributing
1. Fork the repository
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
3. Run tests locally (`pytest`)
4. Commit your changes (`git commit -m 'Add some amazing feature'`)
5. Push to the branch (`git push origin feature/amazing-feature`)
6. 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](https://yage.ai/cursor-to-devin-en.html)
## License
MIT License
Raw data
{
"_id": null,
"home_page": "https://github.com/grapeot/devin.cursorrules",
"name": "cursor-agent",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "cursor, agent, llm, ai, automation, development",
"author": "grapeot",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/97/65/2567dd3ce89e328032d3a39434620251949447e3753b41acfad96ed2fea0/cursor_agent-0.1.4.tar.gz",
"platform": null,
"description": "# Devin.cursorrules\n\nTransform 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:\n\n- Process planning and self-evolution\n- Extended tool usage (web browsing, search, LLM-powered analysis)\n- Automated execution (for Windsurf in Docker containers)\n\n[![Tests](https://github.com/grapeot/devin.cursorrules/actions/workflows/test.yml/badge.svg)](https://github.com/grapeot/devin.cursorrules/actions/workflows/test.yml)\n[![PyPI version](https://badge.fury.io/py/cursor-agent.svg)](https://badge.fury.io/py/cursor-agent)\n[![Python versions](https://img.shields.io/pypi/pyversions/cursor-agent.svg)](https://pypi.org/project/cursor-agent/)\n\n## Installation\n\nYou can install cursor-agent using pip:\n\n```bash\n# Install from PyPI\npip install cursor-agent\n\n# Initialize in current directory\ncursor-agent\n\n# Or specify a target directory\ncursor-agent /path/to/project\n```\n\n### Using Docker\n\nYou can also run cursor-agent using Docker:\n\n```bash\n# Using docker directly\ndocker run -v $(pwd):/workspace -e OPENAI_API_KEY=your_key cursor-agent /workspace\n\n# Or using docker-compose\nexport TARGET_DIR=$(pwd) # Directory to initialize\nexport OPENAI_API_KEY=your_key # Your API keys\ndocker-compose up\n```\n\nAvailable environment variables:\n- `TARGET_DIR`: Directory to initialize (default: current directory)\n- `OPENAI_API_KEY`: OpenAI API key\n- `ANTHROPIC_API_KEY`: Anthropic API key\n- `DEEPSEEK_API_KEY`: DeepSeek API key\n- `GOOGLE_API_KEY`: Google API key\n\n### Staying Updated\n\nTo get the latest version:\n\n```bash\n# Check and update to latest version\npython -m cursor_agent.update\n\n# Force update even if current version is up to date\npython -m cursor_agent.update --force\n```\n\n## Quick Start\n\nThe easiest way to add Cursor agent capabilities to your project is using the initialization script:\n\n```bash\n# Initialize in current directory\npython init_cursor_agent.py\n\n# Or specify a target directory\npython init_cursor_agent.py /path/to/project\n\n# Force overwrite existing files (creates backups)\npython init_cursor_agent.py --force\n\n# Skip virtual environment creation\npython init_cursor_agent.py --skip-venv\n```\n\nThe script will:\n1. Copy necessary configuration files\n2. Set up Python virtual environment\n3. Install required dependencies\n4. Configure environment variables\n\n## Manual Setup\n\nIf you prefer manual setup, follow these steps:\n\n1. Create Python virtual environment:\n```bash\n# Create a virtual environment in ./venv\npython3 -m venv venv\n\n# Activate the virtual environment\n# On Unix/macOS:\nsource venv/bin/activate\n# On Windows:\n.\\venv\\Scripts\\activate\n```\n\n2. Configure environment variables:\n```bash\n# Copy the example environment file\ncp .env.example .env\n\n# Edit .env with your API keys and configurations\n```\n\n3. Install dependencies:\n```bash\n# Install required packages\npip install -r requirements.txt\n\n# Install Playwright's Chromium browser (required for web scraping)\npython -m playwright install chromium\n```\n\n## Tools Included\n\n- Web scraping with JavaScript support (using Playwright)\n- Search engine integration (DuckDuckGo)\n- LLM-powered text analysis\n- Process planning and self-reflection capabilities\n\n## Command-line Tools\n\nAfter installation, the following command-line tools are available:\n\n1. `cursor-agent`: Initialize a directory with Cursor agent capabilities\n ```bash\n cursor-agent [directory]\n ```\n\n2. `cursor-llm`: Interact with various LLM providers\n ```bash\n cursor-llm --prompt \"Your prompt\" --provider \"anthropic\"\n # Supported providers: OpenAI (default), DeepSeek, Anthropic, Gemini, Local LLM\n ```\n\n3. `cursor-scrape`: Web scraping with JavaScript support\n ```bash\n cursor-scrape --max-concurrent 3 URL1 URL2 URL3\n ```\n\n4. `cursor-search`: Search engine integration\n ```bash\n cursor-search \"your search keywords\"\n ```\n\n5. `cursor-update`: Update cursor-agent to latest version\n ```bash\n cursor-update\n cursor-update --force # Force update\n ```\n\n6. `cursor-verify`: Verify setup and dependencies\n ```bash\n cursor-verify\n ```\n\n## Development\n\n### Running Tests\n\nThe project uses pytest for testing. To run tests:\n\n```bash\n# Install test dependencies\npip install pytest pytest-cov\n\n# Run all tests with coverage\npytest\n\n# Run specific test file\npytest tests/test_init_cursor_agent.py\n\n# Run tests excluding slow ones\npytest -m \"not slow\"\n\n# Run only unit tests\npytest -m unit\n```\n\n### Continuous Integration\n\nThe project uses GitHub Actions for continuous integration, running tests on:\n- Multiple Python versions (3.8, 3.9, 3.10, 3.11)\n- Multiple operating systems (Ubuntu, Windows, macOS)\n\nThe CI pipeline:\n1. Runs all tests\n2. Generates coverage reports\n3. Uploads coverage to Codecov\n4. Fails if coverage drops below threshold\n\n### Changelog\n\nThe project uses automated changelog generation based on conventional commits.\n\n1. **Commit Message Format**:\n ```\n type(scope): description\n \n [optional body]\n [optional footer]\n ```\n \n Types:\n - `feat`: New feature\n - `fix`: Bug fix\n - `docs`: Documentation\n - `style`: Formatting\n - `refactor`: Code restructuring\n - `perf`: Performance improvement\n - `test`: Tests\n - `build`: Build system\n - `ci`: CI/CD\n - `chore`: Maintenance\n\n2. **Generate Changelog**:\n ```bash\n # Preview changelog\n python tools/generate_changelog.py\n \n # Update CHANGELOG.md\n python tools/generate_changelog.py --update\n \n # Specify version\n python tools/generate_changelog.py --version v1.0.0\n ```\n\n3. **Automated Generation**:\n - Changelog is automatically generated on new releases\n - Generated from commits since last tag\n - Categorized by commit type\n - Included in GitHub release notes\n\n### Deployment\n\nThe project supports multiple deployment methods:\n\n1. **PyPI Package**:\n ```bash\n # Install latest release\n pip install cursor-agent\n \n # Install specific version\n pip install cursor-agent==1.0.0\n ```\n\n2. **Docker Container**:\n ```bash\n # Build locally\n docker build -t cursor-agent .\n \n # Run with volume mount\n docker run -v /path/to/project:/workspace cursor-agent\n ```\n\n3. **Manual Setup**:\n ```bash\n git clone https://github.com/grapeot/devin.cursorrules.git\n cd devin.cursorrules\n python init_cursor_agent.py /path/to/project\n ```\n\n### Contributing\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Run tests locally (`pytest`)\n4. Commit your changes (`git commit -m 'Add some amazing feature'`)\n5. Push to the branch (`git push origin feature/amazing-feature`)\n6. Open a Pull Request\n\n## Background\n\nFor 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](https://yage.ai/cursor-to-devin-en.html)\n\n## License\n\nMIT License\n",
"bugtrack_url": null,
"license": null,
"summary": "A tool for initializing projects with Cursor agent capabilities",
"version": "0.1.4",
"project_urls": {
"Bug Tracker": "https://github.com/grapeot/devin.cursorrules/issues",
"Documentation": "https://github.com/grapeot/devin.cursorrules#readme",
"Homepage": "https://github.com/grapeot/devin.cursorrules",
"Source Code": "https://github.com/grapeot/devin.cursorrules"
},
"split_keywords": [
"cursor",
" agent",
" llm",
" ai",
" automation",
" development"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "6c6ca8932e6bcb194c1b24d5d0144934f96bb1c1e535ab5a7a3299b77f4ee190",
"md5": "576fe650e7b65ac0b622029279457ed0",
"sha256": "148477720205e9db70bb06e80a83aa8feb39cfd85832cae83a110f34ccbf3c4f"
},
"downloads": -1,
"filename": "cursor_agent-0.1.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "576fe650e7b65ac0b622029279457ed0",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 21433,
"upload_time": "2025-01-15T05:53:23",
"upload_time_iso_8601": "2025-01-15T05:53:23.019207Z",
"url": "https://files.pythonhosted.org/packages/6c/6c/a8932e6bcb194c1b24d5d0144934f96bb1c1e535ab5a7a3299b77f4ee190/cursor_agent-0.1.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "97652567dd3ce89e328032d3a39434620251949447e3753b41acfad96ed2fea0",
"md5": "38c951a989d814e4037cb58a51168367",
"sha256": "934632206049a2abc42af002a761b62f3c11f905a819bfa09dc019893abfc59c"
},
"downloads": -1,
"filename": "cursor_agent-0.1.4.tar.gz",
"has_sig": false,
"md5_digest": "38c951a989d814e4037cb58a51168367",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 24710,
"upload_time": "2025-01-15T05:53:25",
"upload_time_iso_8601": "2025-01-15T05:53:25.177612Z",
"url": "https://files.pythonhosted.org/packages/97/65/2567dd3ce89e328032d3a39434620251949447e3753b41acfad96ed2fea0/cursor_agent-0.1.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-15 05:53:25",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "grapeot",
"github_project": "devin.cursorrules",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "playwright",
"specs": [
[
">=",
"1.41.0"
]
]
},
{
"name": "html5lib",
"specs": [
[
">=",
"1.1"
]
]
},
{
"name": "duckduckgo-search",
"specs": [
[
">=",
"4.1.1"
]
]
},
{
"name": "openai",
"specs": [
[
">=",
"1.12.0"
]
]
},
{
"name": "anthropic",
"specs": [
[
">=",
"0.42.0"
]
]
},
{
"name": "python-dotenv",
"specs": [
[
">=",
"1.0.0"
]
]
},
{
"name": "unittest2",
"specs": [
[
">=",
"1.1.0"
]
]
},
{
"name": "google-generativeai",
"specs": []
},
{
"name": "grpcio",
"specs": [
[
"==",
"1.60.1"
]
]
}
],
"lcname": "cursor-agent"
}