only-cli (oc)

only-cli

The oc CLI turns a web page into compact numbered text for an AI agent, so docs and issues stop eating the context window

  • 547 ★ on the repository
  • Last commit
  • MIT
CLIOfficial

Extended access

Why this level

  • Reaches any address the agent names, and some commands call public APIs like GitHub and Reddit
  • Stores saved pages and session cookies in ~/.only-cli, and cookies open access to your accounts for their lifetime
  • Text from third-party pages enters the agent's context and may contain prompts dressed as commands
All reasons and checks

only-cli/oc

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add cli/only-cli

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

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

  • Reaches any address the agent names, and some commands call public APIs like GitHub and Reddit
  • Stores saved pages and session cookies in ~/.only-cli, and cookies open access to your accounts for their lifetime
  • Text from third-party pages enters the agent's context and may contain prompts dressed as commands

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

What it does

only-cli installs an `oc` command that turns a website into a command-line interface for an AI agent. `oc open <url>` fetches a page and returns a compact view with numbered elements and a line of available actions. A typical page weighs tens of thousands of tokens of markup, and this view fits a budget of about 500 tokens. oc never cuts long material silently. `oc find`, `oc read <n>` and `oc next` read the rest without refetching, `oc raw` returns the whole page as Markdown, and `oc do <n>` follows link number n. A JSON API reads as a page: one item per record, with shared fields stated once. Requests carry a Chrome browser fingerprint through the impers library. If a site does not accept it, oc retries with a Firefox fingerprint and then with a plain Node.js fetch. A page with no readable text, such as a JavaScript-only page or a consent wall, is flagged with exit code 2, and the tool never passes a title off as a result. Popular sites get short commands like `oc hn top`, `oc gh repo <owner> <name>` and `oc npm pkg react`. Ready entries cover Stack Overflow, Wikipedia and programming language docs, and `oc sites` prints the full list. For sites behind a login, `oc login` accepts your cookies.

Who it is for. For developers who ask Claude Code, Codex or Cursor to read docs, issues and packages and want pages not to eat the context.

Good fit when

  • The agent searches MDN, Python or Node.js docs with commands like `oc mdn search` and gets a short list of links
  • Checking a dependency before an upgrade: `oc npm pkg react` returns the version, license, engines and dependencies in about 70 tokens
  • You need a quick look at an issue, pull request, releases or a file on GitHub with `oc gh issue`, `oc gh pr` and `oc gh file`
  • The task involves a JSON API: each record prints as one item, and repeated fields are stated once
  • A page is available only after login, and you give the agent your cookies with `oc login` for a limited time

Not a fit when

  • The page is built only with JavaScript: the tool has no script rendering yet
  • You need to fill forms, press buttons or submit data: the `fill`, `submit` and `back` commands are announced but not implemented
  • The site answers with a bot check and exposes no feed or public data: the tool cannot read such pages yet
  • You need to look at a page's layout: the tool returns text and structure, and there are no screenshots

Example request

Open our repository's releases page on GitHub through oc, find the latest dependency changes and tell me what broke the build

Limitations

  • The project is early. Reading works and has offline tests, while writing and clicks are not implemented. There is no JavaScript rendering, and pages behind hard bot protection may refuse.
  • Node.js 20 or newer is required. On a machine with OpenShift the `oc` command clashes with its same-named tool: call it only through `npx @only-cli/oc` or alias it differently.
  • The tool refuses addresses on private and internal networks. A proxy is read from the HTTP_PROXY and HTTPS_PROXY variables, and schemes like socks5 are not supported.
  • Anonymous Reddit meters requests: a second command within thirty seconds can return 429. Site availability depends on your network, and LinkedIn is blocked in Russia.
  • Cookies live one hour by default, with at most 50 in a session jar.

How to disable. `npm uninstall -g @only-cli/oc` removes the CLI. Saved pages and cookies live in `~/.only-cli`: sessions go with `oc logout` and `oc session rm`, or you can simply delete the folder. The Claude Code plugin is removed through `/plugin`.

FAQ

How do I install only-cli in Claude Code?

The skill installs with `npx skills add https://github.com/only-cli/oc --skill web-browsing-cli`, and the plugin with `/plugin marketplace add only-cli/oc` and `/plugin install only-cli@only-cli`. The shortest route is a line in CLAUDE.md telling the agent to run `npx @only-cli/oc open <url>` instead of fetching raw HTML.

How is oc different from the built-in WebFetch and WebSearch?

oc returns a page within a budget of about 500 tokens, while the built-in tools pay for the full page weight. On 11 language docs lookups oc came out 21% cheaper than WebFetch and 34% cheaper than WebSearch. cppreference, npm and Stack Overflow pages did not open through WebFetch, and oc read all three.

How does oc read pages behind a login?

Copy the Cookie header from developer tools and pipe it through stdin: `printf %s "session=..." | oc login --cookie - --domain example.com --expires 2h --session work`. Then `oc open https://example.com/dashboard --session work`. Cookies sit in a separate owner-only file and never reach `--json` output, and `oc logout work` wipes the session.

Why did oc exit with code 2?

The page came back with no readable text: it is built on JavaScript or sits behind a consent wall. Code 2 differs from other errors, and in `--json` mode the verdict is in the `empty` field. The agent sees the page is empty and brings in a browser only when it is worth the cost.

What if the machine already has OpenShift's oc?

Both tools define the login and logout commands differently, and whichever comes first on PATH shadows the other. Call only-cli through `npx @only-cli/oc` or alias the global install to another name.

Discussion

No questions or reviews yet.

CLI tools

Turns any website into a CLI command and lets an agent drive the user's already logged-in browser via Playwright

CLIBroad access30.8KRepository stars

A real browser inside the terminal with a CLI for the agent: a coding agent opens sites and interacts with them in the same tab

CLIBroad access4.3KRepository stars

A CLI and MCP server that lets an agent drive your real Chrome with its logged-in sessions: 103 commands across 36 platforms plus browser automation

CLIBroad access6.3KRepository stars

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

SkillBroad access539Repository stars

A Claude Code plugin with an MCP server and seven skills: the agent drives a real browser by writing Python code

PluginBroad access279Repository stars
Editors’ pick

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

CLIExtended access674Repository stars

Comparison with similar tools

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

EntryOfficialAuthenticationRepository starsMain difference
only-cli (oc) (this entry)yes547
Fetcher MCPnonot required1,088an MCP server that opens pages in headless Chromium through Playwright
webclawnonot required2,407a local Rust tool for extracting web content and crawling sites

README in short

The README opens with sample output and installation, then covers agent setup, the commands and a table of supported sites. Sections on sessions, cookies and proxies explain where state lives and which addresses the tool refuses. Across fourteen pages oc spends 118 times fewer tokens than raw HTML, and on whole tasks the gain is tens of percent.

README badge

Report a problem

Foxx AIonly-cli (oc)
Foxx AI

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.