garble
Transform stdin with an LLM. Pipe text in, get transformed text out.
tl;dr
Mostly made to simplify Voxtype's post-processing step, so I've only tried it with voice transcriptions. Happy to accept patches tuning the fairly minimal current prompts.
# Fix typos and grammar
echo "teh quikc brown fox" | garble --directions "fix typos"
# Translate
cat letter.txt | garble --directions "translate to Pirate"
# Reformat
pbpaste | garble --directions "convert to markdown table" | pbcopy
Installation
# Clone and install to ~/.local/bin
git clone https://git.secluded.site/garble
cd garble
make install
# Or install elsewhere
make install PREFIX=/usr/local
Requires Erlang/OTP and the Gleam toolchain.
Usage
garble [--provider PROVIDER] [--model MODEL] [--directions "..."]
All flags are optional if configured in ~/.config/garble/config.toml.
Flags
| Flag | Description | Example values |
|---|---|---|
--provider |
Provider ID | openai, anthropic, google |
--model |
Model ID | gpt-4o, claude-3-opus, gemini-1.5-pro |
--directions |
Instructions for how to transform the input | "fix grammar and spelling" |
Valid provider and model IDs are listed at https://catwalk-fe.secluded.site (an unofficial frontend for Charm's Catwalk service).
Configuration
Create ~/.config/garble/config.toml:
provider = "anthropic"
model = "claude-sonnet-4-20250514"
directions = "fix grammar and spelling"
# API key options (in order of precedence):
# 1. Run a command to get the key
api_key_cmd = "op read 'op://Private/Anthropic/credential'"
# 2. Or set it directly (not recommended)
# api_key = "sk-..."
If neither api_key_cmd nor api_key is set, garble falls back to the
provider's environment variable (e.g. ANTHROPIC_API_KEY, OPENAI_API_KEY).
CLI flags override config file values.
Here's my config.
provider = "synthetic"
model = "hf:deepseek-ai/DeepSeek-V3.2"
directions = """
Correct the transcription to match how I would actually type, after edits and corrections.
- Follow inline dictation instructions, example follows in the section below
- Remove filler words like "um", "uh", "like", "you know", "so" (when meaningless)
- Correct words from the transcription engine when the context makes obvious what the word should be, example follows in the section below
- Remove false starts and repeated words
- Preserve my intended meaning without rephrasing or "improving" my words
- No markdown, no formatting, just clean plain text
<dictation_interpretation_example>
<in>
This is. An example of speaks, an audio compression codec. Specifically tuned for reproducing. Specifically tuned for the reproduction of the human voice. No, human speech.
</in>
<out>
This is an example of SPEEX, an audio compression codec specifically tuned for the reproduction of human speech.
</out>
</dictation_interpretation_example>
"""
Contributions
Patch requests are in amolith/llm-projects on pr.pico.sh. You don't
need a new account to contribute, you don't need to fork this repo, you
don't need to fiddle with git send-email, you don't need to faff with
your email client to get git request-pull working...
You just need:
- Git
- SSH
- An SSH key
# Clone this repo, make your changes, and commit them
# Create a new patch request with
git format-patch origin/main --stdout | ssh pr.pico.sh pr create amolith/llm-projects
# After potential feedback, submit a revision to an existing patch request with
git format-patch origin/main --stdout | ssh pr.pico.sh pr add {prID}
# List patch requests
ssh pr.pico.sh pr ls amolith/llm-projects
See "How do Patch Requests work?" on pr.pico.sh's home page for a more complete example workflow.
Some other tools if this one interested you
- formatted-commit - CLI that turns LLM input into well-formatted Conventional Commits
- agent-skills - collection of Agent Skills for extending LLM capabilities
License
AGPL-3.0-or-later