# Story 3.4: Service Management CLI Tool ## Metadata - **Story ID**: 3.4 - **Title**: Service Management CLI Tool - **Epic**: 3 - Module Framework (Feature Services) - **Status**: Pending - **Priority**: Medium - **Estimated Time**: 4-5 hours - **Dependencies**: 3.1, 3.3 ## Goal Provide CLI tooling for managing feature services, validating dependencies, and testing service registration with Consul. ## Description This story creates a CLI tool that allows developers and operators to manage feature services, validate service dependencies, test service registration, and inspect service information via Consul. ## Deliverables ### 1. CLI Tool (`cmd/platformctl/main.go`) - `platformctl services list` - List all services registered in Consul - `platformctl services validate` - Validate service dependencies - `platformctl services test ` - Test service registration and health - `platformctl services info ` - Show service details from Consul - `platformctl services dependencies ` - Show service dependencies - `platformctl services health ` - Check service health - Command-line argument parsing - Error handling and user-friendly output ### 2. Makefile Integration - `make install-cli` - Install CLI tool - `make cli` - Build CLI tool - `make cli-test` - Test CLI tool ## Implementation Steps 1. **Create CLI Tool** - Create `cmd/platformctl/main.go` - Use cobra for CLI framework - Implement commands 2. **Implement Commands** - List command - Validate command - Test command - Info command 3. **Add to Makefile** - Add build commands - Add install commands ## Acceptance Criteria - [x] CLI tool lists all services from Consul - [x] Service dependency validation works - [x] Service health checking works - [x] CLI is installable and usable - [x] Commands provide helpful output - [x] Error messages are clear - [x] Integration with Consul service registry works ## Files to Create/Modify - `cmd/platformctl/main.go` - CLI tool - `Makefile` - Add CLI commands