ai-rulez: autogenerate rule files (.cursorrules, CLAUDE.md etc.) from yaml

GitHub: https://github.com/Goldziher/ai-rulez

The Problem

If you’re using multiple AI coding tools (Claude, Cursor, Windsurf, etc.), you’ve probably noticed each one requires its configuration file – .cursorrules, .windsurfrules, CLAUDE.md, and so on. Maintaining consistent coding standards across all these tools can be frustrating.

Solution: Write Once, Generate for Any Tool

AI-Rulez lets you define your coding rules once in a structured YAML file and automatically generates configuration files for any AI tool, including current ones and future ones. It’s completely platform-agnostic with a powerful templating system.

It’s very fast, written in Go, and it has wrappers for Python (pip) and Node (npm).

Configuration

All configuration is done using ai_rulez.yaml (.ai_rulez.yaml also supported):

« `yaml metadata: name: « My Python Project Rules » version: « 1.0.0 »

outputs: – file: « CLAUDE.md » – file: « .cursorrules » – file: « .windsurfrules » – file: « custom-ai-tool.txt » # Any format you need!

rules: – name: « Code Style » priority: 10 content: | – Use Python 3.11+ features – Follow PEP 8 strictly – Use type hints everywhere

name: « Testing » priority: 5 content: | Write tests for all public functions Use pytest with fixtures Aim for 90% code coverage « `

Run ai-rulez generate and get perfectly formatted files for every tool!

Target Audience

Developers using AI coding assistants (any language) Teams wanting consistent coding standards across AI tools Open source maintainers documenting project conventions Early adopters who want to future-proof their AI tool configurations Anyone tired of maintaining duplicate rule files

Comparison to Alternatives

There are a few projects like this out there, but the ones I’ve seen are quite basic. This tool, in comparison, is quite robust.

Examples: – dhruvbaldawa/template-ai – mugi-uno/airules

submitted by /u/Goldziher to r/Python
[link] [comments]


Commentaires

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *