ketch

A stateless CLI for web search, code search, library docs, and scraping — one binary, no daemon, no API server to run.
Why ketch
Most research tooling for agents means wiring up several provider SDKs, each with its own auth and response shape. ketch collapses that into one binary with three research surfaces:
ketch search — web search that works out of the box, no API key needed: the default auto chain uses the keyless providers (DuckDuckGo, Exa, Firecrawl, Keenable, Parallel, You.com). Add a key for Brave, Tavily, TinyFish, SerpBase or Serply, or point it at your own SearXNG or Degoog instance
ketch code — grep real OSS source across public repos (Grep, Sourcegraph, or GitHub Code Search)
ketch docs — answers from documentation, no API key: it searches the web for the question and reads the first result that is a readable document, or answers offline from a library you indexed with ketch docs index (or Context7's curated snippets with -b context7)
Plus ketch scrape and ketch crawl to turn HTML pages and text-based PDFs into clean markdown.
It's built for two audiences at once:
- Humans, who want a fast terminal tool for the same job
curl | pandoc or a browser tab would otherwise do.
- AI agents, who want structured, predictable output (
--json everywhere), documented exit codes for control flow, and a single ketch config call to discover what backends are active — no environment probing, no per-provider glue code.
An operator configures the backend once (ketch config set backend searxng); every agent invocation afterward just calls ketch search or ketch scrape without knowing or caring which provider is behind it.
Install
# macOS / Linux, any of x86_64 or arm64
curl -fsSL https://ketch.run/install | sh
# Homebrew
brew install ketch
# npm
npm install -g ketch-cli
# go install
go install github.com/1broseidon/ketch@latest
# Or download a prebuilt binary (linux/darwin/windows, amd64/arm64)
# from https://github.com/1broseidon/ketch/releases
The install script picks the right build for your OS and architecture, verifies it
against the release's checksums.txt, and drops the binary in /usr/local/bin when
that's writable, otherwise ~/.local/bin. Read it first if you'd rather not pipe to a
shell: install.sh. Pin a
version or change the target directory with
sh -s -- --version v0.17.0 --bin-dir ~/bin.
Quickstart
$ ketch scrape https://go.dev/doc/effective_go
---
url: https://go.dev/doc/effective_go
title: Effective Go - The Go Programming Language
words: 16582
---
1. [Documentation](https://go.dev/doc/)
2. [Effective Go](https://go.dev/doc/effective_go)
...
## Introduction
Go is an open-source programming language that focuses on simplicity, reliability, and efficiency...
Search real OSS code with zero configuration:
$ ketch code "http.NewRequestWithContext" --lang go --limit 2
---
query: http.NewRequestWithContext
lang: go
backend: grepapp
result_count: 2
---
harness/harness registry/app/remote/clients/registry/client.go (line 207)
req, err := http.NewRequestWithContext(ctx, http.MethodGet, buildPingURL(c.url), nil)
https://github.com/harness/harness/blob/main/registry/app/remote/clients/registry/client.go
...
Web search works with zero configuration too — the default backend (auto)
falls back through the keyless providers, so there is no key to set first:
ketch search "golang error handling"
ketch search "golang error handling" --scrape # fetch + extract full content per result
ketch search "golang error handling" --multi # federate across every usable backend, rank-fused
ketch search "golang error handling" --random # pick one random backend, fallback to rest on failure
auto tries providers in a fixed order and returns the first that answers,
reporting which one served in the backend: field. It prefers whatever you
have actually configured — your own SearXNG or Degoog instance first, then any
provider you have set a key for — and only then the keyless hosted providers.
So setting a key is still how you get a specific provider and higher limits,
and you do not have to also set backend for it to take effect:
ketch config set brave_api_key <key> # auto now prefers Brave
ketch search "golang error handling" -b ddg # or pick a provider explicitly
To decide the order yourself, set search_order: auto then tries only the
backends you list, in that order (KETCH_SEARCH_ORDER overrides it per run):