{"slug": "show-hn-lx-coreutils-pipeable-tools-enhanced-by-small-local-cheap-llm-calls", "title": "Show HN: LX Coreutils – pipeable tools enhanced by small local / cheap LLM calls", "summary": "LX Coreutils, a suite of 72 composable command-line tools enhanced by small local or cheap LLM calls, has been released by developer Claas Brunken. The tools run on a local Ollama model by default with no API key required, or can be pointed at hosted models from Anthropic, OpenAI, Gemini, Groq, and others via a single environment variable, with cold start under 15 ms. The suite includes commands like lxcommit for writing commit messages from diffs, lxexplain for explaining shell commands, and lxsh for converting natural language to shell commands.", "body_md": "Write a commit message from your diff, explain a scary command, turn plain English into a shell command — without leaving the terminal or pasting into a chat window. LX Coreutils is a suite of small, composable commands that each do one such job and pipe into the next.\n\n**Runs on a local Ollama model by default — no API key,\nnothing leaves your machine.** Or point it at a hosted model (Anthropic, OpenAI,\nGemini, Groq, +6) with one env var: each call is deterministic and tightly\nscoped, so a fast, cheap model costs a fraction of a cent. Either way, cold\nstart < 15 ms.\n\n```\n# with a local model (default) or a cheap hosted one — then:\ngit diff --staged | lxcommit               # write the commit message\nlxexplain \"tar -xzf archive.tar.gz\"        # explain any command\nlxsh \"find all .log files older than 30d\"  # natural language → shell\njournalctl -u nginx | lxlog                # triage a wall of logs\n```\n\n`lx`\n\nitself is the catalog — no network needed:\n\n```\nlx                                         # browse all 72 tools (offline)\nlx tools commit                            # find tools related to \"commit\"\nlx tools --cat code                        # list Code & Development tools\n```\n\n| If you reach for… | Try lx instead |\n|---|---|\n`grep` for meaning, not syntax |\n`lxgrep \"failed logins\" nginx.log` |\n`man` for a quick answer |\n`lxman git rebase` |\n| writing commit messages by hand | `git diff --staged | lxcommit` |\n| googling \"curl with bearer token\" | `lxcurl \"POST to api.example.com/users with auth\"` |\n| jq trial-and-error | `lxjq \"extract all email fields from users array\"` |\n| sed/awk trial-and-error | `lxsed \"print 3rd column where first is ERROR\"` |\n| reading a dense diff | `git diff main | lxdiff` |\n| squinting at a stack trace | `cat error.log | lxdebug` |\n| decoding a JWT | `lxjwt < token.txt` |\n| figuring out why curl failed | `curl -v https://api.example.com 2>&1 | lxhttp` |\n| googling DNS errors | `dig example.com | lxdns` |\n\n```\n# Review, then commit if it looks good\ngit diff --staged | lxdiff && git diff --staged | lxcommit\n\n# Edit a Dockerfile, review the change, apply it\nlxdockerfile \"add a healthcheck\" < Dockerfile | lxdiff\n\n# Generate a firewall rule accounting for existing rules\niptables -S | lxfirewall \"allow SSH only from 10.0.0.0/8\"\n\n# Find and summarise all TODO comments\nlxgrep \"TODO\" src/ | lxsum\n\n# Diagnose a slow DNS lookup\ndig +stats example.com | lxdns\n```\n\nAll tools share a consistent interface:\n\n`--json`\n\nfor structured output`--dry-run`\n\nto preview the system prompt and redacted input before sending`--lang <code>`\n\nto set output language (BCP-47)- Exit codes 0–5 with human and JSON error formats\n\nOne command — downloads the latest prebuilt binaries for your platform, verifies the checksum, and installs them to a bin directory. No Rust toolchain, no compiling.\n\n**Linux (x86_64 or aarch64, incl. 64-bit Raspberry Pi OS):**\n\n```\ncurl -fsSL https://raw.githubusercontent.com/BrunkenClaas/lx/main/scripts/install.sh | sh\n```\n\n**Windows (PowerShell):**\n\n```\nirm https://raw.githubusercontent.com/BrunkenClaas/lx/main/scripts/install.ps1 | iex\n```\n\nThe installer puts binaries in `~/.local/bin`\n\n(Linux) or `%USERPROFILE%\\bin`\n\n(Windows) and tells you if that directory needs adding to your PATH. Override the\nlocation with `LX_INSTALL_DIR`\n\n, or pin a version with `LX_VERSION=1.0.2`\n\n.\n\nPiping a script from the internet into your shell runs it with your permissions. The script is short and does only what is described above — read it first if you prefer:\n\n[/]`scripts/install.sh`\n\n[. macOS has no prebuilt binary yet; build from source (below).]`scripts/install.ps1`\n\nPrefer to do it by hand, or on a platform the installer doesn't cover? Download the\nsuite ZIP for your platform from [GitHub Releases](https://github.com/BrunkenClaas/lx/releases)\nand verify the checksum:\n\n```\nsha256sum -c lx-coreutils-1.0.2-x86_64-unknown-linux-musl.zip.sha256\nmkdir -p ~/.local/bin\nunzip lx-coreutils-1.0.2-x86_64-unknown-linux-musl.zip\nmv lx-coreutils-1.0.2-x86_64-unknown-linux-musl/lx* ~/.local/bin/\n```\n\nIf `~/.local/bin`\n\nis not yet on your PATH, add this to `~/.bashrc`\n\nor `~/.zshrc`\n\n:\n\n```\nexport PATH=\"$HOME/.local/bin:$PATH\"\nphp\n# Unzip and copy binaries to a local bin folder\n$dest = \"$env:USERPROFILE\\bin\"\nNew-Item -ItemType Directory -Force $dest | Out-Null\nExpand-Archive lx-coreutils-1.0.2-x86_64-pc-windows-gnu.zip -DestinationPath .\nCopy-Item lx-coreutils-1.0.2-x86_64-pc-windows-gnu\\*.exe $dest\n```\n\nThen add `%USERPROFILE%\\bin`\n\nto your PATH permanently (run once):\n\n```\n[Environment]::SetEnvironmentVariable(\n    \"PATH\", \"$env:USERPROFILE\\bin;$([Environment]::GetEnvironmentVariable('PATH','User'))\",\n    \"User\"\n)\n```\n\nRestart your terminal for the PATH change to take effect.\n\nIndividual tools are also available as standalone binaries on the Releases page if you only need one or two tools.\n\n```\ngit clone https://github.com/BrunkenClaas/lx\ncd lx\ncargo build -p lxexplain --release\n```\n\nNo configuration is required to get started — drop a binary in your PATH and run it.\nThe default provider is **Ollama** (local, no API key needed).\n\nRun `lx config`\n\nfor an interactive setup wizard that creates the config file for you.\n\nOllama is the default and needs no key. To use a different provider, set\n`LX_PROVIDER`\n\n(and `LX_API_KEY`\n\nfor the cloud ones):\n\n```\nexport LX_PROVIDER=ollama      # local default, no key needed\nexport LX_PROVIDER=lmstudio    # local, no key needed\nexport LX_PROVIDER=anthropic   && export LX_API_KEY=sk-ant-...\nexport LX_PROVIDER=openai      && export LX_API_KEY=sk-...\nexport LX_PROVIDER=gemini      && export LX_API_KEY=AIza...\nexport LX_PROVIDER=groq        && export LX_API_KEY=gsk_...\nexport LX_PROVIDER=openrouter  && export LX_API_KEY=sk-or-...\nexport LX_PROVIDER=mistral     && export LX_API_KEY=...\nexport LX_PROVIDER=deepseek    && export LX_API_KEY=...\nexport LX_PROVIDER=azure       && export LX_API_KEY=...  # requires LX_BASE_URL\n```\n\nOverride the model or endpoint for any provider:\n\n```\nexport LX_MODEL=claude-opus-4-8        # override default model\nexport LX_BASE_URL=https://...         # custom endpoint (Azure, Bedrock, Vertex…)\n```\n\n**API keys must never be stored in the config file** — use env vars or the OS credential store.\n\nEach provider has a built-in default model (fast/cheap tier):\n\n| Provider | Default model |\n|---|---|\n`ollama` |\n`llama3.1:8b` |\n`lmstudio` |\n`llama3.1-8b-instruct` |\n`anthropic` |\n`claude-haiku-4-5` |\n`openai` |\n`gpt-4o-mini` |\n`gemini` |\n`gemini-2.5-flash-lite` |\n`groq` |\n`llama-3.1-8b-instant` |\n`openrouter` |\n`meta-llama/llama-3.1-8b-instruct:free` |\n`mistral` |\n`mistral-small-latest` |\n`deepseek` |\n`deepseek-chat` |\n`azure` |\n(no default — set `LX_MODEL` ) |\n\n| Size | Suitable for |\n|---|---|\n| < 3 B | Not recommended — too many hallucinations and schema errors. |\n| 3 B | Simple command lookups only (`lxsh` , `lxsql` , `lxcurl` , …). Avoid long-output tools. |\n| 7–8 B | Recommended minimum. Handles nearly the full suite. `llama3.1:8b` or `qwen2.5:7b` . |\n| 14 B | Near-remote quality; requires ≥16 GB VRAM. |\n| remote | Full suite, no constraints. |\n\nLocal models need a context window of at least **32 768 tokens** to cover every tool.\nWith **Ollama** this is automatic — lx requests it (`num_ctx`\n\n) on every call. With\n**LM Studio** you must set it yourself: choose a **Context Length ≥ 32k** in the GUI when\nloading the model (LM Studio ignores the value from the API).\n\nAvoid reasoning/thinking models(e.g. QwQ, Gemma 4 QAT, DeepSeek-R1, o1/o3). These emit a chain-of-thought that consumes the token budget before the JSON answer, causing tools to fail with truncated output. Use instruct variants instead or deactivate reasoning/thinking in the model settings.\n\nFor persistent settings create a config file with the interactive wizard or by hand:\n\n```\nlx config          # interactive wizard (creates the file for you)\nlx config --print  # preview only, no file written\n```\n\nAlternatively create it by hand at:\n\n- Linux/macOS:\n`~/.config/lx/config.toml`\n\n- Windows:\n`%APPDATA%\\lx\\config.toml`\n\n```\n[llm]\nprovider = \"anthropic\"\n# model = \"\"        # leave empty to use provider default\n# base_url = \"\"     # leave empty to use provider default\ntimeout_secs = 30\nmax_retries = 3\n\n[limits]\nmax_input_bytes = 524288   # 512 KiB\nmax_output_tokens = 1024\n\n[redact]\nlevel = \"standard\"   # or \"strict\"\n\n[output]\nlang = \"auto\"        # BCP-47 code or \"auto\" (detect from locale)\ncolor = \"auto\"       # auto | always | never\n```\n\nAll values are optional — omitted keys fall back to compiled defaults.\nBuild-from-source users can find a fully annotated template at\n`crates/lx-config/config.example.toml`\n\n.\n\nOptional shell scripts wire lx tools into your interactive shell as keyboard shortcuts and helper functions. After sourcing the appropriate script, you get:\n\n| Shortcut / Command | What it does |\n|---|---|\n`Ctrl+K` |\nConverts the current command-line buffer into a shell command via `lxsh` . Type plain English, press Ctrl+K, get a real command. If `lxsh` returns nothing the buffer is left unchanged. |\n`Ctrl+E` |\nExplains the current command-line buffer via `lxexplain` . The command is echoed, the explanation prints below, and a fresh prompt appears. |\n\nReplace `/path/to/shell-integration`\n\nwith the actual path (repo checkout or\nthe `shell-integration/`\n\nfolder from the release ZIP). Run once to install permanently:\n\n**bash:**\n\n```\necho 'source /path/to/shell-integration/lx.bash' >> ~/.bashrc && source ~/.bashrc\n```\n\n**zsh:**\n\n```\necho 'source /path/to/shell-integration/lx.zsh' >> ~/.zshrc && source ~/.zshrc\n```\n\n**fish:**\n\n```\necho 'source /path/to/shell-integration/lx.fish' >> ~/.config/fish/config.fish\nsource ~/.config/fish/config.fish\n```\n\n**PowerShell** (requires PSReadLine, included by default on Windows):\n\n```\nAdd-Content $PROFILE \". /path/to/shell-integration/lx.ps1\"\n. $PROFILE\n```\n\n**CMD (Command Prompt):** not supported. CMD has no readline API, so\nkey bindings cannot be implemented. Use PowerShell instead.\n\n| Platform | Minimum |\n|---|---|\n| Linux | Kernel 3.17+ |\n| Windows | Windows 10 1903+ |\n| macOS | 11.0+ (build from source) |\n| Rust (build) | Exact pinned toolchain, see `rust-toolchain.toml` |\n\nStatic binaries (musl on Linux, `+crt-static`\n\non Windows) require no runtime libraries.\n\n**Redaction**— tools that process potentially sensitive input (diffs, logs, env vars) run the input through`lx-redact`\n\nbefore the LLM call. Use`--dry-run`\n\nto see exactly what gets sent. Redaction is best-effort: it covers a broad set of known prefixed secret formats (AWS, GitHub, GitLab, GCP, Slack, Stripe, SendGrid, Twilio, npm, Anthropic, …) and credential-context names (`API_KEY`\n\n,`token`\n\n,`client_secret`\n\n, …). Each prefixed detector applies a Shannon-entropy floor + placeholder filter (the gitleaks approach), so documentation examples like`AKIAIOSFODNN7EXAMPLE`\n\nand placeholders like`sk-your_api_key_here_…`\n\nare left alone. It cannot reliably mask a secret in an unrecognised variable with a short value, and the entropy gate does not catch every false positive (a value built from English words has key-like entropy). Treat it as a strong safety net, not a guarantee.— for a thorough scan,`lxsecret`\n\n/`lxredact --strict`\n\n`lxsecret`\n\ndetects committed secrets (add`--strict`\n\nfor a keyword-independent high-entropy sweep), and`lxredact --strict`\n\nmasks PII (IPs, hostnames, paths) plus an expanded set of niche service tokens.**No command execution**— command-generating tools (`lxsh`\n\n,`lxsql`\n\n, …) output text only. Nothing is ever executed.**No telemetry**— the tools call only the configured LLM endpoint, never anything else.— shows the (redacted) text that would be sent to the LLM without sending it.`--dry-run`\n\nRun `lx`\n\nor `lx tools`\n\nto browse all 72 tools offline. Short list by category:\n\n**Text & Analysis:** `lxexplain`\n\n`lxsum`\n\n`lxtl`\n\n`lxclass`\n\n`lxpull`\n\n`lxproof`\n\n**Code & Dev:** `lxcode`\n\n`lxdebug`\n\n`lxdoc`\n\n`lxregex`\n\n`lxregexplain`\n\n`lxsql`\n\n`lxsh`\n\n`lxtypehint`\n\n`lxrename`\n\n`lxfixcmd`\n\n`lxfixscript`\n\n`lxpatch`\n\n**Cmd-gen:** `lxjq`\n\n`lxcurl`\n\n`lxsed`\n\n`lxffmpeg`\n\n`lxkubectl`\n\n`lxdockercmd`\n\n`lxrsync`\n\n`lxmount`\n\n`lxkill`\n\n`lxcron`\n\n`lxfirewall`\n\n`lxip`\n\n`lxprintf`\n\n**Filesystem & Data:** `lxfind`\n\n`lxgrep`\n\n`lxdigest`\n\n`lxcsv`\n\n`lxjson`\n\n`lxconv`\n\n`lxtable`\n\n`lxmock`\n\n**Search & Knowledge:** `lxask`\n\n`lxman`\n\n`lxerrno`\n\n**Productivity:** `lxdraft`\n\n`lxcommit`\n\n`lxclog`\n\n`lxpr`\n\n`lxstandup`\n\n`lxtodo`\n\n`lxnotes`\n\n`lxgitignore`\n\n`lxdockerfile`\n\n`lxmakefile`\n\n**Docs & Format:** `lxmd`\n\n`lxmermaid`\n\n`lxdiff`\n\n`lxgraph`\n\n**Security:** `lxsecret`\n\n`lxredact`\n\n`lxperm`\n\n`lxcve`\n\n`lxcert`\n\n`lxjwt`\n\n`lxchmod`\n\n**Network & System:** `lxlog`\n\n`lxconf`\n\n`lxport`\n\n**Diagnostics:** `lxdns`\n\n`lxssl`\n\n`lxping`\n\n`lxhttp`\n\n**Meta & Shell:** `lxundo`\n\n**Web:** `lxurl`\n\nLX Coreutils was designed and written to a hand-authored specification —\n[ docs/design_document.md](/BrunkenClaas/lx/blob/main/docs/design_document.md) sets out the architecture,\nthe security model, the naming and I/O conventions, and the exact contract of\nevery one of the 72 tools. That spec drove the implementation: 72 tools sharing\n5 libraries, each conforming to the same rules by design. AI was used as a tool\nthroughout, directed against that specification and shaped by hand. Every tool\nis covered by tests and a self-grading acceptance harness\n(\n\n`crates/lx-acceptance/`\n\n).Dual-licensed under **MIT OR Apache-2.0**. See `LICENSE-MIT`\n\nand `LICENSE-APACHE`\n\n.\n\nSee `CONTRIBUTING.md`\n\n.", "url": "https://wpnews.pro/news/show-hn-lx-coreutils-pipeable-tools-enhanced-by-small-local-cheap-llm-calls", "canonical_source": "https://github.com/BrunkenClaas/lx", "published_at": "2026-07-26 21:09:29+00:00", "updated_at": "2026-07-26 21:22:28.320418+00:00", "lang": "en", "topics": ["developer-tools", "large-language-models", "generative-ai", "ai-tools"], "entities": ["LX Coreutils", "Claas Brunken", "Ollama", "Anthropic", "OpenAI", "Gemini", "Groq"], "alternates": {"html": "https://wpnews.pro/news/show-hn-lx-coreutils-pipeable-tools-enhanced-by-small-local-cheap-llm-calls", "markdown": "https://wpnews.pro/news/show-hn-lx-coreutils-pipeable-tools-enhanced-by-small-local-cheap-llm-calls.md", "text": "https://wpnews.pro/news/show-hn-lx-coreutils-pipeable-tools-enhanced-by-small-local-cheap-llm-calls.txt", "jsonld": "https://wpnews.pro/news/show-hn-lx-coreutils-pipeable-tools-enhanced-by-small-local-cheap-llm-calls.jsonld"}}