only-cli/oc

Turn any website into a compact CLI tailored for AI agents. Browse the web in hundreds of tokens, not tens of thousands.

What it solves

only-cli/oc reduces the token cost and noise for AI agents browsing the web. Raw HTML pages often contain tens of thousands of tokens of markup, which wastes context window space and increases costs. This tool converts websites into a compact, numbered command-line interface (CLI) that agents can navigate efficiently without needing per-site adapters or browser extensions.

How it works

The tool fetches web pages and renders them as a distilled, numbered view. Instead of raw HTML or screenshots, it provides a concise summary where links and regions are assigned numbers. Agents can then interact with the page using specific commands:

  • oc open <url>: Fetches and renders a page.
  • oc do <n>: Follows a numbered link or reads a numbered text region.
  • oc read <n>: Retrieves the full text of a specific region (up to 2,000 tokens).
  • oc find <query>: Searches for a string on the current page.
  • oc next: Loads the next segment of a page that exceeded the token budget.

It uses Chrome impersonation to bypass naive bot blockers and supports authenticated sessions via cookie imports. It also includes pre-configured shortcuts for popular sites like GitHub, Reddit, and various technical documentation hubs (e.g., Python, MDN, AWS) to simplify navigation.

Who it’s for

It is designed for AI agents (such as Claude Code, Cursor, Codex, and Copilot) and developers building agentic workflows that require web browsing capabilities while minimizing token consumption.

Highlights

  • Token Efficiency: Keeps page renders near a 500-token budget, significantly reducing input costs compared to raw HTML or accessibility snapshots.
  • Bot Bypass: Impersonates a real browser to access sites that block simple fetchers.
  • Site Shortcuts: Built-in specialized commands for dozens of major websites and documentation sources.
  • Session Management: Supports authenticated browsing through secure cookie jars.
  • Agent Integration: Provides a dedicated skill for easy installation into compatible AI agent frameworks.

Related

  • Project
  • Project
  • Project
  • Project
  • Project