A new console command to check whether a deployment environment exists, providing a fast, unambiguous, scriptable boolean result.
The main feature specification including:
- Overview and problem statement
- Feature goals and non-goals
- Proposed solution with exit code semantics
- Implementation details (component design, architecture)
- Edge cases analysis (corrupt files, permissions, race conditions)
- Definition of done
- Testing strategy
Clarifying questions that need to be answered before implementation:
- What constitutes "exists" (file presence vs. loadability)
- Exit code semantics and output format
- SDK integration and backward compatibility
- Permission edge cases
Current Phase: Planning
Completed:
- ✅ Create feature specification
- ✅ Create questions document
- ⏳ Answer clarifying questions
- ⏳ Update specification based on answers
- ⏳ Begin implementation
Next Steps:
- Answer remaining clarifying questions
- Refine specification with final decisions
- Implement application layer
ExistsCommandHandler - Implement presentation layer CLI controller and routing
- Add unit tests and E2E tests
- Update documentation
Add a new exists console command that checks whether a named deployment environment exists and returns a clear boolean result. The command outputs true or false to stdout and always exits 0 on success (exit 1 only for errors), following the project's standard exit code convention.
Key Points:
- Problem: No unambiguous, scriptable way to check if an environment exists from the CLI
- Solution: New
existscommand that outputstrue/falseto stdout - Exit codes: 0 = success (both
trueandfalseresults), 1 = error - Status: Planning phase
- Usage:
torrust-tracker-deployer exists <environment-name> [--format json] - Performance: Sub-millisecond — file existence check only, no JSON deserialization
- SDK parity: The SDK already has
Deployer::exists()— this brings the same capability to the CLI
- Console Commands Overview
- Command Architecture
- User Guide - Commands
- Show Command Feature — related command for displaying environment info
- Development Principles