Merged
Conversation
- Add real sample outputs from full-stack environment to all command docs - Update validate.md with full-featured environment validation output - Update create.md with full-stack environment creation output - Update provision.md with connection details and DNS warning - Update configure.md with actual timing (38.2s) - Update release.md with successful release output - Update run.md with full service URLs (UDP/HTTP/HTTPS trackers, API, health, Grafana) - Update test.md with realistic HTTPS failure scenario - Update show.md with complete Running state (text and JSON outputs) - Update destroy.md with infrastructure teardown output - Update purge.md with successful purge output All examples now show real command execution with actual timings, IPs, and service URLs from a full-stack deployment with MySQL, multiple trackers, HTTPS (Caddy), Prometheus, Grafana, and backups.
Member
Author
|
ACK 181db29 |
This was referenced Feb 17, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Implements JSON output format for the
listcommand, completing Phase 1 of EPIC #348 (JSON Output for High-Value Commands).Closes: #359
Part of: #348 - Add JSON output format support
Changes
1. JSON Output Implementation
JsonViewinsrc/presentation/views/commands/list/views/json_view.rsEnvironmentListto pretty-printed JSON2. DTO Serialization Support
src/application/command_handlers/list/info.rs#[derive(Serialize)]toEnvironmentSummaryandEnvironmentList3. Controller Updates
src/presentation/controllers/list/handler.rsexecute()to acceptOutputFormatparameterdisplay_results()(TextView or JsonView)4. Router Integration
src/presentation/dispatch/router.rsoutput_formatfromExecutionContextListCommandController5. Module Structure
src/presentation/views/commands/list/mod.rsTextViewandJsonView6. Text View Enhancement
src/presentation/views/commands/list/views/text_view.rsUsage
Text Output (Default)
torrust-tracker-deployer list # or explicitly: torrust-tracker-deployer list --output-format textJSON Output
JSON Schema Example
{ "environments": [ { "name": "production-high-availability-tracker", "state": "Running", "provider": "Hetzner Cloud", "created_at": "2026-02-14T16:45:00Z" } ], "total_count": 1, "failed_environments": [], "data_directory": "/path/to/data" }Benefits
jqor programming languagesAutomation Examples
Testing
Architecture
Follows the established Strategy Pattern from previous JSON output implementations:
This completes Phase 1 of the JSON output support epic.