Airul generates context for AI agents from your docs. It gives AI immediate access to up-to-date important info about your project.
# Install as a CLI tool
npm install -g airul
# Create a new project and open in Cursor
airul new my-project "Create a React app with authentication" --cursor
# This will:
# 1. Create my-project directory
# 2. Initialize git repository
# 3. Create initial documentation
# 4. Generate AI context files
# 5. Open in Cursor (and other editors if specified)
Initializes a new project:
- Creates
.airul.json
config if it doesn't exist - Creates initial
TODO-AI.md
if it doesn't exist - Generates rules from the new configuration
- Initializes git repository (if not already initialized)
Generates AI context files:
- If
.airul.json
exists: generates rules using the existing configuration - If
.airul.json
doesn't exist: runsinit
first, then generates rules - Always uses the most recent content from your source files
# Install as a CLI tool
npm install -g airul
# Initialize airul in your project
airul init
# This will:
# 1. Add airul as dev dependency
# 2. Create .airul.json config
# 3. Create initial documentation
# 4. Generate AI context files
After making changes to your project, you have two options to update the AI context:
Add airul to your package.json:
{
"devDependencies": {
"airul": "latest"
},
"scripts": {
"rules": "airul gen",
"prestart": "airul gen",
"prebuild": "airul gen"
}
}
Then run:
# Manual update
npm run rules
# Automatic update before npm start/build
npm start
npm run build
If installed globally:
# Update AI context manually
airul gen
Both approaches will update context when you:
- Add/modify documentation
- Install new dependencies
- Change project structure
- 🎯 Generate AI context files for multiple tools:
- GitHub Copilot (.github/copilot-instructions.md)
- Cursor (.cursorrules)
- Windsurf (.windsurfrules)
- 📝 Works with any text files (markdown, txt, etc.)
- ⚙️ Simple configuration
Create .airul.json
:
{
"sources": ["README.md", "docs/*.md", "*.txt"],
"output": {
"cursor": true, /* enabled by default only when no other editors are specified */
"windsurf": false, /* disabled by default */
"copilot": false /* disabled by default */
}
}
Run:
npm run rules
This will:
- Scan your documentation files
- Generate AI context files based on your output settings
- Format the content appropriately for each tool
MIT