Complete reference for the Aurelis command-line interface. All commands work with GitHub models via Azure AI Inference.
aurelis [GLOBAL_OPTIONS] COMMAND [COMMAND_OPTIONS] [ARGS]
--help
- Show help message and exit--version
- Show version information--config PATH
- Use custom configuration file--verbose
- Enable verbose logging--quiet
- Suppress non-essential outputaurelis init
Initialize Aurelis configuration for GitHub models.
aurelis init [OPTIONS]
Options:
--config PATH
- Path to configuration file (default: .aurelis.yaml
)--force
- Overwrite existing configuration--help
- Show command helpExamples:
# Basic initialization
aurelis init
# Force recreate configuration
aurelis init --force
# Custom config location
aurelis init --config /path/to/config.yaml
aurelis models
Display available GitHub models and their capabilities.
aurelis models [OPTIONS]
Options:
--detailed
- Show detailed model information--health
- Include health status for each model--json
- Output in JSON formatExamples:
# List all models
aurelis models
# Detailed model information
aurelis models --detailed
# Health check for all models
aurelis models --health
Sample Output:
GitHub Models via Azure AI Inference
ββββββββββββββββββββββββββ³ββββββββββββ³βββββββββββββββββββββββββββββββββββββββ
β Model β Provider β Best For β
β‘ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©
β Codestral-2501 β Mistral β Code generation & optimization β
β GPT-4o β OpenAI β Complex reasoning & multimodal β
β GPT-4o-mini β OpenAI β Fast responses & documentation β
ββββββββββββββββββββββββββ΄ββββββββββββ΄βββββββββββββββββββββββββββββββββββββββ
aurelis config
Manage Aurelis configuration and GitHub token.
aurelis config [OPTIONS]
Options:
--show
- Display current configuration--set KEY=VALUE
- Set configuration value--token TOKEN
- Set GitHub token--validate
- Validate current configurationExamples:
# Show current configuration
aurelis config --show
# Set primary model
aurelis config --set models.primary=gpt-4o
# Update GitHub token
aurelis config --token ghp_your_new_token
# Validate configuration
aurelis config --validate
aurelis analyze
Analyze Python code for issues, improvements, and insights.
aurelis analyze [OPTIONS] PATH [PATH...]
Options:
--model MODEL
- Specific model to use for analysis--type TYPE
- Analysis type: security|performance|style|complexity|all
--output FORMAT
- Output format: text|json|markdown|html
--recursive
- Analyze directories recursively--exclude PATTERN
- Exclude files matching pattern--config PATH
- Use specific configuration fileExamples:
# Analyze single file
aurelis analyze script.py
# Analyze directory recursively
aurelis analyze --recursive src/
# Security analysis only
aurelis analyze --type security app.py
# Use specific model
aurelis analyze --model codestral-2501 module.py
# Output as JSON
aurelis analyze --output json script.py
# Exclude test files
aurelis analyze --exclude "*_test.py" --recursive src/
Sample Output:
π Analysis Results for script.py
π Code Quality Score: 85/100
π Metrics:
β’ Lines of Code: 156
β’ Cyclomatic Complexity: 12
β’ Maintainability Index: 68
β οΈ Issues Found (3):
1. Performance: O(nΒ²) algorithm in fibonacci() (line 23)
2. Security: Potential SQL injection in query() (line 45)
3. Style: Missing docstring in helper() (line 67)
β
Suggestions:
β’ Use memoization for fibonacci calculation
β’ Implement parameterized queries
β’ Add comprehensive docstrings
aurelis generate
Generate code from natural language descriptions.
aurelis generate [OPTIONS] DESCRIPTION
Options:
--model MODEL
- Specific model for generation--language LANG
- Target programming language (default: python)--style STYLE
- Code style: clean|optimized|documented|minimal
--output PATH
- Save generated code to file--template TEMPLATE
- Use specific code template--interactive
- Interactive refinement modeExamples:
# Basic code generation
aurelis generate "Create a FastAPI endpoint for user authentication"
# Generate with specific model
aurelis generate --model codestral-2501 "Binary search algorithm"
# Generate TypeScript code
aurelis generate --language typescript "React component for file upload"
# Save to file
aurelis generate --output auth.py "JWT token validation function"
# Interactive mode
aurelis generate --interactive "REST API for todo management"
Sample Output:
# Generated by Aurelis (Codestral-2501)
from fastapi import FastAPI, HTTPException, Depends
from fastapi.security import HTTPBearer
import jwt
app = FastAPI()
security = HTTPBearer()
@app.post("/auth/login")
async def authenticate_user(credentials: UserCredentials):
"""Authenticate user and return JWT token."""
# Implementation here...
aurelis explain
Explain code functionality and provide detailed analysis.
aurelis explain [OPTIONS] CODE_OR_FILE
Options:
--model MODEL
- Model for explanation--level LEVEL
- Explanation level: basic|detailed|expert
--focus ASPECT
- Focus on: algorithm|performance|security|patterns
--format FORMAT
- Output format: text|markdown|html
Examples:
# Explain code snippet
aurelis explain "def fibonacci(n): return n if n <= 1 else fibonacci(n-1) + fibonacci(n-2)"
# Explain file
aurelis explain complex_algorithm.py
# Detailed explanation
aurelis explain --level detailed --focus algorithm sort.py
# Focus on performance
aurelis explain --focus performance database.py
aurelis fix
Automatically fix code issues and apply improvements.
aurelis fix [OPTIONS] PATH [PATH...]
Options:
--model MODEL
- Model for fix suggestions--type TYPE
- Fix type: security|performance|style|bugs|all
--apply
- Apply fixes automatically (with confirmation)--backup
- Create backup before applying fixes--dry-run
- Show fixes without applyingExamples:
# Show fix suggestions
aurelis fix script.py
# Apply security fixes with backup
aurelis fix --type security --apply --backup app.py
# Dry run for all fixes
aurelis fix --dry-run --type all module.py
aurelis refactor
Refactor and optimize code for better maintainability.
aurelis refactor [OPTIONS] PATH [PATH...]
Options:
--model MODEL
- Model for refactoring--goal GOAL
- Refactoring goal: performance|readability|modularity|patterns
--aggressive
- Enable aggressive refactoring--preserve-behavior
- Ensure behavior preservation--output DIR
- Output refactored code to directoryExamples:
# Basic refactoring
aurelis refactor legacy_code.py
# Performance-focused refactoring
aurelis refactor --goal performance slow_function.py
# Aggressive refactoring with output
aurelis refactor --aggressive --output refactored/ old_module.py
aurelis docs
Generate comprehensive documentation for code.
aurelis docs [OPTIONS] PATH [PATH...]
Options:
--model MODEL
- Model for documentation--format FORMAT
- Output format: markdown|rst|html|docstring
--include SECTIONS
- Include: api|examples|usage|architecture
--output PATH
- Output documentation file/directory--template TEMPLATE
- Documentation templateExamples:
# Generate markdown docs
aurelis docs --format markdown api.py
# Comprehensive documentation
aurelis docs --include api,examples,usage --output docs/ src/
# Update docstrings in-place
aurelis docs --format docstring module.py
aurelis test
Generate test cases and test suites for code.
aurelis test [OPTIONS] PATH [PATH...]
Options:
--model MODEL
- Model for test generation--framework FRAMEWORK
- Test framework: pytest|unittest|doctest
--coverage TARGET
- Target coverage percentage--type TYPE
- Test type: unit|integration|performance|security
--output PATH
- Output test fileExamples:
# Generate pytest tests
aurelis test --framework pytest calculator.py
# High coverage unit tests
aurelis test --type unit --coverage 95 core.py
# Security tests
aurelis test --type security auth.py
aurelis shell
Start interactive Aurelis shell for advanced workflows.
aurelis shell [OPTIONS]
Options:
--config PATH
- Configuration file--history
- Load command history--session SESSION
- Load saved sessionExamples:
# Start interactive shell
aurelis shell
# Load specific session
aurelis shell --session my_project
# Start with history
aurelis shell --history
Shell Commands:
# Model management
models # List available models
health # Check model connectivity
switch <model> # Switch active model
# Code operations
analyze <file> # Analyze code
generate <desc> # Generate code
explain <code> # Explain code
fix <file> # Fix issues
refactor <file> # Refactor code
# Documentation
docs <file> # Generate documentation
test <file> # Generate tests
# Session management
session save <name> # Save current session
session load <name> # Load session
session list # List saved sessions
history # Show command history
clear # Clear screen
# Utilities
help # Show help
exit # Exit shell
aurelis validate
Validate code syntax, style, and best practices.
aurelis validate [OPTIONS] PATH [PATH...]
Options:
--strict
- Enable strict validation--rules RULES
- Validation rules file--exclude PATTERN
- Exclude files/rulesaurelis optimize
Optimize code for performance and efficiency.
aurelis optimize [OPTIONS] PATH [PATH...]
Options:
--target TARGET
- Optimization target: speed|memory|size
--profile
- Include performance profilingaurelis security
Perform security analysis and vulnerability detection.
aurelis security [OPTIONS] PATH [PATH...]
Options:
--severity LEVEL
- Minimum severity: low|medium|high|critical
--report FORMAT
- Security report formatAurelis looks for configuration in these locations (in order):
--config
command line optionAURELIS_CONFIG
environment variable.aurelis.yaml
in current directory~/.aurelis/config.yaml
in home directory# GitHub Models Configuration
github_token: "${GITHUB_TOKEN}"
models:
primary: "codestral-2501"
fallback: "gpt-4o-mini"
preferences:
code_generation: "codestral-2501"
documentation: "cohere-command-r"
reasoning: "gpt-4o"
analysis:
max_file_size: "1MB"
chunk_size: 3500
overlap_ratio: 0.15
exclude_patterns:
- "*.pyc"
- "__pycache__/"
- ".git/"
processing:
max_retries: 3
timeout: 60
concurrent_requests: 5
security:
audit_logging: true
secure_token_storage: true
cache:
enabled: true
ttl: 3600
max_size: 1000
GITHUB_TOKEN
- GitHub authentication tokenAURELIS_CONFIG
- Path to configuration fileAURELIS_LOG_LEVEL
- Logging level (DEBUG, INFO, WARNING, ERROR)AURELIS_CACHE_DIR
- Cache directory pathCode | Meaning |
---|---|
0 | Success |
1 | General error |
2 | Configuration error |
3 | Authentication error |
4 | Network error |
5 | File not found |
6 | Invalid input |
7 | Model error |
8 | Timeout error |
# 1. Setup
aurelis init
export GITHUB_TOKEN="your_token"
# 2. Analyze project
aurelis analyze --recursive --type all src/
# 3. Fix critical issues
aurelis fix --type security --apply src/
# 4. Generate documentation
aurelis docs --format markdown --output docs/ src/
# 5. Create tests
aurelis test --framework pytest --coverage 90 src/
# 6. Interactive refinement
aurelis shell
> load session project_review
> analyze complex_module.py
> refactor --goal performance slow_function.py
> generate "async version of process_data function"
> session save project_review_complete
#!/bin/bash
# Aurelis CI pipeline
# Validate code quality
aurelis validate --strict src/ || exit 1
# Security check
aurelis security --severity medium src/ || exit 1
# Generate documentation
aurelis docs --format markdown --output docs/ src/
# Update tests if needed
aurelis test --framework pytest --coverage 85 src/
Need Help?
# Command help
aurelis COMMAND --help
# General help
aurelis --help
# Interactive help
aurelis shell
> help
Master the CLI to unlock Aurelisβs full potential! π