Skip to main content

LLM shell helper that pastes commands into your terminal

Project description

clanker

LLM-powered shell helper that generates a command and pastes it into your terminal input so you can edit or run it.

Install

Use uv:

uv tool install clanker

Quick start

Configure the endpoint, model, and API key once:

clanker config

Then ask for a command:

clanker do "List all the files with the extension .pyc in this directory recursively and sum up their sizes"

Ask a question (no command insertion):

clanker ask "What does the -print0 flag do in find?"

By default, clanker will attempt to paste the generated command into your active terminal input (no auto-enter). If pasting fails, the command is printed so you can copy it manually.

You can also omit the do subcommand; clanker "..." is treated as clanker do "...". Prompts should be provided as a single quoted string.

Verbose mode (prints request payload, response, and step logs to stderr). Use -v or --verbose, and it can appear anywhere in the command:

clanker -v do "List all .py files"

Fish integration (recommended)

Many Linux distros disable tty injection. If you use fish, the best UX is to install the fish wrapper so the command is inserted via commandline -i:

clanker init fish

If you want the script printed instead of written, run clanker init fish --print.

Restart fish (or run the source ... command that clanker init prints) and then run clanker "..." as usual.

Configuration

Interactive wizard:

clanker config

Show config:

clanker config show

Set values directly:

clanker config set --endpoint https://api.openai.com/v1 --model gpt-4o-mini --api-key sk-...

Config file location:

clanker config path

Environment overrides:

  • CLANKER_ENDPOINT
  • CLANKER_MODEL
  • CLANKER_API_KEY
  • CLANKER_SHELL
  • CLANKER_CONFIG (full path to config file)

Notes on pasting

Clanker uses a Linux tty injection (TIOCSTI) to paste the command into the current terminal input buffer. Some systems disable this for security (for example dev.tty.legacy_tiocsti=0). If it is blocked, clanker prints the command instead. You can also force printing with:

clanker --print "..."

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

clanker-1.0.0.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

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

clanker-1.0.0-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

Details for the file clanker-1.0.0.tar.gz.

File metadata

  • Download URL: clanker-1.0.0.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.10 {"installer":{"name":"uv","version":"0.9.10"},"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":null}

File hashes

Hashes for clanker-1.0.0.tar.gz
Algorithm Hash digest
SHA256 11b33be5673a443dd6d0274efe41d2f42bd82ea598cfce5ed4d022c8f3815eef
MD5 a5ba164cd7111f6873058f06fd0af5ea
BLAKE2b-256 fbba33f6f30870b7d3a35cd9621fd543ce22f82aa86c6a17c2c6e8400853a124

See more details on using hashes here.

File details

Details for the file clanker-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: clanker-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 12.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.10 {"installer":{"name":"uv","version":"0.9.10"},"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":null}

File hashes

Hashes for clanker-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e6c1b4eed071541df440983bedadd4ba53caaee9e080b7482caab3e65407a5ec
MD5 d7e1903c2d5fb79b18ae30eed221fa49
BLAKE2b-256 4e841c7c565bd6ac6c0d47e938815d227067bcf7eea8a18b972ac71387cb8859

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