Skip to main content

Cmdify - A tool to translate natural language to shell commands using LLMs

Project description

cmdify

Cmdify - A tool to translate natural language to shell commands using LLMs.

Installation

pip install cmdify

Usage

You can use cmdify (or the short alias ctr if installed):

cmdify "Remove everything under the directory foo/"
# or
ctr "Remove everything under the directory foo/"

The command will be printed to the console and copied to your clipboard.

Configuration

Set your OpenAI API key:

export OPENAI_API_KEY=sk-...

Or configure a local endpoint (e.g., vLLM, LMStudio). You can set this via the command line:

cmdify --set-config -local_endpoint=http://127.0.0.1:1234/v1 -model=openai/qwen3-30b-a3b

To see all available configuration options, run:

cmdify --set-config -h

Common options:

  • local_endpoint: URL for your local LLM server.
  • model: Model name to use.
  • command_history: Number of recent shell commands to include in context (default: 3).
  • prefer-local: If set to true, forces use of the local endpoint even if OPENAI_API_KEY is set.

Example of setting command history size:

cmdify --set-config -command_history=5

Alternatively, you can manually edit ~/.cmdify_config.json:

{
  "local_endpoint": "http://localhost:8000/v1",
  "model": "hosted_vllm/...",
  "command_history": 5
}

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

cmdify-0.3.1.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

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

cmdify-0.3.1-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file cmdify-0.3.1.tar.gz.

File metadata

  • Download URL: cmdify-0.3.1.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for cmdify-0.3.1.tar.gz
Algorithm Hash digest
SHA256 b446fae9e6094432c2faf1c2a0b39d0e5a69b0e1b918522332eb0f04454127be
MD5 4332c378adfa231f7981e03ccea412a5
BLAKE2b-256 07bc3b7b38d22e27be46388374582058aa8e427ff017617e388912907ce0efa5

See more details on using hashes here.

File details

Details for the file cmdify-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: cmdify-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for cmdify-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 501c7670bd01dbf39e3693bf21a6953a63906edb090d92ae5b3c1aaf09cbefd5
MD5 4e135c2b687e3e20f6c0bf2952ac1ac3
BLAKE2b-256 5b661576783841c86b5df0d4ae43eed1b59bf6f361865f029307649819183310

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