blunderbuss
The non-toxic LLM coding harness
LLMs aren't partners or colleagues or advisors or underlings or any other kind of embodied mind. They're tools, but stochastic and unreliable ones. They're like a blunderbuss you pack with nails and glass and hope the scatter hits your target.

blunderbuss is a coding harness that acknowledges LLMs are dangerous, not just because they often take unexpected destructive action, but because they're cognitively toxic. They encourage cognitive debt, push you towards mediocrity, encourage your delusions, and gaslight you when you push back.
If you want a full discussion of the philosophy and design of blunderbuss, read this blog post:
Blunderbuss: the non-toxic LLM coding harness
Main design decisions
- Editor-oriented: When using
blunderbussyou write all instructions and config inblunderbuss.local.md, rather than typing them in a (buggy and temperamental) terminal app. This keeps you working in your strongest environment, the editor, engaged with the code, rather than falling asleep at the wheel as so many are now doing. - Allowlist permissioning:
blunderbussonly has access to the shell tools you have explicitly allowed, and can't access any files in any way other than those in the current working directory that aren't ignored by git. This means you won't be nagged every 30 seconds to approve some inscrutable glob of bash or python, and you don't have to stay glued to your terminal to keep the harness making progress. "YOLO mode" has always been a way to gaslight us. We don't have to choose between safety and convenience! git-based checkpointing: Whenblunderbussbegins a task it creates a cheap temporary work-in-progressgitcommit to ensure you can easily separate the changes it makes from those you already had in your working tree. Usinggitkeeps the harness much simpler and ensures every change is reversible, even those made by shell commands. Whenblunderbussfinishes with your task you'll be asked whether to keep the changes, revert them, or try again, and in all cases the work-in-progress commit will be removed.- No walls of slop:
blunderbusswill just silently work on your task, and when the task is done you'll be met with a clean simple selector for what to do with the changes it's made, rather than an LLM generated summary. This protects you from the twin dangers of sycophancy and persuasion bombing, and from the fatigue that inevitably comes when reading the dreary pablum that LLMs are mathematically guaranteed to produce. - No extended conversation:
blunderbussis intentionally designed in an "all or nothing" manner with no back-and-forth conversation with the LLM. You describe a task, it attempts that task, and you either keep what it did, throw it away and do it yourself, or have it try again with updated instructions. This helps you avoid such productivity and mind-killing traps as futzing, anthropomorphization, and automation bias. - Vendor agnostic:
blunderbussis built on thegenaicrate, and so allows you to use any provider/model you have access to. I'm quite convinced the big proprietary LLM vendors will eventually fail or crank up prices, and it's important to stay independent and able to switch at any time.
Usage
Install using cargo:
blunderbuss always reads blunderbuss.local.md to get its instructions (putting *.local.* in your .gitignore is probably a good idea), and is invoked as blb.
# blunderbuss works for a while
# then a simple selection menu appears asking
> looks
> nope
> try
The raw transcript of the LLM chat will be output to blunderbuss.output.local.yml, in case you want to see what's happening under the hood.
blunderbuss.local.md (task instructions)
blunderbuss.local.md is a markdown file with yaml frontmatter where you specify config for the task.
Here's a quick example, and below we'll go through each option.
---
model: gemini::gemini-3.5-flash-lite
tools:
- git diff
- git log
check: cargo check
ready: git diff > ~/Desktop/diff.txt && ${EDITOR} ~/Desktop/diff.txt
maxturns: 100
max_retry_times: 10
min_retry_delay: 5
max_retry_delay: 60
---
Here are the instructions that will be given to `blunderbuss`!
It's a full markdown file, so write whatever you please.
model: Specifies the model to use for this task, with a provider specified before the::. Full reference for available providers given at the end of this page. must be specified either here in user level configtools: List of commands to allowblunderbussto use as tools. Both the prefix you give and the suffix given byblunderbusswill be separately passed through shlex, meaning arbitrary bash constructs can't be used and your prefix can't be modified into any other command (such as could happen iftreecould be modified totree_spy.sh). Be careful with these tools! Remember that any subcommand of the prefix you pass is now somethingblunderbusscan call!check: A command that must pass in the exact form specified before the task will be considered successful.blunderbusscannot append any arguments to it, and a new turn will kick off with the failing output if it doesn't pass. It is also made available as a toolblunderbusscan call at any time.ready: A command that will be called once the task has completed successfully. This is not made available as a tool.maxturns: The maximum number of "conversation turns"blunderbusscan go through before it is forced to stop. This is an error condition, and so will causeblunderbuss's changes to be reverted. default 100max_retry_times: The maximum number of times to retry on recoverable errors to the LLM provider. (passed tobackon::ExponentialBuilder::with_max_times) default 10min_retry_delay: The minimum delay when retrying on recoverable errors to the LLM provider. (passed tobackon::ExponentialBuilder::with_min_delay) default 5max_retry_delay: The minimum delay when retrying on recoverable errors to the LLM provider. (passed tobackon::ExponentialBuilder::with_max_delay) default 60
~/.blunderbuss.config.yml (user level config)
# user level default for `model`
default_model: gemini::gemini-3.5-flash-lite
# user level default for `maxturns`
default_maxturns: 100
# user level default for `max_retry_times`
default_max_retry_times: 10
# user level default for `min_retry_delay`
default_min_retry_delay: 5
# user level default for `max_retry_delay`
default_max_retry_delay: 30
# whatever tools you put here will be available in every task
tools:
- git status
- git diff
- tree
# all of these can also be supplied as env vars instead
api_keys:
FIREWORKS_API_KEY: ...
TOGETHER_API_KEY: ...
GROQ_API_KEY: ...
AIHUBMIX_API_KEY: ...
KIMI_API_KEY: ...
MIMO_API_KEY: ...
MOONSHOT_API_KEY: ...
NEBIUS_API_KEY: ...
XAI_API_KEY: ...
DEEPSEEK_API_KEY: ...
MISTRAL_API_KEY: ...
ZAI_API_KEY: ...
BIGMODEL_API_KEY: ...
ALIYUN_API_KEY: ...
QWEN_CLOUD_API_KEY: ...
BAIDU_API_KEY: ...
COHERE_API_KEY: ...
OMLX_API_KEY: ...
VERTEX_API_KEY: ...
GITHUB_TOKEN: ...
OPENCODE_GO_API_KEY: ...
BEDROCK_API_KEY: ...
OPEN_ROUTER_API_KEY: ...
ATLASCLOUD_API_KEY: ...
REQUESTY_API_KEY: ...
API_ROUTE_API_KEY: ...
HEABSY_API_KEY: ...
RUNCRATE_API_KEY: ...
CLOUDGPU_API_KEY: ...
CHEAPAIMODEL_API_KEY: ...
STANDARDCOMPUTE_API_KEY: ...
UBERLLM_API_KEY: ...
MINIMAX_API_KEY: ...
OPENAI_API_KEY: ...
GEMINI_API_KEY: ...
ANTHROPIC_API_KEY: ...
OLLAMA_API_KEY: ...
Model resolution and auth
The genai crate underlying blunderbuss allows lots of providers out of the box. You can read their full docs here:
https://github.com/jeremychone/rust-genai#model-to-adapter-resolution
Or look at the source code for the adapter definitions here:
https://github.com/jeremychone/rust-genai/blob/v0.7.5/src/adapter/adapter_kind.rs#L184
Here's a reference table for all the provider prefixes and their associated api key names, which you can provide either in ~/.blunderbuss.config.yml or as an env var.
| provider prefix | api key name |
|---|---|
fireworks:: |
FIREWORKS_API_KEY |
together:: |
TOGETHER_API_KEY |
groq:: |
GROQ_API_KEY |
aihubmix:: |
AIHUBMIX_API_KEY |
kimi:: |
KIMI_API_KEY |
mimo:: |
MIMO_API_KEY |
moonshot:: |
MOONSHOT_API_KEY |
nebius:: |
NEBIUS_API_KEY |
xai:: |
XAI_API_KEY |
deepseek:: |
DEEPSEEK_API_KEY |
mistral:: |
MISTRAL_API_KEY |
zai:: |
ZAI_API_KEY |
bigmodel:: |
BIGMODEL_API_KEY |
aliyun:: |
ALIYUN_API_KEY |
qwen_cloud:: |
QWEN_CLOUD_API_KEY |
baidu:: |
BAIDU_API_KEY |
cohere:: |
COHERE_API_KEY |
omlx:: |
OMLX_API_KEY |
vertex:: |
VERTEX_API_KEY |
github_copilot:: |
GITHUB_TOKEN |
opencode_go:: |
OPENCODE_GO_API_KEY |
bedrock_api:: |
BEDROCK_API_KEY |
open_router:: |
OPEN_ROUTER_API_KEY |
atlascloud:: |
ATLASCLOUD_API_KEY |
requesty:: |
REQUESTY_API_KEY |
api_route:: |
API_ROUTE_API_KEY |
heabsy:: |
HEABSY_API_KEY |
runcrate:: |
RUNCRATE_API_KEY |
cloudgpu:: |
CLOUDGPU_API_KEY |
cheapaimodel:: |
CHEAPAIMODEL_API_KEY |
standardcompute:: |
STANDARDCOMPUTE_API_KEY |
uberllm:: |
UBERLLM_API_KEY |
minimax:: |
MINIMAX_API_KEY |
openai:: |
OPENAI_API_KEY |
openai_resp:: |
OPENAI_API_KEY |
gemini:: |
GEMINI_API_KEY |
gemini_ix:: |
GEMINI_API_KEY |
anthropic:: |
ANTHROPIC_API_KEY |
ollama_cloud:: |
OLLAMA_API_KEY |
ollama:: |
none |
The above table was generated with this short program.
Roadmap
- Add "init" behaviors to create configs if they don't exist.
- Add
allowanddenyto task config, to change file-level permissions rather than only using.gitignore. - Create eval suite for security of built-in tools.
- Create "short range task" benchmark to determine how small of models can complete manageably sized tasks.
- Add ability to read web pages at explicitly allowed URLs.
- Windows and Mac compatibility.
- Other installation paths than
cargo. - Change
modelto allow a list of models that will be rotated through when rate limits are hit. - Create "watch subcommand" that is built to babysit long-running processes such as CI jobs.
- MCP tool support
blunderbuss is human-made
I appreciate the irony of directly coding a new LLM coding harness rather than using a harness, but since the whole point of this project is that existing harnesses are unhealthy and unsafe, it felt like the right choice. Aside from using search tools like perplexity, I created blunderbuss without any LLM assistance.
Besides, I wanted to explore the actual mechanics of building an LLM harness in Rust, and I don't believe for a second anyone can actually learn much of anything if they they're just reading summaries. I learned a lot doing it this way!
In this spirit and since I want this project to remain legible and concise, I'm heavily biased against LLM-generated contributions. PRs that are clearly fully LLM generated won't be accepted, and especially if your descriptive text such as PR description or comments are LLM-generated you will be banned. Even if you use LLMs to help create a PR, it must be elegant, clear, and succinctly explained.