## Summary Add `--output-format json` support to the `register` command, as part of roadmap section 12 (Epic #348). **Roadmap task**: 12.13 **Parent Epic**: #348 ## Specification See `docs/issues/396-add-json-output-to-register-command.md` for the full spec (to be committed after issue creation). ## JSON Output Format ```json { "environment_name": "my-env", "instance_ip": "192.168.1.100", "ssh_port": 22, "registered": true } ``` | Field | Type | Description | | ------------------ | ------- | ------------------------------------------------------ | | `environment_name` | string | Name of the environment the instance was registered to | | `instance_ip` | string | IP address of the registered instance | | `ssh_port` | integer | SSH port used for the instance (default 22) | | `registered` | boolean | Always `true` when the command exits successfully | ## Implementation Notes - `RegisterCommandController::execute()` returns `Environment<Provisioned>` — the DTO is built from this rich result - DTO: `RegisterDetailsData { environment_name, instance_ip, ssh_port, registered }` - Named constructor: `from_environment(env: &Environment<Provisioned>)` - Strategy Pattern — same as all prior commands in this epic - `complete_workflow()` needs updating to receive `&Environment<Provisioned>` alongside `output_format` ## Acceptance Criteria - [ ] `cargo run -- register my-env 192.168.1.100 --output-format json 2>/dev/null` produces valid JSON - [ ] Text mode output is unchanged - [ ] All existing tests pass - [ ] `cargo run --bin linter all` passes
Activity
docs: add spec and roadmap link for issue #396
feat: add JSON output to `register` command (#396)
docs: mark roadmap 12.14 completed and remove closed issue docs