CMD on Autopilot:

CMD on Autopilot:

About:

If you often forget command line commands, then this might interest you.

Presenting CMD on autopilot. Perform tasks in the command line just by using simple English text. The program targets the Git Bash command line to convert natural language into Git Bash commands. Utilizing the power of the Gemini API and caching, it boosts your productivity.

Learn Git Bash commands along with automation. It saves your command line history, which persists even after the program has exited, so you can revisit them in the future.

The caching technique helps you reduce the load on the Gemini API for similar commands, thereby saving resources and time.

GitHub:

GitHub repo for reference.

How to run the program:

  • Clone the file to your local system using git clone.

  • Install Python and other dependencies using pip install -q -U google-generativeai.

  • Generate your API key from Gemini.

  • Run python gemini.py to start the program.

Additional Commands:

Use exit to terminate the program.

Use history to view command line history.

Demo:

Features:

  • Uses caching if the command is already generated.

  • History to view all previous commands.

  • Lightweight Python file.

License:

The codebase is open-sourced under the MIT license. All contributions are welcome. Raise PRs for existing bugs or new functionality.

Part of Hashnode's AI for Tomorrow Hackathon.