Skip to content

Add JSON output to purge command (12.12) #394

Closed

Description

@josecelano

Overview

Add JSON output format support to the purge command (roadmap task 12.12). Part of Phase 2 of the JSON output epic (#348).

The purge command deletes all local data for an environment (data/<env>/, build/<env>/, and the registry entry). Since PurgeCommandHandler::execute() returns (), the JSON output is minimal: environment name + confirmation flag.

Rationale

Lists the directories and files that were removed. Provides a machine-readable record of what was cleaned up, enabling automation to verify successful purge before proceeding.

Specification

See detailed specification: docs/issues/394-add-json-output-to-purge-command.md

(File will be committed and renamed with the real issue number.)

JSON Output Format

{
  "environment_name": "my-env",
  "purged": true
}

Tasks

  • Create PurgeDetailsData view DTO
  • Implement JsonView for purge command
  • Implement TextView (preserving current complete_workflow output)
  • Add output_format: OutputFormat parameter to execute()
  • Update router to pass output_format
  • Add unit tests for both views
  • Update docs/user-guide/commands/purge.md
  • All linters pass (cargo run --bin linter all)

Related

Activity

  1. self-assigned this
    on Feb 26, 2026
  2. added 2 commits that reference this issue on Feb 27, 2026
    75dfe4d
    192b5ae
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementroadmaptask

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions