Skip to main content

AI-powered CLI tool to translate natural language into terminal commands

Project description

cmdgen 🪄

An AI-powered CLI tool that translates your natural language into native terminal commands and lets you review them before execution. Powered by Google's Gemini API.

Features

  • Natural Language to CLI: Just type what you want to do.
  • Context-Aware: Knows your OS (Windows/Linux/macOS), Shell, and Working Directory for perfect commands.
  • Interactive Execution: Uses prompt_toolkit to let you tweak the AI's generated command before running it.
  • Safety First: Warns you with bold yellow text if the command looks destructive (e.g., rm, del, format).
  • Auto-Updater: Silently checks for updates so you're always running the best version.

Installation

The recommended way to install Python CLI tools globally is using pipx:

pipx install cmdgen-ai-cli

(Alternatively, you can pip install cmdgen-ai-cli in a virtual environment or cmd run as administrator)

Upgrade

Run in a virtual environment or cmd (run as administrator)

pip install --upgrade cmdgen-ai-cli

Quick Start

  1. Get an API Key: Get a free Gemini API key from Google AI Studio.
  2. Configure your Key:
    cg config set --provider gemini --api-key "YOUR_API_KEY"
    
  3. Use the Tool:
    cg find all python files larger than 10MB in the current directory
    

You will see an explanation of the command, and an interactive prompt where you can edit it or just press Enter to run it!

Configuration

View your current configuration (safely masked):

cg config view

Contributing

  1. Clone the repository
  2. Install dependencies: pip install -e .[dev]
  3. Run tests: pytest

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cmdgen_ai_cli-0.1.3.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cmdgen_ai_cli-0.1.3-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file cmdgen_ai_cli-0.1.3.tar.gz.

File metadata

  • Download URL: cmdgen_ai_cli-0.1.3.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for cmdgen_ai_cli-0.1.3.tar.gz
Algorithm Hash digest
SHA256 25de7e10331958dd412940f26d7fa2cca04a2326416959e06220d7196644bb69
MD5 dc3cb1ddb7732ef63507ee2512e72692
BLAKE2b-256 3a88259afea4ce6e1efeb81f505274ed955f02b10594668bded74a363f4d4a74

See more details on using hashes here.

File details

Details for the file cmdgen_ai_cli-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: cmdgen_ai_cli-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for cmdgen_ai_cli-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a2bcfc98a5e1ba75e07cbfb507de34d4f06ce5077f25aa67417d913673f1eb90
MD5 b57c2c8c69bc98f8e31a6bb988ce1142
BLAKE2b-256 c7a85ffbe969006ecc51b56cdef0ca07e6922a472b4d2971b4b72a6d361fbbdd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page