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.4.tar.gz (7.8 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.4-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cmdgen_ai_cli-0.1.4.tar.gz
  • Upload date:
  • Size: 7.8 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.4.tar.gz
Algorithm Hash digest
SHA256 6b2f04f2f22eedeada8fd398c0d9b2f77314e66be7808f02a11bfa8381e472f1
MD5 447a631de06faef725428e5583b6f353
BLAKE2b-256 5be9f13adb046c9fbe2b35d235562633f8db6066ca741ef35cb2c2f4250c8979

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cmdgen_ai_cli-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 10.1 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 8ef98f7eb03068ddff2aafbe8d98c8ddea2c0a99c81d35e250a88b63aa9450e0
MD5 6dfe1bd8024ef85e66cceac1d7d6a247
BLAKE2b-256 34bea6f80b4b5c52000564ecd2611e200919bf5fc7aedc3ff0f0317b52bbb004

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