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 totrue, forces use of the local endpoint even ifOPENAI_API_KEYis 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b446fae9e6094432c2faf1c2a0b39d0e5a69b0e1b918522332eb0f04454127be
|
|
| MD5 |
4332c378adfa231f7981e03ccea412a5
|
|
| BLAKE2b-256 |
07bc3b7b38d22e27be46388374582058aa8e427ff017617e388912907ce0efa5
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
501c7670bd01dbf39e3693bf21a6953a63906edb090d92ae5b3c1aaf09cbefd5
|
|
| MD5 |
4e135c2b687e3e20f6c0bf2952ac1ac3
|
|
| BLAKE2b-256 |
5b661576783841c86b5df0d4ae43eed1b59bf6f361865f029307649819183310
|