Skip to main content

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).

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


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.2.0.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

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

clitr-0.2.0-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file clitr-0.2.0.tar.gz.

File metadata

  • Download URL: clitr-0.2.0.tar.gz
  • Upload date:
  • Size: 7.9 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

Hashes for clitr-0.2.0.tar.gz
Algorithm Hash digest
SHA256 9b3dd61501d9e0185d327d1f806b5bb49406f1934ef346f03133cd1b12abce6d
MD5 8246da414545cb6025b8207c8e2900ef
BLAKE2b-256 a3d003cc2e586c7bd38586bd944a1aae9c8ed0640865cbc7bbea545f7e7bf774

See more details on using hashes here.

File details

Details for the file clitr-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: clitr-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • 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

Hashes for clitr-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f74257d4a81b897442299b2fa466b4328c414be5bf8033c9811ae9fcdd54920b
MD5 ba14c20c5403eba517414ab459268158
BLAKE2b-256 5e698a3b8c47a337f7c25eada8645af6b07e4e1d86599b316de14d5260ec580e

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