ai-rulez 2.1.3 → 2.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +47 -17
  2. package/ai-rulez.js +39 -0
  3. package/package.json +3 -3
package/README.md CHANGED
@@ -6,7 +6,28 @@
6
6
 
7
7
  **One config to rule them all.**
8
8
 
9
- Tired of manually managing rule files, subagents, and custom commands across different AI tools? `ai-rulez` gives you one `ai-rulez.yml` file to generate them all. Keep your AI context in sync, and even launch MCP servers for direct integration.
9
+ ## The Problem
10
+
11
+ If you're using multiple AI coding assistants (Claude Code, Cursor, Windsurf, GitHub Copilot), you've probably noticed the configuration fragmentation. Each tool demands its own format - `CLAUDE.md`, `.cursorrules`, `.windsurfrules`, `.github/copilot-instructions.md`. Keeping coding standards consistent across all these tools is frustrating and error-prone.
12
+
13
+ ## The Solution
14
+
15
+ AI-Rulez lets you write your project configuration once and automatically generates native files for every AI tool - current and future ones. It's like having a build system for AI context.
16
+
17
+ <p align="center">
18
+ <img src="docs/assets/ai-rulez-python-demo.gif" alt="AI-Rulez Demo" width="100%">
19
+ </p>
20
+
21
+ ## Why This Matters
22
+
23
+ Development teams using AI assistants face common challenges:
24
+ - **Multiple tools, multiple configs**: Your team uses Claude Code for reviews, Cursor for development, Copilot for completions
25
+ - **Configuration drift**: Maintaining separate files leads to inconsistent standards across tools
26
+ - **Monorepo complexity**: Multiple services and packages all need different AI contexts
27
+ - **Team consistency**: Junior devs get different AI guidance than seniors
28
+ - **Future-proofing**: New AI tools require rewriting all configurations
29
+
30
+ AI-Rulez solves this with a single `ai-rulez.yaml` that understands your project's conventions.
10
31
 
11
32
  [![Go Version](https://img.shields.io/badge/Go-1.24%2B-00ADD8)](https://go.dev)
12
33
  [![NPM Version](https://img.shields.io/npm/v/ai-rulez)](https://www.npmjs.com/package/ai-rulez)
@@ -17,27 +38,36 @@ Tired of manually managing rule files, subagents, and custom commands across dif
17
38
 
18
39
  ---
19
40
 
20
- ## Feature Highlights
41
+ ## Key Features
21
42
 
22
- `ai-rulez` is a progressive tool-box, designed to offer a centralized way to manage AI tooling for a repository.
43
+ ### AI-Powered Project Analysis
44
+ The `init` command is where AI-Rulez shines. Instead of manually writing configurations, let AI analyze your codebase:
23
45
 
24
- ### Centralized Configuration
25
- - **Centralized Definitions:** Use a single `ai-rulez.yml` as the source of truth to define rules, file structures, and documentation for all your AI tools.
26
- - **Nested Configs & Monorepo Support:** Scale your configurations with `extends` and `includes`. Manage complex projects and monorepos with ease by using the `--recursive` flag to combine configurations from multiple files.
27
- ```bash
28
- # Generate rules for all projects in a monorepo
29
- ai-rulez generate --recursive
30
- ```
46
+ ```bash
47
+ # AI analyzes your codebase and generates tailored config
48
+ npx ai-rulez init "My Project" --preset popular --use-agent claude --yes
49
+ ```
31
50
 
32
- ### Powerful Tooling
33
- - **Custom Commands:** Define custom commands that your AI assistant can execute, enabling powerful, interactive workflows.
34
- - **Specialized AI Agents:** Create specialized "sub-agents" with their own system prompts and tools, perfect for complex tasks like code reviews or database queries.
51
+ This automatically:
52
+ - Detects your tech stack (Python/Node/Go, testing frameworks, linters)
53
+ - Identifies project patterns and conventions
54
+ - Generates appropriate coding standards and practices
55
+ - Creates specialized agents for different tasks (code review, testing, docs)
56
+ - **Automatically adds all generated AI files to .gitignore** - no more committing `.cursorrules` or `CLAUDE.md` by accident
57
+
58
+ ### Universal Output Generation
59
+ One YAML config generates files for every tool:
60
+ - `CLAUDE.md` for Claude Code
61
+ - `.cursorrules` for Cursor
62
+ - `.windsurfrules` for Windsurf
63
+ - `.github/copilot-instructions.md` for GitHub Copilot
64
+ - Custom formats for any future AI tool
65
+
66
+ ### Powerful Enterprise Features
35
67
  - **MCP Integration:** Automatically configure MCP servers across CLI tools (Claude, Gemini) and generate config files for others (Cursor, VS Code). One configuration, every tool connected.
68
+ - **Team Collaboration:** Remote config includes, local overrides, and monorepo support with `--recursive`
36
69
  - **Full-Featured CLI:** Manage your entire configuration from the command line. Add rules, update agents, and generate files without ever opening a YAML file.
37
-
38
- ### Flexible Integrations
39
- - **Multi-Tool Support:** Use presets to instantly generate configurations for popular AI tools like Claude, Cursor, Copilot, Gemini, and more.
40
- - **Custom Tool Integration:** Don't see your favorite tool on the list? Use the `outputs` key to generate a configuration file for any tool, in any format.
70
+ - **Security & Performance:** SSRF protection, schema validation, Go-based performance with instant startup
41
71
 
42
72
  ## How It Works
43
73
 
package/ai-rulez.js ADDED
@@ -0,0 +1,39 @@
1
+ #!/usr/bin/env node
2
+
3
+ const { spawn } = require("node:child_process");
4
+ const path = require("node:path");
5
+ const fs = require("node:fs");
6
+ const { getPlatform, getBinaryName } = require("./install");
7
+
8
+ const binaryName = getBinaryName(getPlatform().os);
9
+ const binaryPath = path.join(__dirname, "bin", binaryName);
10
+
11
+ function runBinary(args) {
12
+ const child = spawn(binaryPath, args, {
13
+ stdio: "inherit",
14
+ });
15
+
16
+ child.on("close", (code) => {
17
+ process.exit(code);
18
+ });
19
+ }
20
+
21
+ async function main() {
22
+ if (fs.existsSync(binaryPath)) {
23
+ runBinary(process.argv.slice(2));
24
+ } else {
25
+ console.log(
26
+ "🚀 First run detected - downloading ai-rulez binary...\n This will only happen once and takes a few seconds.\n",
27
+ );
28
+ const { install } = require("./install");
29
+ try {
30
+ await install(true); // Pass a flag to indicate this is a post-install step
31
+ runBinary(process.argv.slice(2));
32
+ } catch (error) {
33
+ console.error("Failed to install or run ai-rulez:", error);
34
+ process.exit(1);
35
+ }
36
+ }
37
+ }
38
+
39
+ main();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-rulez",
3
- "version": "2.1.3",
3
+ "version": "2.1.4",
4
4
  "description": "⚡ One config to rule them all. Centralized AI assistant configuration management - generate rules for Claude, Cursor, Copilot, Windsurf and more from a single YAML file.",
5
5
  "keywords": [
6
6
  "ai",
@@ -62,11 +62,11 @@
62
62
  }
63
63
  ],
64
64
  "bin": {
65
- "ai-rulez": "./bin/ai-rulez.js"
65
+ "ai-rulez": "./ai-rulez.js"
66
66
  },
67
67
  "scripts": {},
68
68
  "files": [
69
- "bin/",
69
+ "ai-rulez.js",
70
70
  "install.js",
71
71
  "README.md"
72
72
  ],