gemini -p 'Fix this code' --output_format json

Category: Gemini CLI

gemini -p 'Fix this code' --output_format json

Return the model response as structured JSON

Returns Gemini's response as structured JSON instead of plain text — useful for parsing in scripts.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.