Skip to content

Add --no-header flag to tabular output commands #16

@AbdelStark

Description

@AbdelStark

Summary

Add a --no-header flag to the commands that emit tab-separated tabular output — runs list, runs search, and roster list — so their output can be piped directly into tools like awk, cut, or fzf without having to skip the first line.

Background

Several parler commands print a header row followed by data rows:

trace_id    command    status    started_at    input    stages
abc123      process    completed 2026-04-13T…  meet.mp3 5

When piping into scripts or interactive selectors like fzf, the header row is noise:

# Fragile — has to skip first line manually
parler runs list | tail -n +2 | fzf

# Clean with --no-header
parler runs list --no-header | fzf

This is a small, self-contained improvement with high usability impact.

What to implement

Add --no-header as a boolean flag to three commands in parler/cli.py:

Command Current header line
parler runs list trace_id\tcommand\tstatus\tstarted_at\tinput\tstages
parler runs search trace_id\tcommand\tstatus\tstarted_at\tinput\tstages
parler roster list name\trole\tteam\taliases\tadded_at

Example:

parler runs list --no-header
# abc123  process  completed  2026-04-13T11:00:00Z  meeting.mp3  5

parler runs list --no-header | awk '{print $1}'
# abc123
# def456

When --no-header is set, skip the click.echo("trace_id\t...") line and emit data rows only. The flag should have no effect when --json is also set (JSON output has no header to suppress).

Files to look at

File Lines to focus on
parler/cli.pylist_runs command The click.echo("trace_id\t...") line inside the command body
parler/cli.pysearch_runs command Same pattern
parler/cli.pyroster_list command Same pattern, different header
tests/unit/test_cli_commands.py TestOperationalCommands and TestRunsSearch for test patterns

Acceptance criteria

  • parler runs list --no-header omits the header row; data rows are unchanged
  • parler runs search --no-header omits the header row
  • parler roster list --no-header omits the header row
  • --no-header has no effect when combined with --json (no error, no warning)
  • --no-header is listed in --help output for each affected command
  • At least one unit test per command verifying that the header is absent with --no-header and present without it
  • ruff check and ruff format --check pass

Setting up

git clone https://github.com/AbdelStark/mistral-parler && cd mistral-parler
uv sync --locked --group dev
uv run parler runs list             # observe current header
uv run parler roster list           # observe current header
uv run pytest tests/unit/test_cli_commands.py -q   # confirm baseline

Tips for first-timers

  • Adding a flag is one decorator line: @click.option("--no-header", is_flag=True, help="Suppress the column header row.")
  • The change in each command body is a single if not no_header: guard around the click.echo("trace_id\t...") line
  • This is a great first issue if you want to understand how Click options work and get familiar with the CLI test patterns without touching any business logic
  • All three commands follow the same pattern — once you've done one, the other two are copy-paste with the column names changed

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:uxCLI, TUI, review workflow, or usability improvementsenhancementNew feature or requestgood first issueGood for newcomers

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions