🧞♂️ 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
- 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)
- 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()
- 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
- 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
-
Intelligent Code Analysis
- Real-time code review and suggestions
- Performance optimization recommendations
- Security vulnerability detection
- Best practices enforcement
-
Smart Documentation
- Automatic docstring generation
- README creation and maintenance
- API documentation
- Code examples and usage patterns
-
Development Workflow Optimization
- Dependency management
- Code refactoring suggestions
- Test case generation
- Error analysis and debugging
-
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
- Clone the repository with submodules:
git clone --recursive https://github.com/yourusername/bat-genie.git
cd bat-genie
- Create and activate Python environment:
python3 -m venv venv
source venv/bin/activate # On Windows: .\venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Configure your environment:
cp .env.example .env
# Edit .env with your API keys
💡 Usage Examples
Daily Development Tasks
- Code Review
from bat_genie import CodeReviewer
# Review current file or specific code
await reviewer.review_current_file()
- Dependency Analysis
from bat_genie import DependencyManager
# Get smart package recommendations
await manager.suggest_dependencies("Need a modern web framework with auth")
- 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.
Metadata
Release files for batgenie 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| batgenie-1.0.0.tar.gz | 50.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| batgenie-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 111.3 kB
Release files / batgenie-1.0.0.tar.gz
| Download URL | batgenie-1.0.0.tar.gz |
|---|---|
| Size | 50.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7a365e1c401954f19cc49bc504541e8eea4007a3a3f956e14701a33f7c0a9500
|
|
BLAKE2b-256 checksum How to use checksums |
371e2a26d9b42b87a1693739f3890d0981262863f97e98a943fd215233c4c1ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.1
|
Release files / batgenie-1.0.0-py3-none-any.whl
| Download URL | batgenie-1.0.0-py3-none-any.whl |
|---|---|
| Size | 60.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
07d36555d309fab66970cbcf40eebf8db580fcdf521aae47157f9ce9841bb017
|
|
BLAKE2b-256 checksum How to use checksums |
bab053c803a9de9a1efeefb7b6dcc4069f316bc3b288559421a7ddc745fffbbc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.1
|
Security for batgenie 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.