How getsavvyinc/savvy-cli works
Main Components
a) Core CLI Application
• Command Handler (cmd/ directory)
• Shell Integration Layer (shell/ directory)
• Configuration Management (config/ directory)
• Storage System (storage/ directory)
b) External Services Integration
• LLM Service Integration (llm/ directory)
• Authentication System (authz/ directory)
• API Client (client/ directory)
c) Workflow Management
• Recording System
• Sync Mechanism
• Local Storage
• Parameter Management (param/ directory)
Component Relationships
┌─────────────────────────────────────────────────────────────┐
• Savvy CLI System │
• ┌──────────────┐ ┌───────────────┐ │
• Shell Layer │◄─────►│ Command Hub │ │
• ┘ └───────┬───────┘ │
• ▲ │ │
• ▼ │
• ┌──────┴───────┐ ┌───────────────┐ ┌─────────┐ │
• Terminal │ │ Core Logic │◄──►│ Storage │ │
• ┘ └───────┬───────┘ └─────────┘ │
• ┬───────┴────────────────────────┘
• ▼
• ┌─────────────────────┐
• External Services │
• LLM API │
• Auth Service │
• Sync Service │
• ┘
Important Details to Highlight
a) Command Processing Flow:
• How commands flow from user input through the shell layer
• Command expansion and parameter substitution
• Workflow recording mechanism
b) Authentication Flow:
• Login process
• How authentication is maintained
• Token management
c) Workflow Sync:
• Bi-directional sync mechanism
• Local cache storage
• Offline capability
Key Technical Elements
• Shell Integration: Highlight support for bash, zsh, and fish
• LLM Integration: Show AI-powered workflow generation
• Local/Remote Storage: Display hybrid storage architecture
• Parameter System: Show parameter management flow