🤖 feat: implement Cobra CLI with subcommands

- Add new CLI structure in cmd/cli/
- Implement version, server, and greet commands
- Update build script to compile new CLI binary
- Add Cobra dependency to go.mod
- Update ADR 0015 to reflect implementation status
- Update README and AGENTS.md with CLI usage
- Maintain backward compatibility with existing binaries

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
2026-04-05 11:33:13 +02:00
parent a5344d6ed8
commit 4d0c3a748e
7 changed files with 189 additions and 15 deletions

View File

@@ -134,14 +134,47 @@ DanceLessonsCoach/
└── .gitignore # Ignore patterns
```
## 🚀 Server Management
## 🎮 CLI Management
### New Cobra CLI (Recommended)
DanceLessonsCoach now includes a modern CLI built with Cobra framework:
```bash
# Show help and available commands
./bin/dance-lessons-coach --help
# Show version information
./bin/dance-lessons-coach version
# Greet someone by name
./bin/dance-lessons-coach greet John
# Start the server
./bin/dance-lessons-coach server
```
**Available Commands:**
- `version` - Print version information
- `server` - Start the DanceLessonsCoach server
- `greet [name]` - Greet someone by name
- `help` - Built-in help system
- `completion` - Generate shell completion scripts
**Server Command Flags:**
- `--config` - Config file path
- `--env` - Environment (dev, staging, prod)
- `--debug` - Enable debug logging
### Version Information
The server provides runtime version information:
```bash
# Check version
# Check version using new CLI
./bin/dance-lessons-coach version
# Check version using server binary
./bin/server --version
# Output: