openwork icon indicating copy to clipboard operation
openwork copied to clipboard

[Feature]: Add template list --json CLI flag for machine-readable output

Open fuleinist opened this issue 7 months ago • 1 comments

Summary

Add a --json flag to the template list CLI command for machine-readable output.

Problem / goal

Scripts, CI pipelines, and external tooling need machine-parseable output from CLI commands. Currently template list only prints human-readable table output, making it hard to use in automation workflows.

Primary user(s)

  • Bob (IT / power user) — scripts and CI integrations
  • Other team roles — programmatic access to template data

OpenCode primitive alignment

This maps to CLI output formatting. The pattern exists in standard CLI tools (jq-friendly output). No new OpenCode primitive needed.

Alignment with VISION/PRINCIPLES/PRODUCT

Supports the "Auditable" pillar — structured data output enables logging and audit trails.

Testability

openwork template list --json → outputs JSON array of templates. Can be piped to jq, stored to file, or used in shell scripts.

Ready to build it yourself?

No — happy to test a PR.

fuleinist avatar Apr 29 '26 14:04 fuleinist

duplicate of #1588

src-opn avatar Apr 29 '26 16:04 src-opn