← all repositories
only-cli/oc

A browser that fits in a prompt

oc turns any website into a compact, numbered CLI so AI agents can browse without drowning in HTML tokens.

505 stars JavaScript Coding AssistantsAgentsData Tooling
oc
Collecting fresh signals — velocity needs a few days of history.
collecting data…
star history

What it does

oc fetches web pages and renders them as tight, numbered text summaries that fit inside an LLM’s context window instead of dumping raw HTML. It acts like a headless browser that speaks Markdown, impersonating Chrome or Firefox to slip past bot blocks that would stop a simple curl. The tool also ships with domain-specific shortcuts—oc hn top, oc gh repo, oc reddit sub—that resolve to the right URLs without the agent needing to know a site’s address bar grammar.

The interesting bit

The cleverness is in the workarounds. When Reddit blocks logged-out visitors, oc falls back to Atom feeds; when Stack Overflow serves a bot challenge, it routes through the Stack Exchange API; when Python’s docs ship a static search index, oc downloads and ranks it locally. It is essentially a curated bag of scraping heuristics dressed up as a uniform CLI.

Key highlights

  • Renders typical pages down to a few hundred tokens from tens of thousands of markup tokens
  • No browser extension, no daemon, no per-site configuration required for mostly-static sites
  • Authenticated sessions via manually seeded cookies for pages behind login walls
  • Site shortcuts for Hacker News, GitHub, Reddit, X, Stack Overflow, major documentation sets, and more
  • Graceful degradation request chain: Chrome impersonation → Firefox → native fetch

Caveats

  • Reddit rate-limits anonymous clients aggressively; back-to-back requests within half a minute return 429 and refusals can take minutes to clear
  • Form interaction (oc fill, oc submit) is marked as planned but not yet implemented
  • JavaScript-only sites and pages with hard bot challenges that expose no feed or API are explicitly not supported

Verdict

Worth a look if you are building AI agents that need to read documentation, forums, or news without burning context windows on markup soup. Skip it if your workflow depends on heavy JavaScript SPAs or interactive form submission.

Frequently asked

What is only-cli/oc?
oc turns any website into a compact, numbered CLI so AI agents can browse without drowning in HTML tokens.
Is oc open source?
Yes — only-cli/oc is open source, released under the MIT license.
What language is oc written in?
only-cli/oc is primarily written in JavaScript.
How popular is oc?
only-cli/oc has 505 stars on GitHub.
Where can I find oc?
only-cli/oc is on GitHub at https://github.com/only-cli/oc.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.