Cmd-Fixer is a Python CLI tool that helps you fix corrupted or incorrect shell commands using AI. It suggests possible corrections, lets you preview them, and optionally executes the selected command immediately.
- AI-powered shell command fixing using Gemini LLM.
- Interactive CLI with numbered command suggestions.
- Option to execute the suggested command directly.
- Stores API key and user preferences locally for seamless usage.
- Configurable maximum number of suggestions per fix.
Install the package via pip:
pip install cmdfixer-geminiBefore using Cmd-Fixer, you must set up your Gemini API key. Run the following command:
cmdfix setup- You will be prompted to enter your Gemini API key. (Get your key from https://aistudio.google.com/api-keys)
- You will also be asked to set the maximum number of suggestions per fix.
- The configuration will be saved locally, so you don’t need to enter it again.
After setup, you can use Cmd-Fixer to fix shell commands:
cmdfix fix <your-broken-command>Options:
--run: Execute the selected command immediately instead of just previewing it.
Example:
cmdfix fix mkdir new_folder --runThis will suggest corrected commands for mkdir new_folder and execute the chosen one immediately if --run is provided.
MIT License