gemini -p 'Refactor this' < main.py > refactored.py

Category: Gemini CLI

gemini -p 'Refactor this' < main.py > refactored.py

Pipe source code in, redirect refactored output to a file

Pipes Python source code into Gemini and redirects the refactored output to a new file.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.