ketch CLI

One binary for web search, code search, library docs and page scraping, with JSON output built for agents

  • 748 ★ on the repository
  • Last commit
  • MIT
CLI

Extended access

Why this level

  • Queries and page addresses go to the chosen search and scraping services, and your own cookies for closed pages are passed in a file.
  • Scraping and crawling load other people's resources and are subject to their rules.
All reasons and checks

1broseidon/ketch

Install

Manual install

curl -fsSL https://ketch.run/install | sh

The macOS and Linux script from the README picks the build for the system and verifies the release checksums.

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • Queries and page addresses go to the chosen search and scraping services, and your own cookies for closed pages are passed in a file.
  • Scraping and crawling load other people's resources and are subject to their rules.

This is third-party code. Review the repository files before installing.

What it does

ketch is a stateless Go CLI: call, result, exit, with no daemon or API server. It joins three research surfaces. `ketch search` searches the web without a key through Brave, DuckDuckGo, SearXNG and several other backends. `ketch code` searches real code across public repositories through Grep, Sourcegraph or GitHub code search. `ketch docs` pulls version-aware library documentation from Context7. `ketch scrape` and `ketch crawl` turn HTML and text PDFs into clean markdown. Every command takes `--json` and exit codes are documented for the agent's control flow. The operator picks a backend once and the agent never needs to know which provider sits behind it. There are three ways to connect it to agents: a ready skill from `skills/ketch/`, the `ketch mcp serve` MCP server over stdio and a Claude Code plugin that installs the skill and the server together.

Who it is for. Developers who need an agent for live web, code and documentation search without separate SDKs and keys for every service.

Good fit when

  • An agent has to find real examples of a function call in open repositories rather than invent them from memory.
  • Up-to-date documentation of a specific library version is needed so the agent does not rely on stale data.
  • Site pages and text PDFs have to be reduced to markdown for analysis or loading into a knowledge base.
  • A research task is handed to the agent end to end: search, reading sources and a cited summary.

Not a fit when

  • The search is over local code or private repositories, which other tools cover.
  • Pages are behind authentication and browser cookies must not be handed to the agent.
  • A browser that runs scripts and clicks is needed: ketch reads pages without one.

Example request

Use ketch to find how to use http.NewRequestWithContext correctly in Go and show two real examples from open repositories with links.

Limitations

Some backends work only with a provider key that the operator sets with `ketch config set`. `ketch docs` needs Context7. The Claude Code plugin and the pi package do not bundle the binary, so `ketch` 0.10.0 or newer must be on PATH. A running MCP server holds the page-cache lock, so parallel CLI calls run without the cache. The skill is not meant for local code, private repositories or pages behind authentication. Your own cookies for closed pages are passed as a `cookies.txt` file.

How to disable. Remove the plugin with `claude plugin uninstall ketch@ketch`, the MCP entry with `claude mcp remove ketch` and the binary with `brew uninstall ketch` or by hand.

FAQ

How do I connect ketch to Claude Code?

Through the plugin: `claude plugin marketplace add 1broseidon/ketch` and `claude plugin install ketch@ketch`. Or just the MCP server with `claude mcp add ketch -- ketch mcp serve`.

Is a key needed for web search?

No. The default `auto` backend runs through keyless providers. A key is needed only for separate paid backends such as Exa or Tavily.

Which MCP tools does the server have?

`search`, `code`, `docs`, `scrape`, `crawl` and `tag`. They use the same configuration and backends as the CLI.

How does ketch report errors to the agent?

Through documented exit codes, and in MCP through message prefixes: `[validation]`, `[not_found]`, `[upstream]`, `[precondition]`, `[cancelled]`.

Can pages be returned as JSON?

Yes, add `--json` to any command. For `ketch scrape` the result holds the URL, title and page markdown.

Discussion

No questions or reviews yet.

CLI tools

Three search skills: four-source search scored by intent, deep thread tracing and clean Markdown extraction from pages.

SkillExtended access438Repository stars

webctl searches the web for an agent, scores results with Jev and returns only useful chunks to save context.

CLIExtended access166Repository stars

A web research skill: SearXNG searches, Camofox reads pages and CloakBrowser opens sites that check their visitors

SkillBroad access546Repository stars
Editors’ pick

The Firecrawl command-line client with agent skills: web search, scraping, crawling, URL mapping and page interaction

CLIExtended access684Repository stars

MCP server for web search and crawling: SearXNG and You.com plus clean Markdown from pages, sites and logged-in areas

MCP serverExtended access190Repository stars

Two small skills: web search through your own browser with no paid API, and a preflight risk check before a meaningful change.

SkillExtended access81Repository stars

Comparison with similar tools

Cards that share the main search query, and how they differ.

