A web-based tool to generate Vale linter rules using natural language. It uses AI models combined with the official Vale documentation to create accurate YAML configurations. This tool is designed to lower the barrier to entry for creating custom Vale rules by translating plain English requests into valid rule syntax.

- Support for Google Gemini, OpenAI GPT, and Anthropic Claude models
- Get 3 different rule approaches with confidence ratings (recommended and alternative options)
- Uses retrieval-augmented generation (RAG) with Vale documentation and real rule examples
- Clean web interface with collapsible alternatives, syntax highlighting, and copy buttons
- View the exact documentation snippets used to generate rules
This tool uses a Retrieval-Augmented Generation (RAG) pipeline. When you enter a request, the application searches a vector database containing the official Vale documentation and real rule examples from Vale core, Google, and Microsoft style guides. The most relevant documents are retrieved and provided to your chosen AI model as context, along with your request. This allows the model to generate multiple rule alternatives that are grounded in Vale's actual syntax and proven patterns.
- Python 3.8+
- At least one API key from:
- Google Gemini API
- OpenAI API
- Anthropic Claude API
Follow these steps to run the application locally.
git clone <repository_url> # Replace with the actual URL
cd vale-rule-generator
# For macOS/Linux
python3 -m venv venv
source venv/bin/activate
# For Windows
python -m venv venv
venv\Scripts\activate
pip install -r requirements.txt
Copy the example .env
file to .env
and add your API keys.
cp .env.example .env
Open the .env
file and add at least one API key:
GEMINI_API_KEY="your_gemini_key_here"
OPENAI_API_KEY="your_openai_key_here"
ANTHROPIC_API_KEY="your_claude_key_here"
The application will automatically detect which providers are available based on your configured keys.
This script downloads the Vale documentation and builds the local vector database. This may take a few minutes.
python setup.py
python app.py
The application will now be running at http://127.0.0.1:5001
.
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.