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)

Upgrade

pipx 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.2.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.2-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cmdgen_ai_cli-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 b6533ad9865f04c0a927b4e7d14f81cd79a74830d341b3aa6de214ab99ea8c87
MD5 0eace54388603a457cf17b22b17ef377
BLAKE2b-256 97505531f27f2d9fad540eee2102264828dbff0ae8c4c7b7ccd8ebe6441bdbc1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cmdgen_ai_cli-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7385322b0c5f20693fc6c59b5e28edb3a65d772daf9c6e2a8dbf92bc4ec9feef
MD5 90de017f81f3ed78302aca2d9c9070e5
BLAKE2b-256 24dcc07b1c594ba2814d4adc5d3e99001dff2916b7aeea9ca999a778d8b3dd23

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