Skip to content

feat(cli): Add --quiet /-q flag to goose run#2939

Merged
zanesq merged 2 commits intoblock:mainfrom
chaitanyarahalkar:quiet-flag
Jun 18, 2025
Merged

feat(cli): Add --quiet /-q flag to goose run#2939
zanesq merged 2 commits intoblock:mainfrom
chaitanyarahalkar:quiet-flag

Conversation

@chaitanyarahalkar
Copy link
Contributor

@chaitanyarahalkar chaitanyarahalkar commented Jun 16, 2025

Add --quiet /-q flag to goose run

Motivation

When running Goose in non-interactive or script environments, the CLI currently prints a banner before every response:

starting session | provider: openai model: gpt-4o
    logging to /Users/.../sessions/20250615_191939.jsonl
    working directory: /tmp/...

For pipelines that need just the model’s text, this extra output is unwanted noise.
The new --quiet flag solves this by suppressing all non-response lines.

What’s in this PR

  1. CLI

    • Adds -q, --quiet to the Run sub-command.
    • Flag is parsed by clap and passed through the command handler.
  2. Session builder

    • Introduces quiet: bool in SessionBuilderConfig (default false).
    • display_session_info() is skipped when quiet == true.
  3. Call-sites & tests

    • All SessionBuilderConfig { … } instantiations updated to include quiet.
    • Unit tests updated accordingly.
    • Bench command helper updated (quiet = false).

Example

Mode Example Output
Normal goose run -t "hi" Banner + model response
Quiet goose run -t "hi" --quiet
goose run -t "hi" -q
Only the model response

Implementation notes

  • Only the “start-session” banner (provider/model, log path, working dir) is suppressed.
  • All subsequent agent responses and streamed content remain unchanged.
  • No impact on interactive sessions or other sub-commands.

@zanesq zanesq merged commit 4e97ffa into block:main Jun 18, 2025
6 checks passed
@zanesq
Copy link
Collaborator

zanesq commented Jun 18, 2025

@chaitanyarahalkar do you mind adding this to the docs also?

lifeizhou-ap added a commit that referenced this pull request Jun 20, 2025
* main:
  Blog: Add video to container use blog (#3008)
  Use official logo in Goose web (#3012)
  fix shims for extensions on windows (#3009)
  fix powershell executions (#3006)
  Docs linux desktop (#3007)
  Platform Tool for Scheduler: Allow Goose to Manage Its Own Schedule (#2944)
  docs: container use blog and guide (#2962)
  Fix: Workflow syntax (#3002)
  Added just lint-ui for linting front end code (#2997)
  fix typo in secret name (#2994)
  feat(ui): add chain-of-thought panel above assistant messages (#2899)
  feat(cli): Add `--quiet /-q` flag to goose run (#2939)
  Feat: Recipe Library (#2946)
  Docs: Goose on Windows Installation (#2990)
  Fixes : Workflow error on issue comment (#2958)
  Add a setting for the quit confirmation dialog (#2901)
  Update bundle-desktop-windows.yml (#2988)
  feat: optional fast edit models (#2580)
  feat: Add lead-worker model selection and real-time model display in GUI (#2964)
laanak08 added a commit that referenced this pull request Jun 24, 2025
# By Max Novich (4) and others
# Via Alice Hau
* ahau/tool-strategy:
  updated computercontroller and developer descriptions
  add additional strats to test
  Blog: Add video to container use blog (#3008)
  Use official logo in Goose web (#3012)
  fix shims for extensions on windows (#3009)
  fix powershell executions (#3006)
  Docs linux desktop (#3007)
  Platform Tool for Scheduler: Allow Goose to Manage Its Own Schedule (#2944)
  docs: container use blog and guide (#2962)
  Fix: Workflow syntax (#3002)
  Added just lint-ui for linting front end code (#2997)
  fix typo in secret name (#2994)
  feat(ui): add chain-of-thought panel above assistant messages (#2899)
  feat(cli): Add `--quiet /-q` flag to goose run (#2939)
  Feat: Recipe Library (#2946)
  Docs: Goose on Windows Installation (#2990)
  Fixes : Workflow error on issue comment (#2958)
  Add a setting for the quit confirmation dialog (#2901)
  Update bundle-desktop-windows.yml (#2988)

# Conflicts:
#	Cargo.lock
btdeviant pushed a commit to btdeviant/goose that referenced this pull request Jun 25, 2025
s-soroosh pushed a commit to s-soroosh/goose that referenced this pull request Jul 18, 2025
Signed-off-by: Soroosh <soroosh.sarabadani@gmail.com>
cbruyndoncx pushed a commit to cbruyndoncx/goose that referenced this pull request Jul 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants