CLI Translate - A tool to translate natural language to shell commands using LLMs
Project description
clitr
CLI Translate - A tool to translate natural language to shell commands using LLMs.
Installation
pip install clitr
Usage
clitr "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:
clitr --set-config -local_endpoint=http://127.0.0.1:1234/v1 -model=openai/qwen3-30b-a3b
To see all available configuration options, run:
clitr --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:
clitr --set-config -command_history=5
Alternatively, you can manually edit ~/.clitr_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
clitr-0.3.0.tar.gz
(8.2 kB
view details)
File details
Details for the file clitr-0.3.0.tar.gz.
File metadata
- Download URL: clitr-0.3.0.tar.gz
- Upload date:
- Size: 8.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f3d54637c8e658a59805bec584904009f1a660bc0f8086e68aca7b4cbd1f88f9
|
|
| MD5 |
94522d9c44f818dbeed15bfa2786b24b
|
|
| BLAKE2b-256 |
210889f8f54083da2bb412799eb35518c9aa6584ed1ca51899d279cb678e1597
|