Essentials

Command Reference

Complete reference for all AI Developer Assistant commands

Command Reference

This is a complete reference for all AI Developer Assistant commands, options, and usage patterns.

Global Options

These options are available for all commands:

--llm-provider <provider>     # LLM provider: openai, ollama, gemini
--llm-model <model>           # Model name (e.g., gpt-4, llama2, gemini-pro)
--llm-temperature <temp>      # Temperature (0-1, default: 0.7)
--llm-max-tokens <tokens>     # Maximum tokens (default: 1000)
--output-format <format>      # Output format: console, markdown, json, html
--output-path <path>          # Output file path (for file format)
--output-verbose              # Enable verbose output
--output-colorize             # Enable colored output
--file-patterns <patterns>    # Include patterns (comma-separated)
--exclude-patterns <patterns> # Exclude patterns (comma-separated)
--help                        # Show command help
--version                     # Show version information

Code Review Commands

ai-dev review

Analyze and review code changes with AI-powered feedback.

ai-dev review [options]

Options:

  • --staged: Review staged changes only
  • --unstaged: Review unstaged changes only
  • --base <ref>: Base reference for comparison
  • --head <ref>: Head reference for comparison
  • --post-github: Post review comments to GitHub PR
  • --format <format>: Output format (console, markdown, json)
  • --verbose: Show detailed output

Examples:

# Review all changes
ai-dev review

# Review staged changes
ai-dev review --staged

# Review specific files
ai-dev review --file-patterns "src/**/*.ts"

# Review with verbose output
ai-dev review --verbose

# Post to GitHub PR
ai-dev review --post-github --github-owner your-org --github-repo your-repo --pr 123

ai-dev explain

Explain commits or functions in plain English.

ai-dev explain [options]

Options:

  • --level <level>: Explanation depth (basic, detailed, expert)
  • --include-examples: Include code examples
  • --style <style>: Explanation style (formal, casual, technical)

Examples:

# Explain last commit
ai-dev explain

# Detailed explanation
ai-dev explain --level detailed --include-examples

# Explain specific files
ai-dev explain --file-patterns "src/utils/**/*.ts"

ai-dev commit-msg

Generate commit message suggestions based on changes.

ai-dev commit-msg [options]

Options:

  • --style <style>: Commit message style (conventional, simple, detailed)
  • --max-length <length>: Maximum message length
  • --include-body: Include commit body

Examples:

# Generate commit message
ai-dev commit-msg

# Conventional commit format
ai-dev commit-msg --style conventional --include-body

# Specific length
ai-dev commit-msg --max-length 100

ai-dev refactor

Suggest refactoring improvements for cleaner code.

ai-dev refactor [options]

Options:

  • --focus <focus>: Focus area (performance, readability, maintainability)
  • --severity <severity>: Minimum suggestion severity (low, medium, high)

Examples:

# Get refactoring suggestions
ai-dev refactor

# Focus on performance
ai-dev refactor --focus performance

# High severity only
ai-dev refactor --severity high

Testing Commands

ai-dev test-suggest

Generate test case templates and suggestions with automatic language and framework detection.

ai-dev test-suggest [options]

Options:

  • --framework <framework>: Test framework (auto-detected from file language)
  • --test-type <type>: Test type (unit, integration, e2e, performance, security)
  • --language <language>: Programming language (auto-detected from file extension)
  • --coverage-target <target>: Target coverage percentage
  • --include-setup: Include test setup code
  • --include-teardown: Include test teardown code

Language & Framework Auto-Detection:

  • Dart → Flutter Test Framework
  • TypeScript/JavaScript → Jest
  • Python → pytest
  • Java → JUnit
  • C# → NUnit
  • Go → Go Testing
  • Rust → Cargo Test

Examples:

# Auto-detect language and generate tests
ai-dev test-suggest --file-patterns "lib/**/*.dart"     # Dart/Flutter tests
ai-dev test-suggest --file-patterns "src/**/*.ts"      # TypeScript/Jest tests
ai-dev test-suggest --file-patterns "*.py"             # Python tests

# Generate specific test types
ai-dev test-suggest --file-patterns "*.dart" --test-type "integration"
ai-dev test-suggest --file-patterns "*.ts" --test-type "e2e"

# Include setup and teardown
ai-dev test-suggest --file-patterns "*.py" --include-setup --include-teardown

Security Commands

ai-dev security-scan

Detect vulnerabilities and security issues with language-specific analysis.

ai-dev security-scan [options]

Options:

  • --severity <severity>: Minimum severity level (low, medium, high, critical)
  • --categories <categories>: Security categories to scan
  • --include-dependencies: Scan dependency vulnerabilities

Examples:

# Basic security scan
ai-dev security-scan

# High severity only
ai-dev security-scan --severity high,critical

# Include dependencies
ai-dev security-scan --include-dependencies

