Skip to content

CmdFixer is an AI-powered CLI tool that fixes and completes broken or incomplete shell commands directly from the terminal — no searching required.

License

Notifications You must be signed in to change notification settings

MostafaOsmanFathi/Cmd-Fixer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Cmd-Fixer

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.


Features

  • 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.

Installation

Install the package via pip:

  pip install cmdfixer-gemini

First-Time Setup

Before 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.

Usage

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 --run

This will suggest corrected commands for mkdir new_folder and execute the chosen one immediately if --run is provided.


License

MIT License

About

CmdFixer is an AI-powered CLI tool that fixes and completes broken or incomplete shell commands directly from the terminal — no searching required.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages