Skip to content

docs: document missing CLI flags - #29013

Open
harshil-mistry wants to merge 2 commits into
google-gemini:mainfrom
harshil-mistry:docs-missing-cli-flags
Open

docs: document missing CLI flags#29013
harshil-mistry wants to merge 2 commits into
google-gemini:mainfrom
harshil-mistry:docs-missing-cli-flags

Conversation

@harshil-mistry

Copy link
Copy Markdown

Summary

Adds six flags to the CLI reference table that are registered in config.ts but weren't documented: --policy, --admin-policy, --session-id, --session-file, --raw-output and --accept-raw-output-risk.

Details

All six are registered with .option(...) in packages/cli/src/config/config.ts and none carry hidden: true, so they already show up in gemini --help — the reference table was just behind.

The pair I'd draw attention to is --raw-output / --accept-raw-output-risk. --raw-output disables sanitization of model output, and its own description in the source warns "This can be a security risk if the model output is untrusted"; --accept-raw-output-risk exists solely to suppress that warning. I carried the warning into the table rather than describing the flag neutrally, since a reader deciding whether to use it needs that context.

--policy and --admin-policy matter because the table already links to the Policy Engine from the --allowed-tools row but never mentioned the flags that load policy files.

Descriptions are taken from the description fields in config.ts rather than written from scratch, lightly edited for the table (spelling out "for example", and using the table's existing bold-warning style). Rows are placed next to related flags: policy flags after --allowed-tools, session flags after --delete-session, output flags after --output-format. The diff is additive only — no existing row or the column alignment is touched.

Related Issues

Fixes #29012

How to Validate

Docs-only, verified by comparison:

  1. Parsed every .option('<name>', { ... }) registration out of packages/cli/src/config/config.ts (they span multiple lines, so a plain grep misses some) and diffed the names against the flags in the reference table. That produced exactly these six, plus --acp, which I've handled separately.
  2. Confirmed none of the six are hidden — only fake-responses, fake-responses-non-strict and record-responses set hidden: true — so all six really do appear in help output.
  3. Checked each one's type in the source matches the type column I wrote.
  4. Re-ran the comparison after the edit; the only remaining undocumented flags are the three hidden test ones, which shouldn't be documented.

A reviewer can confirm with gemini --help.

Pre-Merge Checklist

  • Updated relevant documentation and README (if needed)
  • Added/updated tests (if needed) — n/a, no code changed
  • Noted breaking changes (if any) — none
  • Validated on required platforms/methods:
    • MacOS
      • npm run
      • npx
      • Docker
      • Podman
      • Seatbelt
    • Windows
      • npm run
      • npx
      • Docker
    • Linux

Platform matrix intentionally unchecked rather than ticked without being exercised — single .md table, no code path. npm run preflight not run for the same reason; happy to if you'd like it recorded.

Note: this edits the same file as #29011 (ACP flag rows) but different rows, so whichever lands second may need a trivial rebase. Happy to combine them if you'd prefer one PR.

@harshil-mistry
harshil-mistry requested review from a team as code owners August 24, 2026 12:21
@google-cla

google-cla Bot commented Aug 24, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request improves the CLI documentation by surfacing six configuration flags that were previously missing from the reference table. The changes ensure that users have a complete view of available options, including security-sensitive flags, without requiring them to rely solely on the command-line help output.

Highlights

  • Documentation Update: Added six previously undocumented CLI flags to the reference table in docs/cli/cli-reference.md.
  • Flag Categorization: Organized the new flags (--policy, --admin-policy, --session-id, --session-file, --raw-output, and --accept-raw-output-risk) into logical groupings alongside related existing flags.
  • Security Transparency: Included explicit security warnings for the --raw-output flag to ensure users are aware of potential risks when disabling model output sanitization.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@github-actions github-actions Bot added the size/xs An extra small PR label Aug 24, 2026
@github-actions

Copy link
Copy Markdown

📊 PR Size: size/XS

  • Lines changed: 6
  • Additions: +6
  • Deletions: -0
  • Files changed: 1

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the CLI reference documentation (docs/cli/cli-reference.md) to document several new command-line options, including --policy, --admin-policy, --session-id, --session-file, --raw-output, and --accept-raw-output-risk. There are no review comments, and I have no feedback to provide.

Note: Security Review has been skipped due to the limited scope of the PR.

@gemini-cli gemini-cli Bot added the area/documentation Gemini CLI documentation tasks and issues label Aug 24, 2026
@harshil-mistry

Copy link
Copy Markdown
Author

@googlebot I signed it!

Empty commit; no file changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/documentation Gemini CLI documentation tasks and issues size/xs An extra small PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs: six CLI flags missing from the reference table

1 participant