Skip to content

CLI: Add --quiet flag to suppress non-data output #162

@titouanmathis

Description

@titouanmathis

Context

Agents and scripts piping CLI output need clean data without spinners, success messages, or decorative output mixed in. Currently, human-format output includes spinners on stderr and emoji-prefixed status messages that make parsing unreliable.

Proposal

Add --quiet / -q global flag that:

  1. Suppresses spinners entirely (no progress indicators on stderr)
  2. Suppresses status messages (no ✓ Time entry created, no ✗ Error)
  3. Prints only the data to stdout (the resource payload or formatted list)
  4. Errors still go to stderr with just the message (no emoji, no hints)

Example

# Normal
$ productive time add --service 123 --time 480
✓ Time entry created
ID: 99999
Date: 2026-03-24
Duration: 8h 0m

# Quiet
$ productive time add --service 123 --time 480 --quiet
99999

# Quiet + JSON (cleanest for piping)
$ productive time add --service 123 --time 480 --quiet --format json
{"id":"99999","date":"2026-03-24","time":480}

Interaction with --format json

--format json already avoids spinners and emojis, but still wraps output in status objects ({"status": "success", ...}). With --quiet --format json, output should be just the raw resource data.

Implementation

  • Add quiet to CommandContext
  • Spinner factory returns no-op when quiet
  • OutputFormatter methods become no-ops for status/success/warning/info when quiet
  • Only output() still writes to stdout

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions