merlin analyze

Enterprise code analysis with quality metrics, concurrent processing, intelligent caching, and file watching for continuous code quality.

Basic Usage

# Analyze current directory
merlin analyze .

# Analyze with quality metrics
merlin analyze . --show-metrics

# Analyze with specific tools
merlin analyze . --tools pylint --tools ruff --tools bandit

Quick Tip

For continuous development, use merlin analyze watch .. This provides real-time file watching with automatic re-analysis for maximum productivity.

Analysis Components

Code Quality

  • Pylint/Ruff analysis
  • Complexity metrics
  • Code style checking
  • Import organization

Security & Type Safety

  • Bandit security scanning
  • MyPy type checking
  • Dependency analysis
  • Vulnerability detection

Performance

  • Concurrent processing
  • Intelligent caching
  • File watching
  • Quality metrics

Advanced Options

--tools

Specify analysis tools to use (can be used multiple times)

$ merlin analyze . --tools pylint --tools ruff --tools bandit
--show-metrics

Include detailed quality metrics in output

$ merlin analyze . --show-metrics --format summary
--concurrent

Enable/disable concurrent processing (enabled by default)

$ merlin analyze . --no-concurrent
--cache

Enable/disable intelligent caching (enabled by default)

$ merlin analyze . --no-cache
--format

Output format (rich, text, json, summary)

$ merlin analyze . --format json --show-metrics
--config

Use custom configuration file

$ merlin analyze . --config .merlin.yml
--severity

Minimum severity level to report

$ merlin analyze . --severity high

Output Formats

summary

Concise overview with key metrics

Best for: Quick quality assessment

detailed

Comprehensive analysis with all findings

Best for: In-depth code review

json

Machine-readable structured data

Best for: CI/CD integration and automation

html

Interactive web report with metrics

Best for: Team sharing and documentation

Example Analysis Output

🔍 Merlin v0.1.0 - Enterprise Code Analysis Engine
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📁 PROJECT DISCOVERY
Language: TypeScript/JavaScript (Next.js 14.2.0)
Files discovered: 247 • Size: 2.4MB • Dependencies: 89
🔒 SECURITY ANALYSIS
✓ No hardcoded secrets detected
✓ Dependencies: 0 critical vulnerabilities
⚡ PERFORMANCE METRICS
Bundle size: 175KB (First Load) • Tree shaking: 94%
🤖 CLAUDE AI INSIGHTS
+ Excellent component composition patterns
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 OVERALL SCORE: 94/100 🏆
✨ PRODUCTION READY • Deploy with confidence

Related Commands

Explore other Merlin CLI commands for specialized analysis tasks.