# Specific categories
ai-dev security-scan --categories injection,authentication

Documentation Commands

ai-dev docs

Generate documentation for code with language-specific formatting.

ai-dev docs [options]

Options:

  • --format <format>: Documentation format (markdown, jsdoc, tsdoc, asciidoc, rst)
  • --doc-type <type>: Documentation type (function, class, interface, module, api, readme, changelog, architecture)
  • --include-examples: Include code examples
  • --include-parameters: Include parameter documentation
  • --include-return-types: Include return type documentation
  • --include-see-also: Include "see also" references
  • --style <style>: Documentation style (formal, casual, technical, beginner)

Examples:

# Generate documentation
ai-dev docs

# API documentation
ai-dev docs --file-patterns "lib/**/*.dart" --doc-type "api"

# Include comprehensive documentation
ai-dev docs --file-patterns "*.ts" --include-examples --include-parameters --include-return-types

# Different documentation types
ai-dev docs --file-patterns "*.ts" --doc-type "readme"
ai-dev docs --file-patterns "*.dart" --doc-type "changelog"
ai-dev docs --file-patterns "*.py" --doc-type "architecture"

Collaboration Commands

ai-dev pr-summary

Summarize pull request changes.

ai-dev pr-summary [options]

Options:

  • --pr <number>: Pull request number
  • --include-metrics: Include change metrics
  • --style <style>: Summary style (brief, detailed, technical)

Examples:

# Summarize PR
ai-dev pr-summary --pr 123

# Include metrics
ai-dev pr-summary --pr 123 --include-metrics

# Technical summary
ai-dev pr-summary --pr 123 --style technical

ai-dev mentor

Get educational feedback on code quality and best practices.

ai-dev mentor [options]

Options:

  • --level <level>: Experience level (beginner, intermediate, advanced)
  • --focus <focus>: Focus areas (clean-code, patterns, performance)
  • --include-resources: Include learning resources

Examples:

# Get mentorship feedback
ai-dev mentor

# Specify experience level
ai-dev mentor --level intermediate

# Focus on specific areas
ai-dev mentor --focus clean-code

Configuration Commands

ai-dev config

Manage configuration settings.

ai-dev config <subcommand> [options]

Subcommands:

  • show: Display current configuration
  • validate: Validate configuration file
  • test: Test configuration with specific provider

Examples:

# Show current configuration
ai-dev config show

# Validate configuration
ai-dev config validate

# Test Gemini configuration
ai-dev config test --provider gemini

Utility Commands

ai-dev version

Show version information.

ai-dev version

ai-dev help

Show help information.

ai-dev help
ai-dev <command> --help

File Pattern Examples

Language-Specific Patterns

# TypeScript/JavaScript
ai-dev review --file-patterns "src/**/*.{ts,tsx,js,jsx}"

# Python
ai-dev review --file-patterns "**/*.py"

# Dart/Flutter
ai-dev review --file-patterns "lib/**/*.dart"

# Java
ai-dev review --file-patterns "src/**/*.java"

# Multi-language
ai-dev review --file-patterns "src/**/*.{ts,js,py,java}"

Project-Specific Patterns

# Frontend only
ai-dev review --file-patterns "frontend/**/*.{ts,tsx,js,jsx}"

# Backend only
ai-dev review --file-patterns "backend/**/*.{py,java,go}"

# Exclude test files
ai-dev review --file-patterns "src/**/*.ts" --exclude-patterns "**/*.test.ts,**/*.spec.ts"

Output Format Examples

Console Output (Default)

ai-dev review

Markdown Output

ai-dev review --format markdown --output-path review.md

JSON Output

ai-dev review --format json --output-path review.json

HTML Output

ai-dev review --format html --output-path review.html

Complete Examples

Daily Development Workflow

# 1. Make changes and stage them
git add .

# 2. Review staged changes
ai-dev review --staged --verbose

# 3. Generate commit message
ai-dev commit-msg --staged --style conventional

# 4. Commit with generated message
git commit -m "$(ai-dev commit-msg --staged)"

Pull Request Workflow

# 1. Review with GitHub integration
ai-dev review --post-github --github-owner your-org --github-repo your-repo --pr 123

# 2. Generate PR summary
ai-dev pr-summary --pr 123 --include-metrics

# 3. Security scan
ai-dev security-scan --severity high,critical

Documentation Workflow

# 1. Generate API documentation
ai-dev docs --file-patterns "src/api/**/*.ts" --doc-type "api" --include-examples

# 2. Generate README
ai-dev docs --file-patterns "src/**/*.ts" --doc-type "readme"

# 3. Generate changelog
ai-dev docs --file-patterns "src/**/*.ts" --doc-type "changelog"
Use ai-dev <command> --help for detailed help on any specific command. All commands support the global options for LLM provider, output format, and file patterns.