Available Languages: ๐ฐ๐ท ํ๊ตญ์ด | ๐บ๐ธ English | ๐ฏ๐ต ๆฅๆฌ่ช | ๐จ๐ณ ไธญๆ
"The purpose of vibe coding is not rapid productivity but code quality."
MoAI-ADK provides an AI development environment for quality code. SPEC-First DDD (Domain-Driven Development), continuous refactoring with behavior preservation, and 20 specialized AI agents work together.
๐ Optimal Solution for Cost-Effective AI Development
MoAI-ADK partners with z.ai GLM 4.7 to provide developers with an economical AI development environment.
| Benefit | Description |
|---|---|
| ๐ฐ 70% Cost Savings | 1/7 the price of Claude with equivalent performance |
| โก Fast Response Speed | Low-latency responses with optimized infrastructure |
| ๐ Compatibility | Fully compatible with Claude Code, no code modification needed |
| ๐ Unlimited Usage | Use freely without daily/weekly token limits |
๐ GLM 4.7 Sign Up (10% Additional Discount)
By signing up through this link:
- โ Additional 10% discount benefit
- โ Contribute to MoAI open source development (reward credits are used for open source projects)
# 1. Get GLM API Key
Sign up at the link above and get your API key
# 2. Configure GLM in MoAI-ADK
moai glm YOUR_API_KEY๐ก Tip: Using GLM 4.7 in a Worktree environment allows you to design with Opus and implement in bulk with GLM, saving up to 70% on costs.
- ๐ฏ SPEC-First: 90% reduction in rework with clear specifications
- ๐ต DDD (Domain-Driven Development): ANALYZE-PRESERVE-IMPROVE cycle with behavior preservation
- ๐ค AI Orchestration: 20 specialized agents + 49 skills
- ๐ Multilingual Routing: Automatic support for Korean/English/Japanese/Chinese
- ๐ณ Worktree Parallel Development: Unlimited parallel work in completely isolated environments
- ๐ MoAI Rank: Motivation through vibe coding leaderboard
๐ For detailed information, see the official online documentation: https://adk.mo.ai.kr
curl -LsSf https://modu-ai.github.io/moai-adk/install.sh | sh# Step 1: Install uv (macOS/Linux)
curl -LsSf https://astral.sh/uv/install.sh | sh
# Step 2: Install MoAI-ADK
uv tool install moai-adkRunning moai init starts a 9-step interactive wizard:
Select your conversation language. All subsequent instructions will be displayed in your chosen language.
๐ Language Selection
โฏ Select your conversation language: [โโ] Navigate [Enter] Select
โฏ Korean (ํ๊ตญ์ด)
English
Japanese (ๆฅๆฌ่ช)
Chinese (ไธญๆ)
Enter your user name. AI will provide personalized responses.
๐ค User Settings
โฏ Enter your user name (optional):
Enter your GLM API key from Z.AI.
๐ API Key Input
GLM CodePlan API key (optional - press Enter to skip)
โ Found existing GLM API key: 99c1a2df...
Press Enter to keep existing key, or enter new key to replace
? Enter your GLM API key:
๐ GLM Sign-Up Benefit: If you don't have a GLM account, sign up using the link below!
๐ GLM Sign Up (10% Additional Discount)
By signing up through this link, you'll receive an additional 10% discount. Also, rewards generated from link sign-ups are used for MoAI open source development. ๐
Enter your project name.
๐ Project Setup
โฏ Project name: MoAI-ADK
Select your Git mode.
๐ Git Setup
โฏ Select your Git mode: [โโ] Navigate [Enter] Select
โฏ manual (local only) - Use local repository only
personal (GitHub personal) - Use GitHub personal account
team (GitHub team) - Use GitHub team/organization
For personal/team selection, enter your GitHub username.
โฏ GitHub username:
Select the language for Git commit messages.
๐ฃ๏ธ Output Language Settings
โฏ Commit message language: [โโ] Navigate [Enter] Select
English
โฏ Korean (ํ๊ตญ์ด)
Japanese (ๆฅๆฌ่ช)
Chinese (ไธญๆ)
Select the language for code comments.
โฏ Code comment language: [โโ] Navigate [Enter] Select
English
โฏ Korean (ํ๊ตญ์ด)
Japanese (ๆฅๆฌ่ช)
Chinese (ไธญๆ)
Select the language for documentation.
โฏ Documentation language: [โโ] Navigate [Enter] Select
English
โฏ Korean (ํ๊ตญ์ด)
Japanese (ๆฅๆฌ่ช)
Chinese (ไธญๆ)
๐ก Token Optimization Strategy: Internal prompts for agent instructions are fixed in English.
Reason: Non-English languages consume 12-20% additional tokens in Claude. When infinite agent loops are frequent, this significantly impacts costs and weekly token limits, so MoAI fixes internal agent instructions in English and provides user conversations only in the user's language.
This is MoAI's effort to reduce token waste.
When all settings are complete, 5-phase installation runs automatically:
๐ Starting installation...
Phase 1: Preparation and backup... โโโโโโโโโโโโโโโโ 100%
Phase 2: Creating directory structure... โโโโโโโโโโโโโโโโ 100%
Phase 3: Installing resources... โโโโโโโโโโโโโโโโ 100%
Phase 4: Generating configurations... โโโโโโโโโโโโโโโโ 100%
Phase 5: Validation and finalization... โโโโโโโโโโโโโโโโ 100%
โ
Initialization Completed Successfully!
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ Summary:
๐ Location: /path/to/my-project
๐ Language: Auto-detect (use /moai:0-project)
๐ Git: manual (github-flow, branch: manual)
๐ Locale: ko
๐ Files: 47 created
โฑ๏ธ Duration: 1234ms
๐ Next Steps:
1. Run cd my-project to enter the project
2. Run /moai:0-project in Claude Code for full setup
3. Start developing with MoAI-ADK!
cd your-existing-project
moai init .
# Existing files are preservedUpdate existing projects to the latest version.
moai update3-Phase Smart Update Workflow:
Stage 1: ๐ฆ Package Version Check
โโ Check latest version from PyPI โ Auto-upgrade if needed
Stage 2: ๐ Config Version Comparison
โโ Compare package template vs project config
โโ Skip if same (70-80% performance improvement)
Stage 3: ๐ Template Synchronization
โโ Create backup โ Update template โ Restore user settings
Key Options:
# Check version only (no update)
moai update --check
# Synchronize templates only (skip package upgrade)
moai update --templates-only
# Config edit mode (re-run init wizard)
moai update --config
moai update -c
# Force update without backup
moai update --force
# All is well~ Auto mode (auto-approve all confirmations)
moai update --yesMerge Strategy Selection:
๐ Choose merge strategy:
[1] Auto-merge (default)
โ Automatically preserve template + user changes
[2] Manual merge
โ Create backup + merge guide (direct control)
# Force auto-merge (default)
moai update --merge
# Force manual merge
moai update --manualAutomatically Preserved Items:
| Item | Description |
|---|---|
| User Settings | .claude/settings.local.json (MCP, GLM settings) |
| Custom Agents | User-created agents not in template |
| Custom Commands | User-defined slash commands |
| Custom Skills | User-defined skills |
| Custom Hooks | User-defined hook scripts |
| SPEC Documents | Entire .moai/specs/ folder |
| Reports | Entire .moai/reports/ folder |
๐ก Update Tip: You can change language, API key, and Git settings anytime with
moai update -c. It's recommended to create your commands, agents, skills, and hooks in folders other than moai.
Problem: When both pip and uv tool are used to install MoAI-ADK, version conflicts can occur.
Symptoms:
# moai update shows latest version
moai update
โ Package already up to date (1.5.0)
# But actual command uses old version
which moai
~/.pyenv/shims/moai # Uses pip version (e.g., 1.1.0)
# Import errors in hooks
ModuleNotFoundError: No module named 'yaml'Root Cause:
uv tool installinstalls to~/.local/bin/moaipip installinstalls to~/.pyenv/shims/moai- PATH priority determines which version is used
- Windows users may experience more severe issues due to Python environment differences
Solutions:
# Uninstall pip version
pip uninstall moai-adk -y
# Ensure uv tool is prioritized in PATH
export PATH="$HOME/.local/bin:$PATH"
# Verify
which moai # Should show ~/.local/bin/moai
moai --version # Should show latest versionFor macOS/Linux (~/.zshrc or ~/.bashrc):
# Add after pyenv initialization
# ===== UV Tool Priority =====
export PATH="$HOME/.local/bin:$PATH"For Windows (PowerShell $PROFILE):
# Add to $PROFILE
$env:PATH = "$env:USERPROFILE\.local\bin;$env:PATH"# Uninstall all versions
pip uninstall moai-adk -y
uv tool uninstall moai-adk
# Reinstall with uv
uv tool install moai-adk
# Verify
uv tool list
moai --versionPrevention:
- Always use
uv tool install moai-adkfor installation - Avoid mixing pip and uv for the same package
- Regularly check
which moaito verify active installation
For new or existing projects, you can automatically generate project documentation to help Claude Code understand your project:
> /moai:0-project
| File | Purpose | Key Content |
|---|---|---|
.moai/project/product.md |
Product Overview | Project name/description, target users, core features, use cases |
.moai/project/structure.md |
Structure Analysis | Directory tree, main folder purposes, core file locations, module composition |
.moai/project/tech.md |
Tech Stack | Technologies used, framework selection reasons, dev environment, build/deployment settings |
- Context Provision: Claude Code quickly grasps project context
- Consistency Maintenance: Share project understanding among team members
- Onboarding Acceleration: Reduce new developer project ramp-up time
- AI Collaboration Optimization: More accurate code suggestions and reviews
๐ก Tip: Running
/moai:0-projectat project start or after structure changes updates documentation to the latest state.
> /moai:0-projectAutomatically analyzes your project's current state and configures the optimal development environment. Detects programming languages and frameworks, and automatically sets up Git workflows and quality assurance standards. Once all configuration is complete, you're ready to start development immediately.
Tasks:
- โ Project structure analysis
- โ Programming language/framework detection
- โ
.moai/config/config.yamlcreation - โ Git workflow setup
- โ Session memory system configuration
- โ Quality assurance standards setup
> /moai:1-plan "feature description"Automatically generates unambiguous specifications using EARS format. Includes requirements definition, success criteria, and test scenarios to clearly present development direction. The generated SPEC serves as a single source of truth that the development team and AI share the same understanding.
Auto-generated:
- EARS format specification
- Requirements definition
- Success criteria
- Test scenarios
Example:
> /moai:1-plan "user profile page"
# โ Creates SPEC-002
> /moai:1-plan "payment API"
# โ Creates SPEC-003Important: Must execute > /clear next
> /moai:2-run SPEC-001Implements SPEC using DDD (Domain-Driven Development) methodology with the ANALYZE-PRESERVE-IMPROVE cycle:
DDD Cycle:
- ๐ ANALYZE: Analyze domain boundaries, coupling, and existing behavior
- ๐ก๏ธ PRESERVE: Create characterization tests to preserve existing behavior
- โจ IMPROVE: Incrementally improve structure with test validation
Verification items:
- Test coverage >= 85%
- Pass linting
- Pass type checking
- Pass security checks
- โ TRUST 5 validation
> /clear # Always run clear before sync to reset session and run quality checks
> /moai:3-sync SPEC-001Performs quality verification followed by documentation synchronization, Git commits, and PR automation. Automatically generates API documentation, architecture diagrams, README, and CHANGELOG, keeping them up to date. Automatically commits changes and converts PRs from Draft to Ready in team mode.
Auto-executed tasks:
-
Phase 1: Quality Verification
- Run tests (pytest, jest, go test, etc.)
- Linter checks (ruff, eslint, golangci-lint, etc.)
- Type checkers (mypy, tsc, go vet, etc.)
- Code review (manager-quality)
-
Phase 2-3: Documentation Sync
- Auto-generate API documentation
- Update architecture diagrams
- Update README
- Sync SPEC documents
-
Phase 4: Git Automation
- Commit changes
- PR Draft โ Ready conversion
- (Optional) Auto-merge
Execution modes:
auto(default): Selective sync of changed files onlyforce: Regenerate all documentationstatus: Perform status check onlyproject: Sync entire project
Details: Refer to command file
> /moai:alfred "feature description"User presents the goal and AI autonomously performs exploration, planning, implementation, and verification. Analyzes codebase through parallel exploration and self-corrects issues through autonomous loops. Automatically terminates when completion marker (<moai>DONE</moai>) is detected, so developer only needs to verify final result.
flowchart TB
Start([User Request<br/>/moai:alfred 'feature description']) --> Phase0[Phase 0: Parallel Exploration]
Phase0 --> Explore[๐ Explore Agent<br/>Analyze codebase structure]
Phase0 --> Research[๐ Research Agent<br/>Research technical docs]
Phase0 --> Quality[โ
Quality Agent<br/>Assess quality state]
Explore --> Phase1[Phase 1: SPEC Creation]
Research --> Phase1
Quality --> Phase1
Phase1 --> Spec[๐ EARS format SPEC doc<br/>Requirements specification]
Spec --> Phase2[Phase 2: DDD Implementation]
Phase2 --> Analyze[๐ ANALYZE: Domain analysis]
Analyze --> Preserve[๐ก๏ธ PRESERVE: Characterization tests]
Preserve --> Improve[โจ IMPROVE: Incremental improvement]
Improve --> Check{Quality Check<br/>TRUST 5}
Check -->|Pass| Phase3[Phase 3: Documentation Sync]
Check -->|Fail| Loop[๐ Autonomous Loop<br/>Auto-fix issues]
Loop --> Analyze
Phase3 --> Docs[๐ README, API docs<br/>Auto-update]
Docs --> Done{<moai>DONE</moai><br/>Completion marker detected}
Done -->|Yes| End([โ
Complete<br/>Deliver result only])
Done -->|No| Loop
style Phase0 fill:#e1f5fe
style Phase1 fill:#fff3e0
style Phase2 fill:#f3e5f5
style Phase3 fill:#e8f5e9
style Done fill:#c8e6c9
style End fill:#4caf50,color:#fff
Single Execution:
-
Phase 1: Parallel Exploration (3-4x faster analysis)
- Explore Agent: Codebase structure, patterns, related files
- Research Agent: Technical docs, best practices
- Quality Agent: Current quality state, potential issues
-
Phase 2: SPEC Creation (EARS format)
- Clear requirement definitions
- Acceptance criteria specification
- User story writing
-
Phase 3: DDD Implementation (Autonomous loop)
- ANALYZE: Analyze domain boundaries and existing behavior
- PRESERVE: Create characterization tests for behavior preservation
- IMPROVE: Incrementally improve code structure
- Loop: Auto-fix if quality check fails
-
Phase 4: Documentation Sync
- README, API docs auto-update
- CHANGELOG auto-generation
- User guide update
| Situation | Description | Example |
|---|---|---|
| New feature development | AI handles everything from start to finish | "Add JWT authentication system" |
| Complex refactoring | Large changes affecting multiple files | "Database layer restructure" |
| Bug fixing | Automate from root cause analysis to fix | "Fix login failure bug" |
| SPEC-based development | Implement features with SPEC documents | /moai:alfred SPEC-AUTH-001 |
Options:
--loop: Enable autonomous iterative fixes (AI self-resolves issues)--max N: Specify max iterations (default: 100)--sequential/--seq: Sequential exploration (for debugging) - parallel is default--branch: Auto-create feature branch--pr: Create Pull Request after completion--resume SPEC: Resume work
Performance: Parallel exploration is now the default, providing 3-4x faster analysis. Use
--sequentialonly for debugging.
Example:
# Basic autonomous execution (parallel by default)
> /moai:alfred "Add JWT authentication"
# Auto loop with sequential exploration (for debugging)
> /moai:alfred "JWT authentication" --loop --seq
# Resume
> /moai:alfred resume SPEC-AUTH-001> /moai:loopAI autonomously diagnoses and fixes LSP errors, test failures, and coverage deficiencies. Parallel diagnosis executes LSP, AST-grep, Tests, and Coverage simultaneously, resolving issues 3-4x faster. Runs autonomously until completion marker is detected or max iterations reached.
flowchart TB
Start([User Request<br/>/moai:loop]) --> Parallel[Parallel Diagnosis]
Parallel --> LSP[LSP Diagnosis<br/>Type errors, not found]
Parallel --> AST[AST-grep<br/>Pattern check, security]
Parallel --> Tests[Test Execution<br/>Unit, integration]
Parallel --> Coverage[Coverage<br/>85% target]
LSP --> Collect[Issue Collection]
AST --> Collect
Tests --> Collect
Coverage --> Collect
Collect --> HasIssues{Has Issues?}
HasIssues -->|No| Done[<moai>DONE</moai><br/>Completion marker]
HasIssues -->|Yes| CreateTODO[TODO Creation<br/>Priority sorted]
CreateTODO --> Process[Sequential Processing]
Process --> Fix1[Level 1: Immediate fix<br/>Import sort, whitespace]
Process --> Fix2[Level 2: Safe fix<br/>Variable name, type]
Process --> Fix3[Level 3: Approval fix<br/>Logic change]
Fix1 --> Validate[Verification]
Fix2 --> Validate
Fix3 --> Validate
Validate --> ReCheck{Diagnose again?}
ReCheck -->|Yes| Parallel
ReCheck -->|No| MaxIter{Max iteration<br/>100 reached?}
MaxIter -->|No| Parallel
MaxIter -->|Yes| Snapshot[Snapshot saved<br/>Can resume later]
Done --> End([โ
Complete])
Snapshot --> End([โธ๏ธ Paused])
style Parallel fill:#e1f5fe
style Collect fill:#fff3e0
style Process fill:#f3e5f5
style Validate fill:#e8f5e9
style Done fill:#c8e6c9
style End fill:#4caf50,color:#fff
Parallel diagnosis (3.75x faster):
flowchart TB
Start([Parallel diagnosis start]) --> Parallel
subgraph Parallel[Concurrent execution]
direction TB
LSP[LSP diagnosis]
AST[AST-grep inspection]
TESTS[Test execution]
COVERAGE[Coverage check]
end
LSP --> Collect[Issue integration and priority<br/>Level 1 โ 2 โ 3 order]
AST --> Collect
TESTS --> Collect
COVERAGE --> Collect
style Start fill:#e3f2fd
style Parallel fill:#f3f4f6
style LSP fill:#fff9c4
style AST fill:#ffccbc
style TESTS fill:#c8e6c9
style COVERAGE fill:#b2dfdb
style Collect fill:#e1bee7
"grep finds text, but AST-grep finds code structure."
Concept:
AST-grep is a structural code inspection tool. Unlike normal grep or regex that searches for text, AST-grep analyzes the Abstract Syntax Tree (AST) of code to inspect code structure and patterns.
Text search vs Structure search:
| Feature | grep/regex | AST-grep |
|---|---|---|
| Search target | Text strings | Code structure (AST) |
| Example | print("hello") |
print(__) |
| Meaning | Find "print" characters | Find print function call pattern |
| Space sensitive? | Yes (whitespace, indent matters) | No (structure only) |
| Variable distinguish | Hard (e.g., x=1, y=1 are different) |
Possible (all variable assignment patterns) |
How it works:
flowchart LR
Source[Source code<br/>def foo x:<br/> return x + 1] --> AST[AST analysis]
AST --> |transform| Tree[Abstract syntax tree<br/>Function<br/> Call<br/>]
Tree --> Pattern[Pattern matching]
Pattern --> Result1[โ Function definition]
Pattern --> Result2[โ Return statement]
Pattern --> Result3[โ Addition operation]
style Source fill:#e3f2fd
style AST fill:#fff3e0
style Tree fill:#f3e5f5
style Pattern fill:#e8f5e9
style Result1 fill:#c8e6c9
style Result2 fill:#c8e6c9
style Result3 fill:#c8e6c9
What AST-grep detects:
-
Security vulnerabilities
- SQL injection patterns:
execute(f"SELECT * FROM users WHERE id={user_input}") - Hardcoded passwords:
password = "123456" - Unsafe function usage:
eval(user_input)
- SQL injection patterns:
-
Code smells
- Duplicate code: Repetition of similar structures
- Long functions: Too much complexity
- Magic numbers:
if x == 42(meaningless numbers)
-
Anti-patterns
- Empty except blocks:
except: pass - Global variable modification
- Circular dependencies
- Empty except blocks:
-
Best practice violations
- Missing type hints
- Missing documentation
- Missing error handling
Example scenario:
# Example code where AST-grep finds problems
def process_user_input(user_input):
# โ ๏ธ Warning: eval usage (security vulnerability)
result = eval(user_input)
# โ ๏ธ Warning: empty except (anti-pattern)
try:
save_to_database(result)
except:
pass
# โ ๏ธ Warning: magic number (code smell)
if result > 42:
return TrueWhy is it important?
- Accuracy: Understands code meaning, so fewer false positives
- 40 language support: Works on Python, TypeScript, Go, Rust, Java, etc.
- Auto-fix possible: Not just finds patterns, but generates fix suggestions
- Security enhancement: Automatically detects security vulnerabilities like OWASP Top 10
Usage in MoAI-ADK:
In /moai:loop and /moai:fix commands, AST-grep operates as a core component of parallel diagnosis:
- LSP: Type errors, find definitions
- AST-grep: Structural patterns, security vulnerabilities โ This is our focus!
- Tests: Test failures
- Coverage: Coverage deficiency
These four run simultaneously to diagnose code quality 3.75x faster.
Autonomous loop flow:
-
Parallel diagnosis (concurrent execution)
- LSP: Type errors, definitions not found, potential bugs
- AST-grep: Code pattern check, security vulnerabilities
- Tests: Unit tests, integration tests
- Coverage: 85% coverage target achievement
-
TODO creation (by priority)
- Level 1: Immediate fix (import sort, whitespace, formatting)
- Level 2: Safe fix (variable names, type addition)
- Level 3: Approval fix (logic change, API modification)
- Level 4: Manual needed (security, architecture)
-
Sequential fixing
- Process TODO items one by one
- Verify after each fix
- Re-diagnose on failure
-
Repeat or complete
<moai>DONE</moai>marker when all issues resolved- Save snapshot after max 100 iterations
| Situation | Description | Example |
|---|---|---|
| Quality after implementation | Automatically improve quality after coding | Run /moai:loop after feature implementation |
| Test failure fix | Automatically analyze and fix test failures | Run after test execution on failure |
| Coverage improvement | Automatically achieve 85% target | After writing new code |
| Refactoring | Continuously improve code quality | Periodic execution for maintenance |
Options:
--max N: Maximum iterations (default: 100)--auto: Enable auto-fix (Level 1-3)--sequential/--seq: Sequential diagnosis (for debugging) - parallel is default--errors: Fix errors only--coverage: Include coverage (100% target)--resume ID: Restore snapshot
Performance: Parallel diagnosis is now the default, executing LSP, AST-grep, Tests, and Coverage simultaneously (3.75x faster).
Example:
# Basic autonomous loop (parallel by default)
> /moai:loop
# Sequential + auto-fix (for debugging)
> /moai:loop --seq --auto
# Max 50 iterations
> /moai:loop --max 50
# Restore snapshot
> /moai:loop --resume latest> /moai:fixScans LSP errors and linting issues in parallel and fixes them at once. Level 1-2 fixes immediately, Level 3 fixes after user approval, Level 4 reports as requiring manual fix. Use --dry option to preview before applying actual fixes.
flowchart
Start([User Request<br/>/moai:fix]) --> Dry{--dry mode?}
Dry -->|Yes| ScanOnly[Scan only<br/>No fixes]
Dry -->|No| Scan[Parallel scan]
Scan --> LSP[LSP diagnosis<br/>Type, definition errors]
Scan --> AST[AST-grep<br/>Patterns, security]
Scan --> Linter[Linter<br/>Style, format]
LSP --> Collect[Issue collection]
AST --> Collect
Linter --> Collect
ScanOnly --> Report[Report output<br/>Expected fix content]
Collect --> Categorize[Level classification]
Categorize --> L1[Level 1<br/>Immediate fix]
Categorize --> L2[Level 2<br/>Safe fix]
Categorize --> L3[Level 3<br/>Approval needed]
Categorize --> L4[Level 4<br/>Manual needed]
L1 --> AutoFix1[Auto fix]
L2 --> AutoFix2[Auto fix+log]
L3 --> Approve{User approval?}
Approve -->|Yes| AutoFix3[Execute fix]
Approve -->|No| Skip[Skip]
L4 --> Manual[Report manual fix needed]
AutoFix1 --> Validate[Verification]
AutoFix2 --> Validate
AutoFix3 --> Validate
Skip --> Validate
Validate --> Results[Result summary]
Manual --> Results
Report --> End([โ
Complete])
Results --> End
style Scan fill:#e1f5fe
style Collect fill:#fff3e0
style AutoFix1 fill:#c8e6c9
style AutoFix2 fill:#c8e6c9
style AutoFix3 fill:#fff9c4
style Manual fill:#ffccbc
style End fill:#4caf50,color:#fff
Parallel scan (3.75x faster):
flowchart TB
Start([Parallel scan start]) --> Parallel
subgraph Parallel[Concurrent execution]
direction TB
LSP[LSP diagnosis]
AST[AST-grep inspection]
Linter[Linter inspection]
end
LSP --> Collect[Issue integration and level classification<br/>Level 1 โ 2 โ 3 โ 4]
AST --> Collect
Linter --> Collect
style Start fill:#e3f2fd
style Parallel fill:#f3f4f6
style LSP fill:#fff9c4
style AST fill:#ffccbc
style Linter fill:#c8e6c9
style Collect fill:#e1bee7
Fix level processing:
| Level | Description | Risk | Approval | Auto | Example |
|---|---|---|---|---|---|
| 1 | Immediate fix | Low | Not needed | โ | import sorting, whitespace |
| 2 | Safe fix | Low | Log only | โ | variable names, type addition |
| 3 | Approval needed | Medium | Needed | logic changes, API modification | |
| 4 | Manual needed | High | Impossible | โ | security, architecture |
One-time execution process:
-
Parallel scan (concurrent execution)
- LSP: Type errors, definitions not found, serious bugs
- AST-grep: Code patterns, security vulnerabilities
- Linter: Style, formatting, naming
-
Issue collection and classification
- Classify all issues by level
- Priority: Level 1 โ 2 โ 3 โ 4
-
Batch fix (execute at once)
- Level 1-2: Auto-fix immediately
- Level 3: Fix after user approval
- Level 4: Report manual fix needed
-
Verification and results
- Run tests after fixes
- Report summary of changes
| Situation | Description | Example |
|---|---|---|
| Clean up after coding | Clean up style, formatting all at once | Run /moai:fix after coding |
| Pre-commit inspection | Resolve LSP errors, linting in advance | Run before git commit |
| Quick fix | Solve at once without repetitive fixes | When fixing simple issues |
| Preview confirmation | Check fix content before applying | Run /moai:fix --dry |
flowchart
Start([Code quality issue occurred]) --> Question{Need repetitive<br/>fixing?}
Question -->|Yes| Loop[๐ /moai:loop<br/>Autonomous iterative fixing]
Question -->|No| Fix{Can solve<br/>at once?}
Fix -->|Yes| FixCmd[๐ง /moai:fix<br/>One-shot auto fix]
Fix -->|No| Loop
Loop --> LoopDesc[Complex issues<br/>Multiple files affected<br/>Repeated test failures]
FixCmd --> FixDesc[Simple issues<br/>Style, format<br/>LSP errors]
LoopDesc --> When1[Usage timing:<br/>Quality after implementation]
FixDesc --> When2[Usage timing:<br/>Quick clean up before commit]
style Loop fill:#f3e5f5
style FixCmd fill:#e8f5e9
style LoopDesc fill:#fff3e0
style FixDesc fill:#e1f5fe
Fix levels:
| Level | Description | Approval | Example |
|---|---|---|---|
| 1 | Immediate fix | Not needed | import sorting, whitespace |
| 2 | Safe fix | Log only | variable names, type addition |
| 3 | Approval needed | Needed | logic changes, API modification |
| 4 | Manual needed | Impossible | security, architecture |
Options:
--dry: Preview only (no actual fixes)--sequential/--seq: Sequential scan (for debugging) - parallel is default--level N: Max fix level (default: 3)--errors: Fix errors only--security: Include security check--no-fmt: Skip formatting
Performance: Parallel scan is now the default, combining LSP, AST-grep, and Linter results simultaneously (3.75x faster).
Example:
# Basic fix (parallel by default)
> /moai:fix
# Sequential scan (for debugging)
> /moai:fix --seq
# Preview
> /moai:fix --dry
# Specific files
> /moai:fix src/auth.pyThe most powerful feature of MoAI-ADK: AI autonomously explores, plans, implements, and verifies until the completion marker is detected.
User: "Add authentication feature"
โ
AI: Explore โ Plan โ Implement โ Verify โ Repeat
โ
AI: All issues resolved
โ
AI: <moai>DONE</moai> โ Completion Marker
MoAI-ADK provides three levels of autonomous automation:
| Command | Scope | Iteration | Purpose |
|---|---|---|---|
/moai:fix |
Code fixes only | 1 time | Single scan + auto-fix |
/moai:loop |
Code fixes | Until marker/max | Autonomous iterative fixing |
/moai:alfred |
Full dev cycle | Until marker/max | Goal โ SPEC โ Implement โ Docs |
/moai:alfred (Full Automation)
โ
โโโ Phase 0: Parallel Exploration
โโโ Phase 1: SPEC Generation
โโโ Phase 2: Implementation โโโฌโโ /moai:loop (Iterative)
โ โ โ
โ โ โโโ /moai:fix (Single)
โโโ Phase 3: Documentation
AI uses completion markers to signal task completion:
## Task Complete
All implementations done, tests passing, docs updated. <moai>DONE</moai>Supported Markers:
<moai>DONE</moai>- Task complete<moai>COMPLETE</moai>- Full completion<moai:done />- XML format
| Level | Description | Approval | Examples |
|---|---|---|---|
| 1 | Immediate fix | Not required | import sorting, whitespace |
| 2 | Safe fix | Log only | variable rename, type hints |
| 3 | Approval needed | Required | logic changes, API modifications |
| 4 | Manual required | Cannot auto | security, architecture |
# Single scan and fix (parallel by default)
> /moai:fix
# Autonomous loop until resolved
> /moai:loop --max 50
# Full autonomous development (parallel by default)
> /moai:alfred "Add JWT authentication" --loopThe name reflects the philosophy: set the goal and trust the AI. MoAI-ADK's agentic automation handles the entire development cycle autonomously. When you see <moai>DONE</moai>, all is truly well.
Role: Analyze user requests and delegate to appropriate specialized agents
Workflow:
- Understand: Request analysis and clarification
- Plan: Establish execution plan via Plan agent
- Execute: Delegate tasks to specialized agents (sequential/parallel)
- Integrate: Integrate results and report to user
Alfred automatically recognizes 4 language requests and invokes the correct agent:
| Request Language | Example | Agent Invoked |
|---|---|---|
| English | "Design backend API" | expert-backend |
| Korean | "๋ฐฑ์๋ API ์ค๊ณํด์ค" | expert-backend |
| Japanese | "ใใใฏใจใณใAPIใ่จญ่จใใฆ" | expert-backend |
| Chinese | "่ฎพ่ฎกๅ็ซฏAPI" | expert-backend |
| Agent | Expertise | Usage Example |
|---|---|---|
| expert-backend | FastAPI, Django, DB design | API design, query optimization |
| expert-frontend | React, Vue, Next.js | UI components, state management |
| expert-security | Security analysis, OWASP | Security audit, vulnerability analysis |
| expert-devops | Docker, K8s, CI/CD | Deployment automation, infrastructure |
| expert-debug | Bug analysis, performance | Problem diagnosis, bottleneck resolution |
| expert-performance | Profiling, optimization | Response time improvement |
| expert-refactoring | Code refactoring, AST-Grep | Large-scale code transformation |
| expert-testing | Test strategy, E2E | Test planning, coverage |
| Agent | Role | Auto Invocation Timing |
|---|---|---|
| manager-spec | SPEC writing (EARS) | /moai:1-plan |
| manager-ddd | DDD implementation execution | /moai:2-run |
| manager-docs | Documentation auto generation | /moai:3-sync |
| manager-quality | TRUST 5 verification | After implementation completion |
| manager-strategy | Execution strategy establishment | Complex planning |
| manager-project | Project initialization | /moai:0-project |
| manager-git | Git workflow | Branch/PR management |
| manager-claude-code | Claude Code integration | Settings optimization |
| Agent | Role | Usage Example |
|---|---|---|
| builder-agent | Create new agent | Organization specialist agent |
| builder-skill | Create new skill | Team-specific skill module |
| builder-command | Create new command | Custom workflow |
| builder-plugin | Create plugin | Distribution plugin |
๐๏ธ Foundation (5) โ Core philosophy, execution rules
๐ฏ Domain (4) โ Domain expertise
๐ป Language (16) โ 16 programming languages
๐ Platform (10) โ Cloud/BaaS integration
๐ Workflow (7) โ Automation workflows
๐ Library (4) โ Special libraries
๐ ๏ธ Tool (2) โ Development tools
| Purpose | Skill Combination |
|---|---|
| Backend API | moai-lang-python + moai-domain-backend + moai-platform-supabase |
| Frontend UI | moai-lang-typescript + moai-domain-frontend + moai-library-shadcn |
| Documentation | moai-library-nextra + moai-workflow-docs + moai-library-mermaid |
| Testing | moai-lang-python + moai-workflow-testing + moai-foundation-quality |
# Method 1: Direct call (Agent)
Skill("moai-lang-python")
# Method 2: Alfred auto selection (general user)
"FastAPI server ๋ง๋ค์ด์ค"
โ Alfred automatically selects moai-lang-pythonAll MoAI-ADK projects follow the TRUST 5 quality framework.
graph TD
T1["๐ด T: Tested<br/>โโโโโโโโ<br/>โข DDD with tests<br/>โข 85%+ coverage<br/>โข Behavior preserved"]
R["๐ R: Readable<br/>โโโโโโโโ<br/>โข Clear naming<br/>โข Code comments<br/>โข Linter compliance"]
U["๐ U: Unified<br/>โโโโโโโโ<br/>โข Consistent style<br/>โข Standard patterns<br/>โข Error handling"]
S["๐ S: Secured<br/>โโโโโโโโ<br/>โข OWASP Top 10<br/>โข Vulnerability scan<br/>โข Encryption policy"]
T2["๐ T: Trackable<br/>โโโโโโโโ<br/>โข Clear commits<br/>โข Issue tracking<br/>โข CHANGELOG"]
T1 --> R --> U --> S --> T2 --> Deploy["โ
Production Ready"]
Principle: All implementation is validated with tests
Verification:
- Test coverage >= 85%
- Characterization tests for existing code
- Behavior preservation verified
- Incremental improvements
Principle: Code must be clear and easy to understand
Verification:
- Clear variable names
- Comments on complex logic
- Pass code review
- Pass linter checks
Principle: Maintain consistent style across project
Verification:
- Follow project style guide
- Consistent naming conventions
- Unified error handling
- Standard document format
Principle: All code must pass security verification
Verification:
- OWASP Top 10 checks
- Dependency vulnerability scanning
- Encryption policy compliance
- Access control verification
Principle: All changes must be clearly trackable
Verification:
- Clear commit messages
- Issue tracking (GitHub Issues)
- Maintain CHANGELOG
- Code review records
AST-Grep analyzes code structure not text:
| Feature | Description | Example |
|---|---|---|
| Structural Search | AST pattern matching | Find unparameterized SQL queries |
| Security Scan | Auto vulnerability detection | SQL Injection, XSS, hardcoded secrets |
| Pattern Refactoring | Safe code transformation | Bulk variable rename, function extraction |
| Multi-language Support | 40+ languages | Python, TypeScript, Go, Rust... |
Code writing
โ
[Hook] AST-Grep auto scan
โ
โ ๏ธ Immediate alert on vulnerability detection
โ
โ
Refactor to safe code
Detection Example:
โ ๏ธ AST-Grep: Potential SQL injection in src/auth.py:47
Pattern: execute(f"SELECT * FROM users WHERE id={user_id}")
Suggestion: execute("SELECT * FROM users WHERE id=%s", (user_id,))MoAI-ADK provides a customizable statusline that displays real-time project information in Claude Code.
๐ค Opus 4.5 | ๐ฐ 152K/200K | ๐ฌ Mr. Alfred | ๐ MoAI-ADK | ๐ +0 M58 ?5 | ๐พ 57.7MB | ๐ main
| Icon | Component | Description | Config Key |
|---|---|---|---|
| ๐ค | Model | Claude model (Opus, Sonnet, etc.) | model |
| ๐ฐ | Context | Context window usage (e.g., 77K/200K) | context_window |
| ๐ฌ | Style | Active output style (e.g., Mr. Alfred) | output_style |
| ๐ | Directory | Current project name | directory |
| ๐ | Git Status | Staged/Modified/Untracked files | git_status |
| ๐พ | Memory | Process memory usage | memory_usage |
| ๐ | Branch | Current Git branch | branch |
| ๐ | Version | Claude Code version (optional) | version |
Edit .moai/config/statusline-config.yaml:
display:
model: true # ๐ค Claude model
context_window: true # ๐ฐ Context window
output_style: true # ๐ฌ Output style
directory: true # ๐ Project name
git_status: true # ๐ Git status
memory_usage: true # ๐พ Memory usage
branch: true # ๐ Git branch
version: 1.1.0 # ๐
Version (optional)
active_task: true # Active taskWhen memory_usage is enabled, MoAI-ADK uses psutil to collect real-time memory usage:
- Process Memory: RSS (Resident Set Size) of the current Python process
- Caching: Performance optimization with 10-second TTL
- Cross-Platform: Supports macOS, Linux, Windows
- Graceful Degradation: Displays "N/A" when psutil is unavailable
| Mode | Max Length | Use Case |
|---|---|---|
compact |
80 chars | Standard terminal |
extended |
120 chars | Wide terminal |
minimal |
40 chars | Narrow terminal |
Set mode:
export MOAI_STATUSLINE_MODE=extendedMoAI-ADK's core innovation: Worktree for complete isolation, unlimited parallel development
Problem: Changing LLMs with moai glm/moai cc applies to all open sessions. Changing models in the same session leads to authentication errors, making continuation difficult.
Solution: Git Worktree completely isolates each SPEC to maintain independent LLM settings
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Terminal 1 (Claude Opus) - SPEC Design Only โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ $ cd my-project โ
โ $ claude โ
โ โ
โ > /moai:1-plan "์ฌ์ฉ์ ์ธ์ฆ ์์คํ
" --worktree โ
โ โ
SPEC-AUTH-001 ์์ฑ ์๋ฃ โ
โ โ
Worktree ์์ฑ: ~/moai/worktrees/my-project/SPEC-AUTH-001 โ
โ โ
Branch: feature/SPEC-AUTH-001 โ
โ โ
โ > /moai:1-plan "๊ฒฐ์ ์์คํ
" --worktree โ
โ โ
SPEC-PAY-002 ์์ฑ ์๋ฃ โ
โ โ
Worktree ์์ฑ: ~/moai/worktrees/my-project/SPEC-PAY-002 โ
โ โ
โ > /moai:1-plan "๋์๋ณด๋ UI" --worktree โ
โ โ
SPEC-UI-003 ์์ฑ ์๋ฃ โ
โ โ
Worktree ์์ฑ: ~/moai/worktrees/my-project/SPEC-UI-003 โ
โ โ
โ ๐ก Opus๋ก ๋ชจ๋ SPEC ๊ณํ ์๋ฃ (์ธ์
์ ์ง ์ค...) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Terminal 2 - SPEC-AUTH-001 Worktree (GLM 4.7) โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ $ moai-worktree go SPEC-AUTH-001 โ
โ # Or shortcut: moai-wt go SPEC-AUTH-001 โ
โ โ
โ ๐ Current location: ~/moai/worktrees/my-project/SPEC-AUTH-001 โ
โ ๐ Branch: feature/SPEC-AUTH-001 โ
โ โ
โ $ moai glm โ
โ โ
Switched to GLM backend โ
โ โ
โ $ claude โ
โ > /moai:2-run SPEC-AUTH-001 โ
โ ๐ DDD Running... (Analyze โ Preserve โ Improve) โ
โ โ
๊ตฌํ ์๋ฃ! โ
โ โ
ํ
์คํธ ํต๊ณผ (Coverage: 92%) โ
โ โ
โ > /moai:3-sync SPEC-AUTH-001 โ
โ โ
๋ฌธ์ ๋๊ธฐํ ์๋ฃ โ
โ โ
โ # After completion, merge โ
โ $ git checkout main โ
โ $ git merge feature/SPEC-AUTH-001 โ
โ $ moai-worktree clean --merged-only โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Terminal 3 - SPEC-PAY-002 Worktree (GLM 4.7) โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ $ moai-wt go SPEC-PAY-002 โ
โ $ moai glm โ
โ $ claude โ
โ โ
โ > /moai:alfred SPEC-PAY-002 โ
โ ๐ Plan โ Run โ Sync ์๋ ์คํ โ
โ โ
์๋ฃ! โ
โ โ
โ $ git checkout main && git merge feature/SPEC-PAY-002 โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Terminal 4 - SPEC-UI-003 Worktree (GLM 4.7) โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ $ moai-wt go SPEC-UI-003 โ
โ $ moai glm โ
โ $ claude โ
โ > /moai:alfred SPEC-UI-003 โ
โ โ
์๋ฃ! โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
/moai:1-plan "feature description" --worktree- โ SPEC document generation
- โ Worktree auto creation
- โ Feature branch auto creation
moai-wt go SPEC-ID
moai glm
claude
> /moai:2-run SPEC-ID
> /moai:3-sync SPEC-ID- โ Isolated work environment
- โ GLM cost efficiency
- โ Conflict-free parallel development
# Option 1: Complete in one step (Recommended)
moai-wt done SPEC-ID # checkout main โ merge โ cleanup
moai-wt done SPEC-ID --push # above + push to remote
# Option 2: Manual steps
git checkout main
git merge feature/SPEC-ID
moai-wt clean --merged-only| Benefit | Description |
|---|---|
| Complete Isolation | Each SPEC has independent Git state, no file conflicts |
| LLM Independence | Separate LLM settings per Worktree |
| Unlimited Parallel | Unlimited SPEC parallel development without dependencies |
| Safe Merge | Only completed SPECs sequentially merge to main |
| Command | Description | Usage Example |
|---|---|---|
moai-wt new SPEC-ID |
Create new Worktree | moai-wt new SPEC-AUTH-001 |
moai-wt go SPEC-ID |
Enter Worktree (open new shell) | moai-wt go SPEC-AUTH-001 |
moai-wt list |
List Worktrees | moai-wt list |
moai-wt done SPEC-ID |
Merge and cleanup (checkoutโmerge) | moai-wt done SPEC-AUTH-001 |
moai-wt remove SPEC-ID |
Remove Worktree | moai-wt remove SPEC-AUTH-001 |
moai-wt status |
Check Worktree status and registry | moai-wt status |
moai-wt sync [SPEC-ID] |
Synchronize Worktree | moai-wt sync --all |
moai-wt clean |
Clean merged Worktrees | moai-wt clean --merged-only |
moai-wt recover |
Recover registry from disk | moai-wt recover |
moai-wt config |
Check Worktree settings | moai-wt config root |
The CLAUDE.md file generated in your project root after MoAI-ADK installation is Alfred's (AI Orchestrator) execution directive. This file defines how Claude Code behaves in your project.
CLAUDE.md is a project configuration file that Claude Code automatically reads at session start. In MoAI-ADK, this file defines the behavioral rules for the Alfred orchestrator.
๐ Project Root
โโโ CLAUDE.md โ Alfred execution directive (don't modify)
โโโ CLAUDE.local.md โ Personal custom directives (optional)
โโโ .claude/
โ โโโ settings.json โ Claude Code settings
โ โโโ agents/ โ Sub-agent definitions
โ โโโ commands/ โ Slash commands
โ โโโ skills/ โ Skill definitions
โโโ .moai/
โโโ config/ โ MoAI configuration
| Section | Description | Key Content |
|---|---|---|
| Core Identity | Alfred's role definition | Strategic orchestrator, HARD rules |
| Request Processing Pipeline | Request handling flow | Analyze โ Route โ Execute โ Report |
| Command Reference | Command classification | Type A (Workflow), Type B (Utility), Type C (Feedback) |
| Agent Catalog | Sub-agent listing | 8 Managers, 8 Experts, 4 Builders |
| SPEC-Based Workflow | SPEC-driven development | Plan โ Run โ Sync flow |
| Quality Gates | Quality validation rules | HARD/SOFT rules checklist |
| Configuration Reference | Settings reference | Language, output format rules |
Recommendation: Use
CLAUDE.mdas-is without modification.
Reasons:
- Automatically replaced with the latest version during MoAI-ADK updates
- Modifications may cause update conflicts
- Ensures consistent behavior across agents
# CLAUDE.md is automatically updated
moai updateIf you need additional directives, create a CLAUDE.local.md file.
# Create CLAUDE.local.md in project root
touch CLAUDE.local.mdCLAUDE.local.md Example:
# Project Local Directives
## Coding Style
- Type hints required for all functions
- Use Google-style docstrings
## Project-Specific Rules
- API responses always use snake_case
- Test files must have test\_ prefix
## Prohibited
- No console.log (use logger)
- No any type usageBenefits:
- No conflicts with
CLAUDE.mdupdates - Project-specific customization
- Can add to
.gitignorefor personal settings
| Aspect | CLAUDE.md | CLAUDE.local.md |
|---|---|---|
| Purpose | Alfred execution directives | Personal/project additional directives |
| Modification | Not recommended | Freely modifiable |
| Updates | Managed by MoAI | Managed by user |
| Git | Committed | Optional (.gitignore possible) |
| Priority | Base rules | Additional/override rules |
HARD rules defined in CLAUDE.md are always enforced:
- Language-Aware Responses: Respond in user's language
- Parallel Execution: Execute independent tasks in parallel
- No XML in User Responses: No XML tags in user-facing responses
These rules cannot be overridden even by CLAUDE.local.md.
A new dimension of agentic coding: Track your coding journey and compete with global developers!
| Feature | Description |
|---|---|
| ๐ Token Tracking | Automatic AI usage tracking per session |
| ๐ Global Leaderboard | Daily/Weekly/Monthly/All-time rankings |
| ๐ญ Coding Style Analysis | Discover your unique development patterns |
| ๐ Dashboard | Visualized statistics and insights |
โฏ moai rank
Usage: moai rank [OPTIONS] COMMAND [ARGS]...
MoAI Rank - Token usage leaderboard.
Track your Claude Code token usage and compete on the leaderboard.
Visit https://rank.mo.ai.kr for the web dashboard.
Commands:
register Register with MoAI Rank via GitHub OAuth.
status Show your current rank and statistics.
exclude Exclude a project from session tracking.
include Re-include a previously excluded project.
logout Remove stored MoAI Rank credentials.โฏ moai rank register
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโ Registration โโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ MoAI Rank Registration โ
โ โ
โ This will open your browser to authorize with GitHub. โ
โ After authorization, your API key will be stored securely. โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Opening browser for GitHub authorization...
Waiting for authorization (timeout: 5 minutes)...
โญโโโโโโโโโโโโโโโโโโโโโโโโโ Registration Complete โโโโโโโโโโโโโโโโโโโโโโโฎ
โ Successfully registered as your-github-id โ
โ โ
โ API Key: moai_rank_a9011fac_c... โ
โ Stored in: ~/.moai/rank/credentials.json โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โญโโโโโโโโโโโโโโโโโโโโโโโโโ Global Hook Installed โโโโโโโโโโโโโโโโโโโโโโโฎ
โ Session tracking hook installed globally. โ
โ โ
โ Your Claude Code sessions will be automatically tracked. โ
โ Hook location: ~/.claude/hooks/moai/session_end__rank_submit.py โ
โ โ
โ To exclude specific projects: โ
โ moai rank exclude /path/to/project โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏSync your existing Claude Code session data to MoAI Rank.
โฏ moai rank sync
Syncing 2577 session(s) to MoAI Rank
Phase 1: Parsing transcripts (parallel: 20 workers)
Parsing transcripts โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ 100% (2577/2577)
Phase 2: Submitting 1873 session(s) (batch mode)
Batch size: 100 | Batches: 19
Submitting batches โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ 100% (19/19)
Sync Complete
โ Submitted: 1169
โ Skipped: 704 (no usage or duplicate)
โ Failed: 0โฏ moai rank status
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ MoAI Rank โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ your-github-id โ
โ โ
โ ๐ Global Rank: #42 โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โญโโโโโ Daily โโโโโโโฎ โญโโโโโ Weekly โโโโโโฎ โญโโโโ Monthly โโโโโโฎ โญโโโโ All Time โโโโโฎ
โ #12 โ โ #28 โ โ #42 โ โ #156 โ
โฐโโโโโโโโโโโโโโโโโโโฏ โฐโโโโโโโโโโโโโโโโโโโฏ โฐโโโโโโโโโโโโโโโโโโโฏ โฐโโโโโโโโโโโโโโโโโโโฏ
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโ Token Usage โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ 1,247,832 total tokens โ
โ โ
โ Input โโโโโโโโโโโโโโโโโโโโ 847,291 (68%) โ
โ Output โโโโโโโโโโโโโโโโโโโโ 400,541 (32%) โ
โ โ
โ Sessions: 47 โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โ Hook: Installed | https://rank.mo.ai.krOn the dashboard:
- Token usage trends
- Tool usage statistics
- Model-specific usage analysis
- Weekly/monthly reports
๐ Details: Refer to modu-ai/moai-rank repository.
| Metric | Description |
|---|---|
| Token Usage | Input/output tokens, cache tokens |
| Tool Usage | Read, Edit, Bash usage counts |
| Model Usage | Opus, Sonnet, Haiku breakdown |
| Code Metrics | Added/deleted lines, modified files |
| Session Info | Duration, turn count, timestamps |
# Exclude current project
moai rank exclude
# Exclude specific path
moai rank exclude /path/to/private
# Wildcard pattern
moai rank exclude "*/confidential/*"
# List excluded
moai rank list-excludedGuarantee: Collected data is numeric metrics only (code content, file paths not transmitted)
| Condition | SPEC Required |
|---|---|
| 1-2 files modified | Optional (can skip) |
| 3-5 files modified | Recommended |
| 10+ files modified | Required |
| New feature addition | Recommended |
| Bug fix | Optional |
Required (1):
- Context7: For latest library documentation and Skill reference generation
Optional:
- claude-in-chrome: Use Claude in browser and web automation testing
- Playwright: Web automation testing
- Figma: Design system
It's free. Only automatically collects session data.
No. You can use Claude only. However, it's recommended for cost savings.
Yes. moai init . preserves existing files.
- Discord (Official): https://discord.gg/umywNygN
- GitHub: https://github.com/modu-ai/moai-adk
- Developer Blog: https://goos.kim
- Email: support@mo.ai.kr
- Documentation: https://adk.mo.ai.kr
Copyleft License (COPYLEFT-3.0) - LICENSE
Last Updated: 2026-01-13 Philosophy: SPEC-First DDD + Agent Orchestration + Hybrid LLM MoAI: MoAI means "Modu-ui AI" (AI for Everyone).
"Infinite Possibilism - AI for All"


