A coding agent CLI that gives the model bash and little else.
Warning: clnkr executes bash directly. There is no permission system and no sandbox. Run it only in environments you are willing to trust and break.
Install with Homebrew:
brew install clnkr-ai/tap/clnkrOr install the Debian package from the latest release:
curl -fsSLO https://github.com/clnkr-ai/clnkr/releases/download/v<VERSION>/clnkr_<VERSION>-1_<ARCH>.deb
sudo dpkg -i ./clnkr_<VERSION>-1_<ARCH>.debInstall from source with Go:
go install github.com/clnkr-ai/clnkr/cmd/clnkr@latest
go install github.com/clnkr-ai/clnkr/cmd/clnkrd@latestSet a provider and run:
export CLNKR_API_KEY=your-api-key
export CLNKR_PROVIDER=anthropic
export CLNKR_MODEL=claude-sonnet-4-6
clnkrAt the prompt, ask for a task. clnkr proposes bash commands and asks before it runs each batch.
Run unattended:
clnkr -p "find all TODO comments in this project"Skip approvals:
clnkr --full-sendCommon workflows:
- Run interactively with approval before each command batch
- Run unattended with
-p - Resume project sessions with
--continue - Stream JSONL event logs with
--event-log - Save and load transcripts with
--trajectoryand--load-messages
One-shot task:
clnkr -p "add tests for config loading"Resume the latest session for the current project:
clnkr --continueCompact older transcript history:
/compact
Ask the model to launch a bounded JSONL process:
/delegate inspect cmd/clnkrd and summarize the JSONL contract
clnkr treats /delegate as prompt text. The built-in prompt tells the model
to run clnkrd as a normal machine-facing stdio JSONL process, keep process
artifacts under /tmp, read stdout/stderr or event logs, and verify important
claims in the parent session.
Emit events or reuse transcripts:
clnkr -p "fix the build" --event-log /tmp/events.jsonl
clnkr -p "investigate the bug" --trajectory /tmp/investigation.json
clnkr -p "write a fix based on the investigation" --load-messages /tmp/investigation.jsonLaunch clnkrd directly from bash:
workdir=$(mktemp -d /tmp/clnkr-processes.$$.XXXXXX)
printf '%s\n' '{"type":"prompt","text":"inspect README.md; do not edit","mode":"full_send"}' |
clnkrd --event-log "$workdir/events.jsonl" > "$workdir/out.jsonl" 2> "$workdir/err"
sed -n '1,200p' "$workdir/out.jsonl"OpenAI-compatible endpoint:
clnkr --provider openai --base-url http://gpu-host:8000/v1 --model my-model
clnkr --provider openai --base-url http://localhost:11434/v1 --model llama3
clnkr --provider openai --base-url http://proxy:4000/v1 --model gpt-4oThe endpoint must support structured outputs.
Full CLI reference: doc/clnkr.1.md.
Set CLNKR_API_KEY. Everything else can come from flags or environment variables.
| Variable | Description |
|---|---|
CLNKR_API_KEY |
API key for the LLM provider (required) |
CLNKR_PROVIDER |
Provider: anthropic or openai |
CLNKR_MODEL |
Model name (overridden by --model) |
CLNKR_BASE_URL |
LLM endpoint (overridden by --base-url) |
clnkr builds its system prompt from the built-in prompt plus AGENTS.md files in the user home directory, the XDG config directory, and the current working directory.
Prompt controls:
clnkr --dump-system-prompt
clnkr --dump-system-prompt -p
clnkr --system-prompt-append "Prefer targeted tests first"
clnkr --no-system-promptAt each step, clnkr:
- Send the conversation to the LLM.
- Get back a question, command batch, or final answer.
- Ask the user when the model needs clarification.
- Ask for approval before running commands, unless
--full-sendor-pis set. - Send command results back to the model.
- Print the final answer.
Architecture discussion: doc/clnkr.7.md. Library/API reference: doc/clnkr.3.md.
git clone https://github.com/clnkr-ai/clnkr.git
cd clnkr
make help # Show all targets
make build # Build shipped binaries
make check # Full quality suite
make test # Tests only