ketch  by 1broseidon

Stateless CLI for AI agentic web research and data extraction

Created 3 months ago
261 stars

Top 97.1% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

Ketch provides a fast, stateless Command Line Interface (CLI) that unifies web search, code search, library documentation lookup, and web scraping. It is designed for both human users seeking efficient terminal research and AI agents requiring predictable, structured output and simplified backend integration, thereby reducing the complexity of managing multiple provider SDKs.

How It Works

Ketch collapses diverse research functionalities—web search (Brave, DuckDuckGo, SearXNG, Exa), code search (Grep, Sourcegraph, GitHub), library docs (Context7), and scraping/crawling—into a single, self-contained binary. This approach eliminates the need for daemons or API servers. For AI agents, it offers predictable, structured JSON output and documented exit codes for robust control flow. It transparently handles JavaScript-rendered pages using a headless Chrome fallback and provides a unified configuration interface (ketch config) for discovering active backends, abstracting away provider-specific complexities.

Quick Start & Requirements

Installation is straightforward via Homebrew (brew install 1broseidon/tap/ketch), go install github.com/1broseidon/ketch@latest, or by downloading prebuilt binaries from the releases page. While many backends (like grepapp for code search) work out-of-the-box, some services (e.g., Brave search, Context7 docs) require free API keys configured via ketch config set. Official documentation and flag references are available at 1broseidon.github.io/ketch.

Highlighted Details

  • Unified Research Surfaces: Offers distinct commands for web search (search), OSS code search (code), library documentation (docs), URL scraping (scrape), and site crawling (crawl).
  • AI Agent Focus: Features --json output, documented exit codes (e.g., 2 for bad input, 4 for upstream failure), and a single ketch config call for backend discovery, simplifying agent integration.
  • Dynamic Content Handling: Automatically detects and re-fetches JavaScript-rendered pages (SPAs) using headless Chrome.
  • Efficient Scraping: Supports concurrent batch fetching, multiple input formats (URL list file, stdin, JSON array), and includes a page cache with a default 72-hour TTL.

Maintenance & Community

The project welcomes contributions via GitHub issues and pull requests. Specific community channels like Discord or Slack, or a public roadmap, are not detailed in the README.

Licensing & Compatibility

Ketch is released under the permissive MIT license, allowing for broad compatibility with commercial and closed-source projects.

Limitations & Caveats

While most core functionalities are available, the local backend for library documentation (docs) is noted as planned but not yet implemented. Configuration of API keys is necessary for certain search and documentation backends.

Health Check
Last Commit

1 day ago

Responsiveness

Inactive

Pull Requests (30d)
4
Issues (30d)
7
Star History
170 stars in the last 30 days

Explore Similar Projects

Starred by Travis Fischer Travis Fischer(Founder of Agentic), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
2 more.

suna by kortix-ai

0.2%
20k
Open-source AI agent for real-world task automation
Created 1 year ago
Updated 17 hours ago
Feedback? Help us improve.