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-1.0.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-1.0.0-py3-none-any.whl (60.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: batgenie-1.0.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-1.0.0.tar.gz
Algorithm Hash digest
SHA256 7a365e1c401954f19cc49bc504541e8eea4007a3a3f956e14701a33f7c0a9500
MD5 b7312577f580281257d9bfd27259db81
BLAKE2b-256 371e2a26d9b42b87a1693739f3890d0981262863f97e98a943fd215233c4c1ab

See more details on using hashes here.

File details

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

File metadata

  • Download URL: batgenie-1.0.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-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 07d36555d309fab66970cbcf40eebf8db580fcdf521aae47157f9ce9841bb017
MD5 3f594713d9d92f7474ece5fc9702036e
BLAKE2b-256 bab053c803a9de9a1efeefb7b6dcc4069f316bc3b288559421a7ddc745fffbbc

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