Skip to main content

An intelligent AI development companion for Cursor IDE

Project description

🧞‍♂️ Bat Genie: Your AI-Powered Development Companion

Transform your Cursor IDE into an intelligent, proactive development assistant that anticipates your needs and supercharges your coding workflow. Built on top of the powerful devin.cursorrules framework, Bat Genie takes it further with enhanced features and practical developer tools.

🌟 What Makes Bat Genie Special?

Bat Genie combines the power of multiple AI models and development tools to become your personal coding companion. It's like having a senior developer, security expert, and documentation specialist all rolled into one.

Real-World Examples

  1. Code Review & Optimization
# Before: A simple but inefficient function
def find_duplicates(lst):
    duplicates = []
    for i in range(len(lst)):
        for j in range(i + 1, len(lst)):
            if lst[i] == lst[j] and lst[i] not in duplicates:
                duplicates.append(lst[i])
    return duplicates

# After Bat Genie's optimization:
from collections import Counter

def find_duplicates(lst):
    return [item for item, count in Counter(lst).items() if count > 1]
# Performance improved from O(n²) to O(n)
  1. Security Vulnerability Detection
# Before: Vulnerable code
@app.route('/user/<username>')
def user_profile(username):
    query = f"SELECT * FROM users WHERE username = '{username}'"
    return db.execute(query).fetchone()

# After Bat Genie's security analysis:
@app.route('/user/<username>')
@login_required
def user_profile(username):
    if not re.match(r'^[a-zA-Z0-9_]+$', username):
        return jsonify({"error": "Invalid username"}), 400
    query = "SELECT * FROM users WHERE username = ?"
    return db.execute(query, (username,)).fetchone()
  1. Smart Dependency Management
# Input: "Need a modern web API with async support and PostgreSQL"
# Bat Genie suggests:
fastapi>=0.103.2  # Modern async web framework
sqlalchemy>=2.0.22  # SQL toolkit and ORM
asyncpg>=0.28.0  # High-performance PostgreSQL client
pydantic>=2.4.2  # Data validation
alembic>=1.12.0  # Database migrations
  1. Automated Documentation
# Before: Undocumented code
class DataProcessor:
    def process_data(self, data, options=None):
        if options is None:
            options = {}
        cleaned_data = self._clean_data(data)
        return self._transform_data(cleaned_data, options)

# After Bat Genie's documentation:
class DataProcessor:
    """A flexible data processing pipeline for cleaning and transforming data.
    
    This class implements a two-step data processing workflow:
    1. Data cleaning: Removes invalid or None values
    2. Data transformation: Applies custom transformations
    
    Examples:
        >>> processor = DataProcessor()
        >>> data = [1, None, 3, None, 5]
        >>> processor.process_data(data, {'transform_func': lambda x: x * 2})
        [2, 6, 10]
    """

🚀 Features

  1. Intelligent Code Analysis

    • Real-time code review and suggestions
    • Performance optimization recommendations
    • Security vulnerability detection
    • Best practices enforcement
  2. Smart Documentation

    • Automatic docstring generation
    • README creation and maintenance
    • API documentation
    • Code examples and usage patterns
  3. Development Workflow Optimization

    • Dependency management
    • Code refactoring suggestions
    • Test case generation
    • Error analysis and debugging
  4. Multi-Agent Architecture

    • Strategic Planner (powered by OpenAI's o1)
    • Tactical Executor (powered by Claude/GPT-4)
    • Continuous learning and improvement

🔄 Staying Updated

Bat Genie is built as a Git submodule on top of devin.cursorrules, ensuring you always have access to the latest improvements:

# Initial setup
git submodule add https://github.com/grapeot/devin.cursorrules .cursor/devin
git submodule update --init --recursive

# Update to latest version
git submodule update --remote .cursor/devin

🛠️ Setup

  1. Clone the repository with submodules:
git clone --recursive https://github.com/yourusername/bat-genie.git
cd bat-genie
  1. Create and activate Python environment:
python3 -m venv venv
source venv/bin/activate  # On Windows: .\venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Configure your environment:
cp .env.example .env
# Edit .env with your API keys

💡 Usage Examples

Daily Development Tasks

  1. Code Review
from bat_genie import CodeReviewer

# Review current file or specific code
await reviewer.review_current_file()
  1. Dependency Analysis
from bat_genie import DependencyManager

# Get smart package recommendations
await manager.suggest_dependencies("Need a modern web framework with auth")
  1. Security Audit
from bat_genie import SecurityAnalyzer

# Analyze security of your codebase
await analyzer.audit_directory("./src")

🤝 Contributing

Contributions are welcome! Check out our Contributing Guidelines for details.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

Built on top of the excellent devin.cursorrules project by @grapeot.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

batgenie-0.1.0.tar.gz (50.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

batgenie-0.1.0-py3-none-any.whl (60.6 kB view details)

Uploaded Python 3

File details

Details for the file batgenie-0.1.0.tar.gz.

File metadata

  • Download URL: batgenie-0.1.0.tar.gz
  • Upload date:
  • Size: 50.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for batgenie-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4f3273a89f7e5642961f849cc9afa3d4c4fa9674becb7dac120f94b3dd0ab7f5
MD5 c465b38962338db14c3334aeb4a63e77
BLAKE2b-256 3f96c787b5198a4f82403564f52f9e21a6c9ade1018e911e95eb963270cec6d2

See more details on using hashes here.

File details

Details for the file batgenie-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: batgenie-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 60.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for batgenie-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 741351ac37d774e6cc44cad9d6eaee06585aec6085f7d8fcdfc7864692500bdb
MD5 ec1f12ba18da931cd3cc1e5d61ddd188
BLAKE2b-256 0391d40155bae7492d5b3ef4f3d9241bd776a37c52074f2d4d3ae393768a83b0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page