Skip to content

CLI: add --json output to nora workspaces list #252

Description

@JustinaChano04

Area: cli/ · Difficulty: trivial

Problem

nora doctor already supports --json, and there is an open issue to add --json to the agents/monitoring commands, but nora workspaces list still only renders the table view. That makes scripting workspace discovery awkward even though the underlying command already receives raw JSON from GET /api/workspaces.

Scope

Add an optional --json flag to list() in cli/src/commands/workspaces.js. When the flag is set, print the raw JSON payload and skip table rendering. Mirror the same flag-reading pattern used in cli/src/commands/doctor.js. Update cli/README.md so the workspace command docs mention the new machine-readable output.

Acceptance

  • nora workspaces list --json emits valid JSON.
  • nora workspaces list without the flag remains unchanged.
  • cli/README.md documents the flag.

Why this is a good first issue

Very small CLI enhancement, existing doctor pattern to copy, and a crisp done-state with low code risk.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions