Micro-CLI oc cuts a 6-page browse to 1,936 tokens

oc is an open-source command-line tool that turns a web page into a short numbered list of links and text blocks. Coding agents like Claude Code, Codex and Antigravity can step through that list instead of reading raw HTML or a screenshot. The project ran its own session-level benchmark on August 19, and it shows a smaller gain than the page-level figures suggest. For Claude Code, the main benefit is reaching pages its built-in tools can’t open, and on one task the default fetch was cheaper.
The README on GitHub puts the core claim plainly: “A typical page is tens of thousands of tokens of markup; the view above fits in a few hundred.” The tool needs no per-site adapters, no browser extension and no daemon. It is MIT-licensed, and the GitHub account only-cli is listed as creator and maintainer.
How a page becomes a menu
Running oc open news.ycombinator.com returns a heading and numbered entries such as [1] Show HN: I built a tiny CSV toolkit. A closing line lists the next moves: actions: do <n> | read <n> | next | raw. Every render ends with that line, so the agent learns the interface by using it. oc do 1 follows link [1], or reads it if [1] is text.
The agent never handles a URL. oc open saves the page it rendered as a JSON file per session under ~/.only-cli (you can move it with OC_HOME), so oc do 3 resolves [3] from that file. The skills.sh listing for the tool says only open, do and raw <url> fetch anything. The other commands replay the page that open already saved.
Each render has a token budget, 500 by default, which you can change with --budget. When a page runs past it, the output says what was left out, and three commands get the rest without downloading the page again. oc find <query> shows where a string appears. oc read <n> returns the full text of region [n], up to 2,000 tokens. oc next shows the next budget’s worth. The README calls the budget a target rather than a hard cap: a page that would run only a little over is printed whole, “since one extra tool call costs far more than the tokens it would have saved.” Elsewhere in the repository, though, the 500-token budget per render is described as hard capped.
The other half of the job is getting the page at all. Requests go out through impers, a library that makes them look like Chrome to the server. The repository says that when a site, or the local copy of libcurl-impersonate, refuses the Chrome identity, the request downgrades to Firefox. If impers is unavailable or refuses both, oc falls back to native fetch.
On mostly-static sites (news, blogs, documentation, forums, search engines), oc works without any per-site setup. The clis/ folder adds tuned shortcuts for the following sites:
- Hacker News
- Reddit, through old.reddit.com
- GitHub
- X
- LinkedIn’s public guest views
- DuckDuckGo
- Bing
- Stack Overflow, through its Atom feeds
- Yahoo Finance
- YouTube
From the outside, the pages on X, Stack Overflow and YouTube look login-gated or JavaScript-only. On those three sites, oc reads the server-rendered HTML, feed or inline data that the page already ships without a login. It doesn’t yet handle pages that render only with JavaScript, sites behind logins, or hard bot challenges that expose no feed.
What the benchmarks measure
The README’s headline test covers six live pages, including a news front page, a Reddit discussion and a search results page. Across all six, oc used 1,936 tokens, Jina Reader used 16,402 and a raw HTML fetch used 177,685. oc was the only method that returned real content on every page: Jina Reader was blocked on the Reddit page, and the raw fetch on the search page. The project site uses a different set: four pages at 1,444 tokens against 65,372 as raw HTML, which it sums up as “45× fewer tokens”. It also gives a single Reddit thread at 477 tokens against 52,899.
The site has a second table that counts whole agent sessions, with one live run per row and each agent using its own default tools. The cost column is an estimate, not a measured bill, based on Claude Code’s measured rate of about $0.61 per 1,000 tokens. The multi-hop task asked the agent to open r/ClaudeAI’s front page, follow the top post into its comments and report what the top comment argues:
- Codex with oc: correct, 112,794 tokens, 6 turns, about $0.07
- Codex with its default tools: correct, 301,009 tokens, 12 turns, about $0.18
- Claude Code with oc: correct, 250,628 tokens, 8 turns, about $0.15
- Claude Code with its default tools: failed, 196,675 tokens, 7 turns, about $0.12
For Codex, oc cut both tokens and turns. Without it, Codex fell back on its own web search and curl, at 2.7 times the cost. For Claude Code, the gain in that table comes from reaching the page at all. The project says WebFetch and WebSearch are blocked from reddit.com outright, and that Claude Code has no shell to fall back on by default. With oc, Claude Code got the right answer but spent more tokens than the run that failed.
The single-page task, Yahoo Finance’s AAPL quote, makes the same point. In the project’s own table, Claude Code’s default WebFetch is the cheapest correct answer, at 123,866 tokens and about $0.08. Claude Code with oc was also correct, at 198,976 tokens and about $0.12. Codex’s default tools never opened the page and reported a stale price, so that run is listed as failed.
Installing it
A global install is npm install -g @only-cli/oc and needs Node 20 or later. npx @only-cli/oc runs it with no install at all. The README suggests adding one line to CLAUDE.md, AGENTS.md or an equivalent file:
When you need content from a web page, run npx @only-cli/oc open <url> instead of fetching raw HTML. Run npx @only-cli/oc --help once to learn the commands.
Claude Code users can install it as a skill instead. You can copy skills/only-cli/ into .claude/skills/ or run npx skills add only-cli/oc. The skills.sh route also works in Cursor, Codex, Copilot and other agents, and that listing pins version 0.5.8.
Other flags:
--json--html, the raw page as cleaned HTML--session <name>--verboseorOC_VERBOSE=1, which prints metrics on stderr
Versions and the name clash
The README says v0.1 covers static pages, budget-aware rendering and offline tests, and that sessions, do, find, read and next are already in. It plans fill, submit and back for v0.2, and a lazy headless fallback for script-heavy pages in v0.3. The site’s command table labels versions differently:
openandraw: v0.1do,find,nextandread: v0.2- site shortcuts: v0.4
loginandlogout: v0.5fillandsubmit: still marked “Planned”
The README also warns that rendered page text is data, not instructions. A page can contain text written to look like a command, and anything oc prints should be treated as content to read, never as directions to follow.
The name causes a more immediate problem. Red Hat OpenShift also installs a binary called oc, and both tools define login and logout with unrelated meanings. Whichever comes first on PATH hides the other. The README suggests running the tool through npx @only-cli/oc, or giving the global install a different alias.
Up next
Round Hill sues Anthropic and Suno, damages could top $1B
Round Hill’s CEO told Reuters he’s taking both suits to trial rather than settling for anything that leaves songwriters undercompensated. The Anthropic complaint says at least 500 of its songs trained Claude.
Related stories
- Tokendoctor cut its author’s Claude Code cost 38%
- memsaga gives Claude Code’s memory files a git history
- Intent-lens spells out Claude Code calls before they run
- Codedict cuts Claude Code tokens 63%, but cost only 26%
- claude-files-pane shows Claude Code’s file reads live
- lcc cut one Claude Code session 49.5% without a summary
Comments
No comments yet. Be the first.
Join the conversation
Sign in to leave a comment. It appears after moderation.

