mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-22 19:14:33 -07:00
Structured JSON Output (#8119)
This commit is contained in:
@@ -191,10 +191,19 @@ gemini -m gemini-2.5-flash
|
||||
|
||||
#### Non-interactive mode for scripts
|
||||
|
||||
Get a simple text response:
|
||||
|
||||
```bash
|
||||
gemini -p "Explain the architecture of this codebase"
|
||||
```
|
||||
|
||||
For more advanced scripting, including how to parse JSON and handle errors, use
|
||||
the `--output-format json` flag to get structured output:
|
||||
|
||||
```bash
|
||||
gemini -p "Explain the architecture of this codebase" --output-format json
|
||||
```
|
||||
|
||||
### Quick Examples
|
||||
|
||||
#### Start a new project
|
||||
|
||||
Reference in New Issue
Block a user