Skip to content

Add --json flag for machine-readable output on ls and ps commands #159

Description

@djgormley

I am currently developing a downstream runner layer that needs to query Datatrail to build analysis-specific inventories. To get structured data back, I am currently importing and using the internal dtcli.src.functions API directly.

Since relying on internal modules isn't ideal for long-term stability, I would like to request adding a --json flag to the read commands (specifically datatrail ls and datatrail ps). This would allow external scripts and pipelines to safely consume the archive state via standard stdout without needing to scrape plain text or hook into internal Python methods.

Requested Behavior:
Running datatrail ls <scope> --json would suppress the standard tabular output and instead print the equivalent data structure as a JSON object to stdout.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request
No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions