#23522: feat(cli): add --quiet flag and OPENCLAW_NO_TAGLINE env var (#22635)
cli
size: S
Cluster:
System Prompt Enhancements
Fixes #22635
## Problem
Every CLI command outputs a random tagline after the version string. No way to suppress it for scripts, cron jobs, or piped output.
## Fix
**4 files, 136 insertions:**
1. **`src/cli/argv.ts`** — Added `"--quiet"` to `ROOT_BOOLEAN_FLAGS` so the `-v` version alias parser correctly skips it as a known root flag.
2. **`src/cli/banner.ts`** — Added `isQuietTagline()` helper that checks three sources (in priority order):
- Explicit `quiet` option on `BannerOptions`
- `OPENCLAW_NO_TAGLINE` env var (truthy)
- `--quiet` or `-q` in argv
When quiet, `formatCliBannerLine()` returns just the version line (`🦞 OpenClaw 1.0.0 (commit)`) without the `— random tagline` suffix.
3. **`src/cli/program/help.ts`** — Registered `-q, --quiet` as a global CLI option with description "Suppress the startup tagline".
4. **`src/cli/banner.test.ts`** (new) — 6 tests covering: default tagline present, `quiet: true` option, `--quiet` flag, `-q` flag, `OPENCLAW_NO_TAGLINE` env, and rich-mode quiet.
All 41 existing tests pass.
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
Adds `--quiet` / `-q` flag and `OPENCLAW_NO_TAGLINE` env var to suppress the random startup tagline. The implementation uses a three-tier priority system: explicit `quiet` option → `OPENCLAW_NO_TAGLINE` env var → `--quiet`/`-q` argv flags. When quiet mode is active, the banner displays only the version and commit (`🦞 OpenClaw 1.0.0 (commit)`) without the tagline suffix.
- **`src/cli/argv.ts`**: Added `--quiet` to `ROOT_BOOLEAN_FLAGS` for proper root version alias parsing
- **`src/cli/banner.ts`**: Implemented `isQuietTagline()` helper with priority-based detection and early return in `formatCliBannerLine()`
- **`src/cli/program/help.ts`**: Registered `-q, --quiet` global option
- **`src/cli/banner.test.ts`**: Added 6 test cases covering default behavior and all three quiet modes
All tests pass. Clean implementation following existing patterns.
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge with no issues found
- Clean implementation with comprehensive test coverage, follows existing patterns, and addresses the stated problem directly. The three-tier priority system is well-designed, backward compatible, and integrates seamlessly with existing banner logic
- No files require special attention
<sub>Last reviewed commit: 897d4e3</sub>
<!-- greptile_other_comments_section -->
<sub>(4/5) You can add custom instructions or style guidelines for the agent [here](https://app.greptile.com/review/github)!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#8842: feat: add sparkly new tagline
by avibrahms · 2026-02-04
77.2%
#13168: perf: short-circuit --version to skip process respawn and full modu...
by RamiNoodle733 · 2026-02-10
75.7%
#18793: (cli): remove OpenAI tagline from banner
by rodrigouroz · 2026-02-17
75.7%
#15306: fix: explicit exit after onboarding command completes
by jeroenbaas · 2026-02-13
74.1%
#22607: feat(cli): add --omit-system-prompt flag to agent --json
by sleitor · 2026-02-21
73.9%
#17770: refactor(cli): reuse shared option builders
by iyoda · 2026-02-16
73.6%
#11159: fix(cli): parse --profile flag after subcommand name
by hclsys · 2026-02-07
73.5%
#17151: fix: add npm link to fix CLI permission denied (exit 127)
by sskyu · 2026-02-15
73.3%
#17237: fix(update): guard post-install imports after npm global update
by tdjackey · 2026-02-15
72.9%
#17221: fix(agents): prevent agents from using exec for gateway management
by CornBrother0x · 2026-02-15
72.6%