ToolOfficialAuthenticationRepository starsMain difference
ketch (this card)no748
Context7yesAPI key64,735serves only library documentation as MCP; ketch combines it with web search, code search and scraping
Crawl4AIyesAPI key87,271a Python crawler focused on site traversal; ketch is one binary with search and version-aware docs

README in short

The README covers installation by script, Homebrew, npm and go install, a quick start with sample output and a table of commands and backends. Separate sections cover PDF extraction, tags as bookmarks for agents and connecting through MCP, the plugin and the pi package.

README badge

Original SKILL.md

---
name: ketch
description: "Research skill for ketch — a fast stateless CLI for web search, OSS code search, curated library docs, page scraping, and site crawling; an optional MCP server exists for operators who want it, but the CLI is the primary interface. Use when a question needs live sources: 'research X', 'what are people saying about Y', 'find docs or real-world examples for Z', 'scrape/crawl this site' — or when installing or configuring ketch backends. Routes search vs code vs docs vs scrape vs crawl, keeps every fetch inside a token budget, turns error prefixes into control flow, and produces cited syntheses. Not for local codebase search, private repos, or pages behind auth."
metadata:
  version: "0.1.0"
---

# Ketch

Route every live-source question to one of ketch's five research surfaces — search, code, docs, scrape, crawl — over the transport the operator gave you, with a token budget on every fetch and a source URL on every claim. ketch is one stateless binary — call, result, exit — with web search, OSS code grep, curated library docs, and page/site extraction together, so a complete research pipeline needs no other tool and no daemon.

## Transport: stateless CLI by default, MCP when the operator wired it

The CLI is ketch's identity: call → result → exit, `--json` on every call, exit codes as control flow, zero daemon. That is the default transport and the zero-infrastructure path. The MCP server is a supported alternative for operators who want it — never a prerequisite.

Decide once per session, before the first call:

1. `which ketch` succeeds → the CLI is your transport: `--json` on every call, exit codes as control flow.
2. Also check for ketch's tools in your tool list — the MCP tools `search`, `code`, `docs`, `scrape`, `crawl` and `tag` from a server named `ketch` (in Claude Code: `mcp__ketch__search`, …), or in pi the package's `ketch_search`, `ketch_code`, `ketch_docs`, `ketch_scrape`, `ketch_crawl` and `ketch_tag`. Present → the operator wired them up on purpose, and using them for research calls is correct and good: structured output, per-URL errors, the same options and error prefixes as MCP. Do not shell out around tools the operator set up. (pi's tools run the CLI for you, so the page-cache tradeoff in step 3 does not apply to them.)
3. Both live → either transport serves research calls, but know the tradeoff: a running MCP server holds the single-process page-cache lock, so concurrent CLI scrapes silently run cache-disabled.
4. Neither CLI nor MCP tools → ketch is not installed. Offer `brew install ketch`, `npm i -g ketch-cli` or `go install github.com/1broseidon/ketch@latest` — an operator action: propose, wait for confirmation.

The rule: **use the transport the operator gave you** — when both are live, either is fine for research calls, and operator actions are always CLI.

`tag` is the one exception to the operator-action rule below: it changes local state but the agent is both writer and reader, so it is published over MCP as well as the CLI.

Config discovery is CLI regardless of transport: `ketch config` prints effective settings and available backends as JSON; there is no config tool over MCP. Operator actions — `config set`, `cache`, `browser install`, `crawl --background`/`status`/`stop`, `doctor` — are deliberately not in MCP. They are always CLI.

## Glossary

Use only these terms in ketch output.

| Term | Meaning |
| --- | --- |
| **surface** | One of the five research operations: `search`, `code`, `docs`, `scrape`, `crawl` |
| **tag** | A label filed across surfaces: search hits, code hits, docs chunks, scraped pages, crawled pages. Not a research surface — it answers "what did I already find?", not "what is out there?" |
| **transport** | How a surface is called: the CLI binary (default), the optional MCP tools, or the pi package's `ketch_*` tools (which run the CLI) |
| **backend** | The provider behind a surface: auto (default; a fallback chain, not a provider)/brave/ddg/searxng/exa/firecrawl/keenable/tavily/tinyfish/parallel/serpbase/degoog/serply/youcom (search), grepapp/sourcegraph/github (code), context7 (docs) |
| **operator action** | A system-managing or diagnostic command — `config set`, `cache`, `browser install`, background crawls, `doctor` — CLI-only by design |
| **error prefix** | The stable class on every ketch error: CLI exit codes 2–6, mirrored as the bracketed prefix opening every MCP tool error — `[validation]`, `[not_found]`, `[upstream]`, `[precondition]`, `[cancelled]` |
| **fan-out** | How many queries are searched and URLs scraped under one plan |
| **token budget** | The per-call output bound: `max_chars`/`trim` on scrapes, `tokens` on docs, `limit`/`--minimal` on lists |
| **probe** | One cheap read-only call that tests whether a surface is configured and reachable |

## How to use this skill

Report a problem