🤖 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

@@ -24,7 +24,13 @@ A Go project demonstrating idiomatic package structure, CLI implementation, and
git clone https://github.com/yourusername/DanceLessonsCoach.git
cd DanceLessonsCoach
# Build and run
# Build all binaries
./scripts/build.sh
# Use the new Cobra CLI
./bin/dance-lessons-coach --help
# Or use the legacy greet CLI
go run ./cmd/greet
```
@@ -54,7 +60,23 @@ export DLC_LOGGING_JSON=true
## Usage
### CLI
### New Cobra CLI (Recommended)
```bash
# Show help
./bin/dance-lessons-coach --help
# Show version
./bin/dance-lessons-coach version
# Greet someone
./bin/dance-lessons-coach greet John
# Start server
./bin/dance-lessons-coach server
```
### Legacy CLI (Deprecated)
```bash
# Default greeting