The GitHub repo is renamed from oc to only-cli so the repo, the npm package, and the skills.sh install path all share one name.
only-cli
Turn most website into a command line interface, so AI agents like Claude Code, Codex, and Antigravity can browse without burning tokens on raw HTML or screenshots.
A typical page is tens of thousands of tokens of markup. The signal on it fits in a few hundred. only-cli fetches the page, distills it into a compact text view with numbered actions, and lets an agent drive the site by number:
$ oc open news.ycombinator.com
# Hacker News
[1] Show HN: I built a tiny CSV toolkit
[2] 312 comments
...
actions: do <n> | raw <url>
$ oc do 1
No per-site adapters required, no browser extension, no daemon. One generic distillation engine, three runtime dependencies, and a hard token budget on everything it prints.
Install
npm install -g only-cli
Requires Node 20+. Requests go through impers impersonating Chrome; if impers is unavailable the tool falls back to native fetch.
For AI agents
The fastest setup is one line in your agent's instructions file (CLAUDE.md, AGENTS.md, or equivalent):
When you need content from a web page, run
npx only-cli open <url>instead of fetching raw HTML. Runnpx only-cli --helponce to learn the commands.
Claude Code users can install the skill instead: copy skills/only-cli/ into your project's .claude/skills/ directory (or ~/.claude/skills/ to enable it everywhere). A skill costs almost no tokens until the agent actually invokes it, which fits how this whole project thinks. The same skill also installs through the skills.sh directory into Claude Code, Cursor, Codex, Copilot, and others:
npx skills add only-cli/only-cli
No setup at all also works: npx only-cli runs without a global install, and the tool teaches its own command surface through --help, the actions: line at the bottom of every render, and error messages that name the next command to run.
Commands
oc open <url> fetch and render a page with numbered actions
oc raw <url> distilled markdown of the whole page
oc do <n> activate a numbered element (v0.2)
oc fill <n> <text> type into a numbered input (v0.2)
oc submit [n] submit a form (v0.2)
Flags: --budget <tokens> (default 500), --json, --html (raw as cleaned HTML instead of markdown), --verbose/-v (metrics on stderr: tokens saved vs the page HTML, HTTP status and client identity, timing, transfer size, memory; alias --stats, or export OC_VERBOSE=1). Metrics are off by default because they cost tokens too; agents should pass --verbose only when running verbosely.
Status
Early. v0.1 covers static pages, budget-aware rendering, and offline tests. Sessions and actions land in v0.2, a lazy headless fallback for script-heavy pages in v0.3. The roadmap and all design constraints live in PROMPT.md; how to contribute is in CONTRIBUTING.md.
Known limits, honestly: no JavaScript rendering yet, no sites behind logins yet, and pages behind hard bot challenges may still refuse the tool.
Contributors
- only-cli, creator and maintainer
License
MIT