aimevzulari's picture
Update README.md
c9f4d53 verified
---
title: Cursor Rules Generator
emoji: 🧩
colorFrom: blue
colorTo: indigo
sdk: gradio
sdk_version: "4.13.0"
app_file: app.py
pinned: false
---
# Cursor Rules Generator - Hugging Face Deployment
This repository contains a Cursor Rules Generator application that supports Gemini, OpenRouter, OpenAI API and all their models.
## About
Cursor Rules Generator is a web application that helps you create Cursor Rules in MDC format. Cursor Rules provide system-level guidance to AI models, offering a persistent way to encode context, preferences, or workflows for your projects.
## Features
- Support for multiple LLM providers (Gemini, OpenRouter, OpenAI)
- MDC format generation
- Different rule types (Always, Auto Attached, Agent Requested, Manual)
- Easy export of generated rules
- Responsive design
## Installation
```bash
pip install -r requirements.txt
```
## Usage
```bash
python app.py
```
## Environment Variables
Create a `.env` file with the following variables:
```
# Optional default API keys
GEMINI_API_KEY=your_gemini_api_key
OPENAI_API_KEY=your_openai_api_key
OPENROUTER_API_KEY=your_openrouter_api_key
# App settings
DEBUG=False
PORT=7860
```
## API Reference
The application provides the following API endpoints:
- `/api/providers`: Get a list of supported LLM providers
- `/api/rule-types`: Get a list of supported rule types
- `/api/validate-api-key`: Validate an API key for a specific provider
- `/api/models`: Get a list of available models for a specific provider
- `/api/generate-rule`: Generate a Cursor Rule
## License
MIT
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference