rustf-cli-1.0.0 is not a library.
RustF CLI - AI-Friendly RustF Framework Analysis Tool
A comprehensive command-line tool designed specifically for AI coding agents to analyze, understand, and interact with RustF framework projects. Features include AST-based code analysis, real-time file watching, and Model Context Protocol (MCP) server integration.
🚀 Quick Start
# Install from source
# Analyze a RustF project
# Start MCP server for AI agent integration
# Watch files for real-time changes
📋 Features
🔍 Project Analysis
- Complete Project Scanning: Automatically discovers controllers, routes, handlers, middleware, models, and views
- AST-Based Analysis: Deep code analysis using Rust's
syncrate for accurate parsing - Route Tree Generation: Builds comprehensive routing tables with conflict detection
- Handler Analysis: Analyzes function signatures, Context API usage, and complexity metrics
- View Template Analysis: Parses HTML templates, detects security issues, extracts variables
- Cross-Reference Analysis: Maps relationships between components (views ↔ controllers, routes ↔ handlers)
🔄 Real-Time Monitoring
- File Watcher: Monitors source files, templates, and configuration changes
- Component Impact Analysis: Identifies which framework components are affected by file changes
- Event Aggregation: Summarizes changes over time windows
- Real-Time Notifications: Instant updates for connected AI agents
🤖 AI Agent Integration
- MCP Server: JSON-RPC 2.0 compliant Model Context Protocol server
- RESTful API: HTTP endpoints for project analysis and querying
- WebSocket Support: Real-time updates and bidirectional communication
- Structured Data Export: JSON, YAML, and Markdown formats optimized for AI consumption
🛠️ Installation
Prerequisites
- Rust 1.70+ with Cargo
- Git (for cloning the repository)
From Source
Development Build
📖 Usage
Command Overview
Basic Analysis
# Complete project analysis
# Quick discovery
# Route analysis with conflict detection
# Controller analysis
# Query specific components
Export and Integration
# Export to JSON for AI consumption
# Export to Markdown documentation
# Export to YAML for configuration
MCP Server Mode
# Start MCP server
# Start with file watching
# Start with WebSocket support
File Watching
# Watch for file changes
# Watch with verbose output
📦 Installation
# Clone and build
# Install globally
🎯 Use Cases
For AI Coding Assistants
- Real-time project understanding
- Route conflict detection
- Missing handler identification
- Code generation assistance
For Developers
- Project validation and linting
- Architecture analysis
- Documentation generation
- CI/CD integration
🔧 Current Status
✅ Implemented
- CLI framework with comprehensive commands
- Basic project detection and analysis
- MCP server with JSON-RPC protocol
- WebSocket support for real-time updates
- Multiple export formats (JSON, YAML, table)
- Integration tested with rustf-example project
🚧 In Development
- Advanced AST parsing for route extraction
- Route conflict detection and analysis
- Handler function signature analysis
- Middleware chain analysis
- File watching with real-time notifications
🎯 Planned Features
- GitHub Actions integration
- VSCode extension support
- Claude Desktop integration examples
- Comprehensive test suite
🤝 AI Agent Integration
This tool is the first framework-specific MCP server designed for AI agents working with RustF projects. It provides:
- Deep Framework Knowledge: Understanding of RustF conventions
- Real-time Updates: Live project analysis as code changes
- Structured Data: Machine-readable project information
- Intelligent Suggestions: Missing handlers, route conflicts, best practices
📖 Example Output
===
🔗 Integration with RustF Framework
This CLI tool is part of the RustF ecosystem:
- RustF Core: The main framework library
- RustF Macros: Auto-discovery procedural macros
- RustF Example: Reference implementation
- RustF CLI: This analysis and development tool
Perfect for AI-assisted development workflows with the RustF framework!