docs/en/framework/ui/angular/ai-config.md
//[doc-seo]
{
"Description": "Learn how to configure AI-powered development tools for ABP Framework Angular applications with automatic setup for Claude, Cursor, Copilot, Gemini, Junie, and Windsurf."
}
ABP Framework provides an AI Configuration Generator that helps developers set up AI-powered coding assistants for their Angular applications. This schematic automatically generates configuration files for popular AI tools with pre-configured ABP best practices and guidelines.
The AI Configuration Generator is an Angular schematic that creates standardized configuration files for various AI development tools. These configurations include:
The generator supports the following AI coding assistants:
.claude/CLAUDE.md configuration file.github/copilot-instructions.md configuration file.cursor/rules/cursor.mdc configuration file.gemini/GEMINI.md configuration file.junie/guidelines.md configuration file.windsurf/rules/guidelines.md configuration fileGenerate AI configuration for a single tool:
ng g @abp/ng.schematics:ai-config --tool=claude
Generate configurations for multiple AI tools at once:
# Comma-separated
ng g @abp/ng.schematics:ai-config --tool=claude,cursor,copilot
# Space-separated (with quotes)
ng g @abp/ng.schematics:ai-config --tool="claude cursor gemini"
# Multiple --tool flags
ng g @abp/ng.schematics:ai-config --tool=claude --tool=cursor --tool=gemini
By default, configurations are generated at the workspace root. To target a specific project:
ng g @abp/ng.schematics:ai-config --tool=claude --target-project=my-app
This creates the configuration files in the my-app project root directory.
If configuration files already exist, use the --overwrite flag to replace them:
ng g @abp/ng.schematics:ai-config --tool=cursor --overwrite
The AI Configuration Generator accepts the following options:
stringclaude, copilot, cursor, gemini, junie, windsurf"claude,cursor,copilot"string/)"my-angular-app"booleanfalseAll generated configuration files include comprehensive guidelines for:
*.Application, *.Domain, *.EntityFrameworkCore, *.HttpApi)@abp/ng.core, @abp/ng.theme.shared)ng g @abp/ng.schematics:ai-config --tool=claude
Output:
š Generating AI configuration files...
š Target path: /
š¤ Selected tools: claude
ā
AI configuration files generated successfully!
š Generated files:
- .claude/CLAUDE.md
š” Tip: Restart your IDE or AI tool to apply the new configurations.
ng g @abp/ng.schematics:ai-config --tool="cursor,copilot,gemini" --target-project=acme-app
Output:
š Generating AI configuration files...
š Target path: /acme-app
š¤ Selected tools: cursor, copilot, gemini
ā
AI configuration files generated successfully!
š Generated files:
- /acme-app/.cursor/rules/cursor.mdc
- /acme-app/.github/copilot-instructions.md
- /acme-app/.gemini/GEMINI.md
š” Tip: Restart your IDE or AI tool to apply the new configurations.
ng g @abp/ng.schematics:ai-config --tool=windsurf --overwrite
This will regenerate the Windsurf configuration file even if it already exists.
After running the generator, your project will have configuration files in their respective directories:
your-project/
āāā .claude/
ā āāā CLAUDE.md # Claude AI configuration
āāā .cursor/
ā āāā rules/
ā āāā cursor.mdc # Cursor AI configuration
āāā .github/
ā āāā copilot-instructions.md # GitHub Copilot configuration
āāā .gemini/
ā āāā GEMINI.md # Gemini AI configuration
āāā .junie/
ā āāā guidelines.md # Junie AI configuration
āāā .windsurf/
āāā rules/
āāā guidelines.md # Windsurf AI configuration
Generate Early: Set up AI configurations at the beginning of your project to ensure consistent code quality from the start.
Multiple Tools: If your team uses different AI assistants, generate configurations for all of them to maintain consistency across the team.
Version Control: Commit the generated configuration files to your repository so all team members benefit from the same AI guidelines.
Keep Updated: When ABP releases new best practices or your project evolves, regenerate configurations with the --overwrite flag.
Project-Specific: For monorepos or multi-project workspaces, use --target-project to create project-specific configurations.
If you see a warning that a configuration file already exists:
ā ļø Configuration file already exists: .claude/CLAUDE.md
Use --overwrite flag to replace existing files.
Add the --overwrite flag to replace it:
ng g @abp/ng.schematics:ai-config --tool=claude --overwrite
If you specify an invalid tool name:
Invalid AI tool(s): chatgpt. Valid options are: claude, copilot, cursor, gemini, junie, windsurf
Make sure to use only the supported tool names listed above.
If you run the command without specifying any tools:
ng g @abp/ng.schematics:ai-config
You'll see usage examples and available tools:
ā¹ļø No AI tools selected. Skipping configuration generation.
š” Usage examples:
ng g @abp/ng.schematics:ai-config --tool=claude,cursor
ng g @abp/ng.schematics:ai-config --tool="claude, cursor"
ng g @abp/ng.schematics:ai-config --tool=gemini --tool=cursor
ng g @abp/ng.schematics:ai-config --tool=gemini --target-project=my-app
Available tools: claude, copilot, cursor, gemini, junie, windsurf