@only-cli/oc 0.5.1 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -81,7 +81,7 @@ Works on any mostly-static site with no per-site setup: news sites, blogs, docum
81
81
  | website | command | shortcuts |
82
82
  | --- | --- | --- |
83
83
  | Hacker News | `oc hn` | `top`, `new`, `item <id>`, `user <name>` |
84
- | Reddit | `oc reddit` (via old.reddit.com) | `sub <name>`, `post <id>`, `user <name>`, `search <query>` |
84
+ | Reddit | `oc reddit` (via the Atom feeds on www.reddit.com) | `sub <name>`, `new <name>`, `top <name>`, `post <id>`, `user <name>`, `search <query>` |
85
85
  | GitHub | `oc gh` | `repo <owner> <name>`, `user <name>`, `search <query>`, `trending`, `issues <owner> <name>` |
86
86
  | X | `oc x` | `user <name>`, `post <id>` |
87
87
  | LinkedIn | `oc linkedin` | `profile <name>`, `company <name>`, `jobs <query>` (public guest views) |
@@ -168,12 +168,13 @@ Private and internal addresses are refused whether or not a proxy is set. With a
168
168
 
169
169
  ## Benchmarks
170
170
 
171
- Full methodology, per-task rows, and the Codex runs live in [only-cli/benchmarks](https://github.com/only-cli/benchmarks). Where things stand (oc 0.5.0, August 2026, live sites):
171
+ Full methodology, per-task rows, and the Codex runs live in [only-cli/benchmarks](https://github.com/only-cli/benchmarks). Where things stand (oc 0.5.1, September 2026, live sites):
172
172
 
173
- - **142x fewer tokens than raw HTML** across 15 real pages: 10,936 against 1,552,491. 14x fewer than Jina Reader, 49x fewer than Playwright MCP's accessibility snapshot.
174
- - **The only reader that returned real content on every page.** Reddit blocked curl, Jina Reader and Playwright; Jina also failed LinkedIn and Yahoo Finance; DuckDuckGo blocked lynx. oc's Chrome impersonation read all fifteen.
175
- - **Half the cost of Claude Code's built-in `WebSearch`** on Wikipedia lookups: $0.27 against $0.52 for five questions, both 5/5 correct, on 29x less fresh input.
176
- - **23% cheaper than `WebFetch` and 35% cheaper than `WebSearch`** on eleven language docs lookups, at equal or better accuracy.
173
+ - **125x fewer tokens than raw HTML** across the twelve real pages both could read: 8,519 against 1,064,474. 15x fewer than Jina Reader, 59x fewer than Playwright MCP's accessibility snapshot.
174
+ - **Real content on every page it could reach, and an honest failure on the two it could not.** Reddit now sends logged-out readers to a login wall, and every other tool returned that wall, or a 403 block page, as a success. Yahoo Finance refuses plain fetch outright and DuckDuckGo still blocks lynx; oc's Chrome impersonation read both.
175
+ - **Half the cost of Claude Code's built-in `WebSearch`** on Wikipedia lookups: $0.23 against $0.45 for five questions, both 5/5 correct, on 25x less fresh input.
176
+ - **21% cheaper than `WebFetch` and 34% cheaper than `WebSearch`** on eleven language docs lookups, at equal or better accuracy.
177
+ - **10% cheaper than `WebFetch` and 49% cheaper than `WebSearch`** on twelve dependency lookups across GitHub, npm, PyPI, RubyGems, crates.io, Docker Hub, Stack Overflow and an RFC, 12/12 correct with no tuned shortcut for most of those sites.
177
178
 
178
179
  The tables behind those numbers:
179
180
 
@@ -181,27 +182,30 @@ The tables behind those numbers:
181
182
 
182
183
  | method | tokens for 15 pages | notes |
183
184
  | --- | ---: | --- |
184
- | `oc open` | 10,936 | the only reader that returned real content on every page |
185
- | Jina Reader | 148,479 | both Reddit results are block pages; failed LinkedIn and Yahoo Finance outright |
186
- | Playwright MCP | 531,335 | accessibility snapshots; both Reddit snapshots are block pages |
187
- | raw HTML fetch | 1,552,491 | the stock quote page alone is 399,881 tokens |
185
+ | `oc open` | 8,971 | real content on 13 of 15 pages; the two Reddit pages are behind a login wall, and oc is the only reader that reported that instead of returning the wall |
186
+ | Jina Reader | 105,198 | both Reddit results are block pages; failed LinkedIn and the Node.js `fs` page outright |
187
+ | Playwright MCP | 531,303 | accessibility snapshots; both Reddit snapshots are the login wall |
188
+ | raw HTML fetch | 1,240,669 | both Reddit results are the login wall, 88,000 tokens of it each; Yahoo Finance refused the connection |
188
189
 
189
- oc's budget keeps every page near 500 tokens however much it weighs: the Yahoo Finance quote is 399,881 tokens raw and 456 through oc, Node's `fs` reference 273,820 against 475.
190
+ oc's budget keeps every page near 500 tokens however much it weighs: the YouTube watch page is 345,487 tokens raw and 688 through oc, Node's `fs` reference 275,425 against 479. On the twelve pages both could read, raw HTML costs 125x what oc does: 1,064,474 against 8,519.
190
191
 
191
- **Whole tasks against the agent's built-in web tools.** Read cost is one thing, what an agent actually spends is another, so a second set of suites runs full lookups end to end in Claude Code (`claude-sonnet-5`), one tool per run, and grades every answer. Five Wikipedia lookups and eleven language documentation lookups:
192
+ **Whole tasks against the agent's built-in web tools.** Read cost is one thing, what an agent actually spends is another, so a second set of suites runs full lookups end to end in Claude Code (`claude-sonnet-5`), one tool per run, and grades every answer. Five Wikipedia lookups, eleven language documentation lookups, and twelve lookups on the pages around a dependency, where oc has shortcuts only for GitHub and Stack Overflow and renders the rest generically:
192
193
 
193
194
  | suite | tool | correct | input tokens | cost | avg time |
194
195
  | --- | --- | ---: | ---: | ---: | ---: |
195
- | Wikipedia | `oc wiki` | 5/5 | 5,535 | $0.27 | 11s |
196
- | | built-in `WebFetch` | 5/5 | 128,792 | $0.37 | 14s |
197
- | | built-in `WebSearch` | 5/5 | 160,431 | $0.52 | 22s |
198
- | Language docs | `oc docs` | 11/11 | 12,965 | $0.57 | 9s |
199
- | | built-in `WebFetch` | 10/11 | 203,489 | $0.74 | 11s |
200
- | | built-in `WebSearch` | 11/11 | 209,782 | $0.89 | 15s |
201
-
202
- Input tokens are the fresh context each tool put in front of the model, which is the number the page size drives; totals including cache reads sit closer together because the agent's own prompt dominates them. oc stays flat at roughly 1,100 to 1,200 tokens per task, while `WebFetch` pays for whatever the page weighs, from 5.7x more on a short Wikipedia stub to 35x more on the German Berlin article. `WebFetch`'s one wrong answer is an access result: cppreference returns 403 to it, while oc's Chrome impersonation reads the same page. `WebSearch` was given only the question, never the URL, which is the honest way to use it and part of why it costs the most.
203
-
204
- The same suites through Codex (`gpt-5.6-sol`) split. On Wikipedia, `oc wiki` was cheaper and also right where Codex's own search quoted a stale Berlin population. On the docs lookups Codex's search won by 16%: those facts are already in its snippets, and it answered most tasks in two turns without opening a page.
196
+ | Wikipedia | `oc wiki` | 5/5 | 5,535 | $0.23 | 8s |
197
+ | | built-in `WebFetch` | 5/5 | 129,257 | $0.35 | 12s |
198
+ | | built-in `WebSearch` | 5/5 | 136,982 | $0.45 | 16s |
199
+ | Language docs | `oc docs` | 11/11 | 12,967 | $0.56 | 8s |
200
+ | | built-in `WebFetch` | 10/11 | 203,497 | $0.71 | 12s |
201
+ | | built-in `WebSearch` | 11/11 | 215,833 | $0.85 | 14s |
202
+ | Dependency research | `oc open` | 12/12 | 13,261 | $0.63 | 10s |
203
+ | | built-in `WebFetch` | 10/12 | 173,779 | $0.70 | 11s |
204
+ | | built-in `WebSearch` | 12/12 | 326,088 | $1.22 | 19s |
205
+
206
+ Input tokens are the fresh context each tool put in front of the model, which is the number the page size drives; totals including cache reads sit closer together because the agent's own prompt dominates them. oc stays flat at roughly 1,100 to 1,200 tokens per task, while `WebFetch` pays for whatever the page weighs, from 5.9x more on a short Wikipedia stub to 35x more on the German Berlin article. `WebFetch`'s three misses are access results: cppreference, npm, and Stack Overflow all refuse it, while oc's Chrome impersonation reads the same pages. The dependency suite is also where oc's generic renderer pays for hard pages: the JavaScript-only crates.io entry and a support table whose row spans several blocks each cost it eight turns, and on the two tasks that start a link away the built-in tools were cheaper. `WebSearch` was given only the question, never the URL, which is the honest way to use it and part of why it costs the most.
207
+
208
+ The same suites through Codex (`gpt-5.6-sol`, on the 0.4.0 and 0.5.0 runs) split. On Wikipedia, `oc wiki` was cheaper and also right where Codex's own search quoted a stale Berlin population. On the docs lookups Codex's search won by 16%: those facts are already in its snippets, and it answered most tasks in two turns without opening a page.
205
209
 
206
210
  ## Status
207
211
 
@@ -1,9 +1,11 @@
1
1
  {
2
2
  "domain": "reddit.com",
3
3
  "commands": {
4
- "sub": { "open": "https://old.reddit.com/r/{name}", "args": ["name"] },
5
- "post": { "open": "https://old.reddit.com/comments/{id}", "args": ["id"] },
6
- "user": { "open": "https://old.reddit.com/user/{name}", "args": ["name"] },
7
- "search": { "open": "https://old.reddit.com/search?q={query}", "args": ["query"] }
4
+ "sub": { "open": "https://www.reddit.com/r/{name}/.rss", "args": ["name"] },
5
+ "new": { "open": "https://www.reddit.com/r/{name}/new/.rss", "args": ["name"] },
6
+ "top": { "open": "https://www.reddit.com/r/{name}/top/.rss?t=week", "args": ["name"] },
7
+ "post": { "open": "https://www.reddit.com/comments/{id}/.rss", "args": ["id"] },
8
+ "user": { "open": "https://www.reddit.com/user/{name}/.rss", "args": ["name"] },
9
+ "search": { "open": "https://www.reddit.com/search.rss?q={query}", "args": ["query"] }
8
10
  }
9
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@only-cli/oc",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "Turn websites into a compact CLI so AI agents can browse without burning tokens.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -8,15 +8,15 @@ description: Token-efficient web browsing and web content extraction for AI agen
8
8
  Renders a web page as a compact, numbered terminal view instead of raw HTML. A typical page is under 500 tokens.
9
9
 
10
10
  ```
11
- npx --yes @only-cli/oc@0.5.1 open <url> compact view, numbered elements
12
- npx --yes @only-cli/oc@0.5.1 do <n> follow link [n], or read it if [n] is text
13
- npx --yes @only-cli/oc@0.5.1 find <query> where a string appears, or that place itself
11
+ npx --yes @only-cli/oc@0.5.2 open <url> compact view, numbered elements
12
+ npx --yes @only-cli/oc@0.5.2 do <n> follow link [n], or read it if [n] is text
13
+ npx --yes @only-cli/oc@0.5.2 find <query> where a string appears, or that place itself
14
14
  when only one matches
15
- npx --yes @only-cli/oc@0.5.1 next next ~500 tokens of the page already open
16
- npx --yes @only-cli/oc@0.5.1 read <n> full text of region [n]
17
- npx --yes @only-cli/oc@0.5.1 raw [url] whole page as markdown (--html for cleaned HTML)
18
- npx --yes @only-cli/oc@0.5.1 login seed cookies (--cookie, --domain, --expires)
19
- npx --yes @only-cli/oc@0.5.1 logout [session] forget a session: cookies and saved page
15
+ npx --yes @only-cli/oc@0.5.2 next next ~500 tokens of the page already open
16
+ npx --yes @only-cli/oc@0.5.2 read <n> full text of region [n]
17
+ npx --yes @only-cli/oc@0.5.2 raw [url] whole page as markdown (--html for cleaned HTML)
18
+ npx --yes @only-cli/oc@0.5.2 login seed cookies (--cookie, --domain, --expires)
19
+ npx --yes @only-cli/oc@0.5.2 logout [session] forget a session: cookies and saved page
20
20
  ```
21
21
 
22
22
  None of these except `open`/`do`/`raw <url>` fetch anything; they replay the page `open` already saved.