Repository navigation
Description
Related:
- Roadmap Roadmap #1 - Task 5.1
- Feature Specification: docs/features/environment-status-command/
- Issue Specification: docs/issues/241-implement-environment-show-command.md
Overview
Implement a new console command show that displays environment information with state-aware details. The command provides a read-only view of stored environment data without remote verification, making it fast and reliable for users to inspect their deployment state.
Goals
- Provide console command to display environment information
- Show state-aware details (different information per state)
- Use human-friendly output formatting with UserOutput
- Handle errors gracefully with actionable messages
- Maintain fast execution (< 100ms for typical environments)
- Ensure comprehensive test coverage (unit + E2E)
Implementation Plan
Phase 1: Presentation Layer - CLI Skeleton (1-2 hours)
- Create CLI subcommand structure
- Add command dispatch
- Create initial E2E test
- Manual CLI testing
Phase 2: Application Layer Foundation (2-3 hours)
- Create ShowCommandHandler
- Create ShowCommandError enum
- Create EnvironmentInfo DTO
- Implement environment loading with error handling
- Comprehensive unit tests
Phase 3: State-Aware Information Extraction (3-4 hours)
- Implement state-specific extraction
- Add infrastructure details for Provisioned state
- Extract service configuration for Running state
- Handle all environment states
- Comprehensive unit tests
Phase 4: Output Formatting (2-3 hours)
- Implement output formatter using UserOutput
- Add state-aware formatting
- Include next-step guidance
- Visual improvements
Phase 5: Testing Strategy Analysis and Documentation (2-3 hours)
- Analyze E2E testing strategies
- Implement chosen strategy
- Add E2E tests for error scenarios
- Write user documentation
Phase 6: Add Creation Timestamp (1-2 hours)
- Add
created_atfield to Environment domain model - Update create command to populate timestamp
- Update show command to display timestamp
Phase 7: Add Service URLs to RuntimeOutputs (2-3 hours)
- Add
service_endpointsfield to RuntimeOutputs - Update run command to populate service URLs
- Update show command to read from RuntimeOutputs
Architecture
DDD Layers: Application + Presentation
Patterns: Command Handler pattern, DTO pattern
Module Paths:
src/application/commands/show/src/presentation/input/cli/subcommands/show.rs
Critical Constraints:
⚠️ All output through UserOutput - NEVER useprintln!/eprintln!- No business logic in presentation layer
- Error handling with explicit enum types (not anyhow)
- Read-only operation - no state modifications
- No remote network calls
Acceptance Criteria
✅ Pre-commit checks pass
✅ Command displays environment info for all states
✅ Shows IP, SSH details for Provisioned+ states
✅ Shows service URLs for Running state
✅ Provides next-step guidance
✅ Handles errors with clear messages
✅ All output via UserOutput (no println!)
✅ Follows DDD layer placement
✅ Unit tests with behavior-driven naming
✅ E2E tests for multiple states
✅ User documentation complete
Estimated Duration
Total: 14-22 hours (2-3 days)
Target Completion: January 2026
See full specification at docs/issues/241-implement-environment-show-command.md
Activity
docs: create issue specification for environment show command
docs: [#246] Add note about upcoming show command for getting VM IP
chore: remove closed issue documentation files
chore: remove closed issue documentation files
docs: [#241] add design decisions from Q&A session
feat: [#241] add show command CLI skeleton (Phase 1)
feat: [#241] add application layer foundation (Phase 2)
feat: [#241] add state-aware extraction and MVC view for show command
docs: [#241] add show command documentation
feat: [#241] add creation timestamp to environment and show command
feat: [#241] add service endpoints to RuntimeOutputs and show command
refactor: [#241] extract private methods from ServiceEndpoints::from_…
docs: [#241] update issue spec progress - mark phases 1-7 complete
docs: remove completed issue spec for show command (#241)