Commit 21276c8
committed
feat: Migrate CLI architecture from external CLI shard to Crystal standard library
🔥 BREAKING CHANGE: Complete CLI architecture rewrite
## Major Changes
### Core Architecture
- Replace ::Cli::Supercommand with custom AmberCLI::Core::BaseCommand
- Implement AmberCLI::Core::CommandRegistry for command management
- Use Crystal's native OptionParser instead of external CLI parsing
- Remove CLI shard and shell-table dependencies from shard.yml
### Commands Migrated
- ✅ new: Create new Amber applications
- ✅ database: Database operations and migrations
- ✅ routes: Display application routes (custom table rendering)
- ✅ watch: Development server with file watching
- ✅ encrypt: Environment file encryption
- ✅ exec: Execute Crystal code in application context
- ✅ plugin: Generate application plugins
- ✅ pipelines: Show application pipelines and plugs
### Enhanced Features
- Improved error handling and user feedback
- Consistent command option parsing across all commands
- Native Crystal colorized output
- Better help system with detailed descriptions
- Integrated file watching with sentry functionality
### Testing & Quality
- Update all command specs for new architecture
- Fix YAML/JSON parsing in generator configuration
- Improve template engine with naming conventions support
- All tests passing with comprehensive coverage
### Benefits
- Zero external CLI dependencies
- Faster compilation and smaller binary size
- Clean, maintainable code structure
- Better error messages and user experience
- Foundation for future CLI enhancements
Closes major architectural debt and establishes solid foundation for Amber CLI v2.01 parent 430e7c3 commit 21276c8
25 files changed
Lines changed: 1554 additions & 1337 deletions
File tree
- spec
- cli/commands
- pipelines
- routes
- commands
- core
- src
- amber_cli
- commands
- core
- helpers
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | 38 | | |
49 | 39 | | |
50 | 40 | | |
| |||
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
0 commit comments