master
bridle
An agentic harness for OpenAI-compatible chat completion endpoints.
Features
Harness user experience:
- Readline-based CLI with tab completion
- Coloured output for sections (
-Colour, orNO_COLORenv var) - Tooltip descriptions on all slash commands
- Optional Vim mode (
<ESC>, thenvto visually edit current input line) - Press
Ctrl+Xto edit the current input line in$EDITOR
- Coloured output for sections (
- Oneshot mode (
-p) - Manipulate turn history (
/rewind,/turns,/submit) - Support interrupting current message or tool call (
^C) - Session management (
-Autosave, manual/save, and resume via-r) - Import local files (wildcard match) into prompt (
/read) - Linux sandboxing with Bubblewrap (
-Sandbox), use at own risk - Git worktree support (
-w)
Special modes:
- "Autoengineer" (
/autoengineer)- Implement every task in TODO file and TODO/FIXME comments in codebase.
- The result is not necessarily very good, but it can run overnight and you can cherry-pick the good parts in the morning.
Model integration with harness:
- Auto load
AGENTS.mdandCLAUDE.mdfiles - Compaction via context summarization (
/compact)- Auto compact on client-side token threshold (
-MaxContext) or on server-side length exceeded
- Auto compact on client-side token threshold (
- Tool calling
- Available tools:
- Local file I/O (
read_file,write_file) - Auto-healing
apply_patch, supporting both unified + V4A formats - Command execution (
local_shell) - Subagents (
subagentwith fork/fresh context modes) - Web search with DuckDuckGo
- Webpage read in Reader Mode (via
go-readability), converting links to navigable markdown - Anti-hallucination:
write_file/apply_patchmust read a file first (or be nonexistent) before writing, andweb_readonly permits URLs already seen in the conversation
- Local file I/O (
- MCP support
- Stdio, Streaming HTTP, or SSE transports
- Static (
-Mcp <name>=<command>/-Mcp <name>=http://url) or dynamic registration (/mcp-connect,/mcp-list,/mcp-disconnect) - Dynamic tool discovery
- User confirmation levels (
/checktoolsor-CheckTools: set toaskdefault,auto, oryolo)- Allow denying with alternative message (
?)
- Allow denying with alternative message (
- Trigger tools locally (
/tool), optionally submit in next turn
- Available tools:
Model settings:
- Use custom model provider (
-Hostand-Key)- Supports timing metadata from both llama-server and OpenAI/OpenRouter
- Toggle thinking (
/thinkand/no_think) and setreasoning_effort - Customizable system message, default-tuned for Golang development
Usage
# For 128k 131072, for 256k 262144 . Mostly affects pp speed, not tg speed
llama-server -c 262144 --cache-type-k q8_0 --cache-type-v q8_0 -fa on -np 1 -m /srv/llama/Qwen3.6-35B-A3B-UD-Q4_K_XL.gguf &
./bridle
# or
./bridle -CheckTools=yolo -Sandbox -Autosave=auto -w my-worktree
# Use with OpenRouter
./bridle -Host 'https://openrouter.ai/api/' -Key 'sk-or-v1-xxxx' -Model 'openrouter/free'
Languages
Go
97%
Shell
3%