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)

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: cmdgen_ai_cli-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 5ab505175647ca65fece5f84530c7c231f5579650020feb17eb2dd73774164e3
MD5 a19f3650b72009e5efd15aa5f178d1c2
BLAKE2b-256 fa82edf12ed1a529759d4471b844cbc82cfacb599d688f35274d64c04e9c8ccf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cmdgen_ai_cli-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 33f77fcd8dcfae21c388ba0e764316e96ae09f1c89c6124f0b242b581d85a417
MD5 4161a73f72850ee61d00e7c460210391
BLAKE2b-256 337d98dc14b02af4cd0c18ae6f024f0d21e60c2241c9e1090ab5d0d4f2b10a28

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