aurora-cli
Run Aurora CLI commands to generate/regenerate modules, add packages, or create projects. Trigger: When user asks to regenerate code, load module, add package, or create new Aurora project.
安装与使用
请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。
查看来源 ↗使用指南技能说明
When to Use
- User asks to "regenerate", "load", or "generate" a module
- User wants to add a package (oauth, auditing, etc.)
- User needs to create a new Aurora project
- After YAML schema changes that require code regeneration
- User mentions "aurora cli" or "aurora load"
Critical Patterns
Command Structure
| Action | Command | When to Use |
|---|---|---|
| Regenerate module | aurora load back module -n=<bc>/<module> |
After YAML changes |
| Force regenerate | aurora load back module -n=<bc>/<module> -f |
Override hash protection |
| With tests | aurora load back module -n=<bc>/<module> -t |
Generate e2e tests |
| Add package | aurora add back <package> |
Install preconfigured package |
| New project | aurora new back <name> |
Create new project (rare) |
Hash Protection System
Aurora tracks file modifications via hash. Files with custom changes are protected by default:
- Without
-f: Modified files are preserved - With
-f: All files are overwritten (use with caution)
Execution Flow
1. Identify Action
Ask the user what they want to do:
- Generate/Regenerate module - Regenerate code from existing YAML
- Add package - Install preconfigured package (auditing, oauth, etc.)
- Create project - Create new Aurora project (rare)
2. Gather Information
For Generate/Regenerate Module:
- Ask which bounded context and module to regenerate
- ONLY if you can't identify them, list available YAMLs in
cliter/using Glob - Ask about flags:
-
--force(overwrite existing files) -
--tests(generate e2e tests) -
--verbose(detailed output)
-
For Add Package:
- Run
aurora add backto show available packages - Ask which package to install
- Ask if
--forceis needed
For Create Project:
- Ask for project name
- Confirm before executing
3. Execute Command
# Regenerate module
aurora load back module -n=<bounded-context>/<module> [-f] [-t] [-v]
# Add package
aurora add back <package> [-f]
# Create project
aurora new back <app-name>
4. Report Results
Command executed successfully
aurora load back module -n=tesla/model -ft
Regenerated Files:
- src/@api/tesla/model/controllers/...
- src/@app/tesla/model/domain/...
Preserved Files (modified hash):
- src/@app/tesla/model/application/create/create-model.command-handler.ts
(These files have custom modifications and were not overwritten)
Summary:
- X files regenerated
- Y files preserved
Commands
# Regenerate module from YAML
aurora load back module -n=tesla/model
# Regenerate with force + tests
aurora load back module -n=tesla/model -ft
# Add package
aurora add back oauth
# Show available packages
aurora add back
# Create new project
aurora new back my-project
Flags
| Flag | Description |
|---|---|
-f, --force |
Overwrite existing files (even with modified hash) |
-t, --tests |
Generate e2e test files |
-v, --verbose |
Show detailed CLI output |
Error Handling
| Error | Solution |
|---|---|
| CLI not found | Report that Aurora CLI is not installed |
| YAML not found | Report expected path and suggest creating it |
| Permission error | Report and suggest solutions |
| Execution error | Show complete error output |
Related Skills
This skill works with:
- aurora-project-structure: Understand project structure and locate generated files
- aurora-cqrs: Understand CQRS components that will be regenerated
- conventional-commits: Create commits after successful regeneration
Resources
-
YAML Definitions:
cliter/[package]/[module].aurora.yaml -
Lock Files:
cliter/[package]/[module]-lock.json -
Generated Code:
src/@api/andsrc/@app/
使用示例
查看来源仓库中的使用示例与配置说明。
查看来源 ↗来源历史
- 收录时间
- 2026-01-20
- 索引更新时间
- 2026-01-26
- Branch
- main
收录与同步日期属于本站记录。源码修改历史请查看来源仓库。
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!