AAA-grade Development Assistant powered by Claude Agent SDK
An advanced CLI tool that leverages the full power of the Claude Agent SDK, featuring multiple MCP servers, specialized AI agents, comprehensive hooks, and intelligent permission management.
- Chat: Interactive conversation mode
- Analyze: Deep codebase analysis and insights
- Review: Comprehensive code review with feedback
- Refactor: Smart code improvement suggestions
- Plan: Project planning and architecture design
- Test: Intelligent test generation and coverage analysis
- Debug: Advanced debugging and error resolution
Advanced file operations beyond basic Read/Write:
- Directory traversal with metadata
- File tree visualization
- Content-based search
- File analysis and statistics
- Bulk operations (rename, move, delete)
Smart git operations and workflow automation:
- Enhanced status with remote tracking
- Intelligent commit message suggestions
- Branch management (create, switch, compare, delete)
- Commit history analysis and statistics
- Merge conflict detection and resolution assistance
Professional code quality metrics:
- Cyclomatic complexity analysis
- Code smell detection
- Dependency graph with circular dependency detection
- Refactoring suggestions with priorities
- Maintainability index calculation
Complete development lifecycle support:
- Automated test generation (unit, integration, e2e)
- Debug strategy suggestions
- Project scaffolding templates
- Performance profiling and optimization hints
Each agent is an expert in their domain:
- Architect ποΈ: System design and architecture planning
- Reviewer π: Comprehensive code review specialist
- Refactor β»οΈ: Code improvement and cleanup expert
- Tester π§ͺ: Test generation and QA specialist
- Debug π: Bug investigation and resolution expert
- Planner π: Task breakdown and project planning
- Docs π: Documentation generation specialist
- Optimizer β‘: Performance optimization expert
Real-time monitoring and automation:
- SessionStart/End: Session lifecycle management
- PreToolUse: Safety validation and permission checks
- PostToolUse: Result monitoring and auto-backup
- Notification: Custom alerts and messages
- Performance: Slow operation detection
- PreCompact: Context management
Flexible security modes:
- Default: Interactive approval
- Auto-approve: For read operations
- Dev mode: Smart approvals for common operations
- Safe mode: Block dangerous operations
- Custom rules: Define your own patterns
# Clone and install
git clone <repository-url>
cd Cli
npm install
# Set your API key
export ANTHROPIC_API_KEY=your_api_key_here# Interactive chat
npm start
# Analyze codebase
npm run analyze
# Review code
npm run review
# Generate tests
npm run test "Generate tests for src/utils/parser.ts"
# Debug issues
npm run debug "Why is the API returning 500?"
# Plan feature
npm run plan "Design user authentication system"devmaster [OPTIONS] [PROMPT]
Options:
--mode, -m <mode> Operation mode (chat|analyze|review|refactor|plan|test|debug)
--model <model> AI model (sonnet|opus|haiku)
--permission-mode, -p Permission mode (default|acceptEdits|bypassPermissions|plan)
--verbose, -v Enable verbose logging
--output, -o <format> Output format (text|json|markdown)
--session, -s <id> Resume existing session
--fork, -f Fork session instead of continuing
--max-turns <n> Maximum conversation turns
--help, -h Show help message
--version Show version
npm run review -- -p acceptEdits "Review all changes in src/"npm run analyze -- --output markdown > analysis.mdnpm start -- --mode refactor -p acceptEdits "Simplify authentication logic"npm run debug -- -v "Memory leak in WebSocket handler"npm run plan -- "Design microservices architecture for e-commerce"src/
βββ index.ts # Main entry point
βββ cli.ts # CLI interface and argument parsing
βββ servers/ # MCP Server implementations
β βββ filesystem.ts # Advanced file operations
β βββ git.ts # Git workflow automation
β βββ codeAnalysis.ts # Code quality metrics
β βββ devWorkflow.ts # Testing and debugging
βββ agents/ # Specialized AI agents
β βββ index.ts # Agent definitions
βββ hooks/ # Event hooks
β βββ index.ts # Hook implementations
βββ utils/ # Utility modules
β βββ ui.ts # Terminal UI
β βββ streaming.ts # Stream handling
β βββ permissions.ts # Permission management
βββ types/ # TypeScript types
βββ index.ts # Shared type definitions
- Claude Agent SDK: Core AI capabilities
- TypeScript: Type-safe development
- Zod: Schema validation
- MCP Protocol: Tool and server integration
- Node.js: Runtime environment
list_directories({ path, recursive, maxDepth })
file_tree({ path, maxDepth, includeFiles, excludePatterns })
search_files({ pattern, path, filePattern, caseSensitive })
analyze_file({ filePath })
bulk_operation({ operation, pattern, destination, dryRun })git_status({ verbose })
suggest_commit({ analyzeCode })
branch_management({ action, branchName, baseBranch })
analyze_history({ limit, since, author })
conflict_helper()analyze_complexity({ filePath })
detect_code_smells({ filePath })
analyze_dependencies({ rootPath, maxDepth })
suggest_refactorings({ filePath })generate_tests({ sourceFile, testType, framework })
analyze_debug({ filePath, errorMessage })
scaffold_project({ projectType, projectName, features })
profile_performance({ filePath })Agents automatically invoke when their expertise is needed:
# Explicit agent invocation
npm start "Use the architect agent to design a caching layer"
# Implicit invocation
npm run review # Automatically uses reviewer agent
npm run test # Automatically uses tester agent
npm run debug # Automatically uses debug agentANTHROPIC_API_KEY # Required: Your Claude API key
VERBOSE # Optional: Enable verbose logging
AUTO_BACKUP # Optional: Auto-backup modified filesCreate .claude/settings.json for project-specific configuration:
{
"defaultMode": "chat",
"defaultModel": "sonnet",
"permissionMode": "default"
}npm run analyze # Identify issues
npm run review # Get detailed feedback
npm run refactor # Apply improvements
npm run test # Generate comprehensive testsnpm run plan "Add payment processing"
npm start -- "Implement payment processing with the architect agent"
npm run test "Generate tests for payment module"
npm run review "Review payment implementation"npm run debug "API returns 500 on POST /users"
# Agent analyzes, suggests fixes
npm run test "Generate tests to prevent regression"npm start "Use docs agent to create comprehensive README"
npm start "Generate API documentation for src/api/"- System directory writes blocked
- Destructive commands require approval
- Sensitive file modifications flagged
- Default: Asks for approval
- Safe Mode: Extra validation
- Dev Mode: Common operations auto-approved
- Bypass: For automation (use carefully)
Enable automatic backups of modified files:
export AUTO_BACKUP=trueBackups stored in .devmaster/backups/
Beautiful terminal output with colors and formatting
Machine-readable output for integration:
npm start -- --output json > output.jsonDocumentation-friendly reports:
npm run analyze -- --output markdown > analysis.mdThis is a demonstration project showcasing Claude Agent SDK capabilities. Feel free to:
- Fork and extend with new MCP servers
- Add more specialized agents
- Create custom hooks
- Improve existing tools
MIT
Built with:
- Claude Agent SDK
- Anthropic Claude
- TypeScript, Node.js, and the amazing open-source community
DevMaster CLI - Bringing AAA-grade AI assistance to your development workflow! π