\n
\n
\n\n[](https://github.com/Balanov/uncut/actions/workflows/ci.yml)\n[](https://github.com/Balanov/uncut/releases/latest)\n[](LICENSE)\n[](go.mod)\n\nUNCUT is a tiny coding-agent harness for shell pipelines, CI jobs, containers, and agent experiments. It deliberately has no TUI, telemetry, plugin system, background agents, automatic retries, or context compaction.\n\nThe entire conversation is sent on every model call. File contents and combined command output are never truncated by UNCUT. If the provider cuts a response at its output limit, UNCUT exits with an error instead of presenting a partial answer as success. [Run the proof yourself](bench/README.md) or inspect the [recorded measurements](BENCHMARKS.md).\n\n## Why UNCUT?\n\n- **Lossless by default.** No summarization, pruning, sliding windows, or silent output caps.\n- **Headless only.** Final text goes to stdout; structured NDJSON events are available with `--json`.\n- **Small and portable.** One statically linked Go binary, no runtime or third-party Go dependencies.\n- **Provider neutral.** Works with OpenAI-compatible Chat Completions endpoints, including local servers.\n- **Resumable.** Optional append-only JSONL sessions preserve every message and tool result.\n- **Forkable.** 837 lines of implementation Go, four tools, one provider protocol, one agent loop, MIT license.\n\n## Install\n\n### Linux\n\n```sh\nVERSION=0.1.1\nARCH=amd64 # Use arm64 on ARM64.\ncurl -fSLo uncut \"https://github.com/Balanov/uncut/releases/download/v${VERSION}/uncut-linux-${ARCH}\"\nmkdir -p \"$HOME/.local/bin\"\ninstall -m 0755 uncut \"$HOME/.local/bin/uncut\"\nexport PATH=\"$HOME/.local/bin:$PATH\"\nuncut --version\n```\n\nMake sure `$HOME/.local/bin` is on your `PATH`.\n\n### macOS\n\n```sh\nVERSION=0.1.1\nARCH=arm64 # Use amd64 on Intel.\ncurl -fSLo uncut \"https://github.com/Balanov/uncut/releases/download/v${VERSION}/uncut-darwin-${ARCH}\"\nmkdir -p \"$HOME/.local/bin\"\ninstall -m 0755 uncut \"$HOME/.local/bin/uncut\"\nexport PATH=\"$HOME/.local/bin:$PATH\"\nuncut --version\n```\n\n### Windows PowerShell\n\n```powershell\n$Version = \"0.1.1\"\n$Arch = \"amd64\" # Use arm64 on ARM64.\n$Dest = \"$env:LOCALAPPDATA\\Programs\\UNCUT\"\nNew-Item -ItemType Directory -Force $Dest | Out-Null\nInvoke-WebRequest -Uri \"https://github.com/Balanov/uncut/releases/download/v$Version/uncut-windows-$Arch.exe\" -OutFile \"$Dest\\uncut.exe\"\n$env:Path = \"$Dest;$env:Path\"\nuncut --version\n```\n\nAdd `$Dest` to your user `PATH` to make UNCUT available in future terminals.\n\n### Checksums and OS warnings\n\nEvery release includes `checksums.txt`. For example, verify a Linux download with:\n\n```sh\nVERSION=0.1.1\nARCH=amd64\ncurl -fSLO \"https://github.com/Balanov/uncut/releases/download/v${VERSION}/checksums.txt\"\ngrep \"uncut-linux-${ARCH}$\" checksums.txt | sha256sum -c -\n```\n\nThe binaries are not code-signed yet, so SmartScreen or Gatekeeper may warn. Verify the SHA-256 checksum before allowing a downloaded executable. On macOS, after verification, remove quarantine from this file only:\n\n```sh\nxattr -d com.apple.quarantine \"$HOME/.local/bin/uncut\"\n```\n\nYou can also build from source instead.\n\n### Go install and source builds\n\nWith Go 1.26+:\n\n```sh\ngo install github.com/Balanov/uncut/cmd/uncut@latest\n```\n\nOr build a checkout:\n\n```sh\ngit clone https://github.com/Balanov/uncut.git\ncd uncut\ngo build -trimpath -ldflags=\"-s -w\" -o bin/uncut ./cmd/uncut\n```\n\nOn Windows, use `bin/uncut.exe` as the output path.\n\n## Quick start\n\nSet a model and API key:\n\n```sh\nexport UNCUT_API_KEY=\"your-api-key\"\nexport UNCUT_MODEL=\"your-model-id\"\nuncut \"Inspect this repository and fix the failing tests\"\n```\n\nFor an OpenAI-compatible provider, also set its base URL:\n\n```sh\nexport UNCUT_BASE_URL=\"https://openrouter.ai/api/v1\"\n```\n\nFor a local Ollama server with an installed tool-capable model (this exact setup was smoke-tested with `qwen3:8b`):\n\n```sh\nollama pull qwen3:8b\nexport UNCUT_BASE_URL=\"http://localhost:11434/v1\"\nexport UNCUT_MODEL=\"qwen3:8b\"\nuncut \"Explain this repository\"\n```\n\nNo API key is required by default for local endpoints. In PowerShell, set variables with `$env:UNCUT_BASE_URL = \"...\"` and `$env:UNCUT_MODEL = \"...\"`. Replace the example model with one actually installed on your machine; tool-call behavior depends on the model.\n\n### Unix pipelines\n\n```sh\ngit diff | uncut \"Review this diff. Do not edit files.\"\ncat failing-test.log | uncut \"Find the likely cause\"\n```\n\nPiped input is appended to the prompt verbatim. UNCUT accepts valid UTF-8 text and rejects invalid input rather than replacing bytes silently.\n\n### JSONL events\n\n```sh\nuncut --json \"Run the tests and fix the failure\"\n```\n\nThe event stream contains `user`, `assistant`, `assistant_meta`, `tool`, and finally `done` or `error` records. Assistant messages include complete tool calls; tool messages include complete results. Usage and finish reasons are separate `assistant_meta` events.\n\n### Sessions\n\n```sh\nuncut --session .uncut/work.jsonl \"Start the refactor\"\nuncut --session .uncut/work.jsonl \"Continue with the tests\"\n```\n\nIf the file exists, UNCUT resumes its complete history. New messages are appended and synced after each step. Invalid or partial records cause an explicit error; they are never discarded to make a session load.\n\nSession files can contain source code, command output, and secrets. Store them accordingly and do not commit them accidentally.\n\n## Configuration\n\n| Environment variable | Purpose | Default |\n| --- | --- | --- |\n| `UNCUT_MODEL` | Model ID; required unless `--model` is used | none |\n| `UNCUT_BASE_URL` | OpenAI-compatible base URL | `OPENAI_BASE_URL`, then `https://api.openai.com/v1` |\n| `UNCUT_API_KEY` | Bearer token | `OPENAI_API_KEY`, then no token |\n\nUseful flags:\n\n| Flag | Default | Meaning |\n| --- | --- | --- |\n| `--cwdUNCUT
\nThe lossless, headless coding agent harness.
\nOne 7 MB static binary, four tools, plain stdin/stdout.
No TUI. No telemetry. No silent context cuts.
Linux · macOS · Windows · amd64 + arm64 · MIT
\n\ncodes internal/harness/ agent loop, provider, tools, sessions, platform shells bench/ lossless proof and benchmark drivers assets/ logo and editable brand source docs/ launch material
## License
MIT. Fork it, modify it, ship it. See [LICENSE](LICENSE).