Structured JSON Output (#8119)

This commit is contained in:
Jerop Kipruto
2025-09-11 05:19:47 +09:00
committed by GitHub
parent db99fc70b6
commit 514767c88b
20 changed files with 1526 additions and 23 deletions
+9
View File
@@ -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