Commit Graph
37 Commits
Author SHA1 Message Date
only-cli 943192351a warn when a session can't be saved, instead of failing silently
Found while chasing an anomalous benchmark rerun: under a sandbox that
blocks writes outside its workspace (codex exec's default), 'oc open'
still renders fine but its session save throws, and the bare catch {}
swallowed it completely. The next 'oc do' then resolves against whatever
session last saved successfully, silently, with no sign the state is
stale. In one repro this served a Hacker News agent a Yahoo Finance page
under 'oc do 5' and it answered from that instead of erroring, which is
how a multi-step task ballooned to 250k tokens without a single wrong
tool call visible in the log.

This does not fix the staleness itself, that needs a design for detecting
a save failure across separate 'oc open' and 'oc do' invocations. It makes
the failure visible on stderr instead of invisible, which is the cheap
half of 'fail loud and cheap' and better than nothing while the real fix
gets designed. Verified manually against an unwritable OC_HOME; cli.js's
main() always calls the network fetcher, so an automated test here would
need fetch-mocking infrastructure this project has none of yet, and none
of cli.js has test coverage today.
2026-08-19 08:34:27 -04:00
only-cli 9873b7f492 add the Yahoo Finance cli and measure each agent's default browsing against oc
Yahoo Finance quote, news, history, lookup, markets, gainers, losers, and
trending pages all arrive server rendered (the AAPL quote page carries the
closing price in about 456 tokens of view against 325,000 of raw HTML), so
a definition ships for all eight. The README grows the comparison people
actually ask for: the same stock price task run through Claude Code and
Codex as they ship versus with oc, one live session each, wrong answer and
all. Codex read raw HTML and reported a price that is not on the page;
WebFetch's digest was cheaper than oc this run and the README says so
plainly rather than hiding it. Also a banner, badges, and an llms.txt
pointer, so both people and models skimming the repo can tell what it is.
2026-08-19 07:59:38 -04:00
only-cli 42906ced60 spend turns, not tokens: do <n> reads text, near-budget pages print whole, timelines render readably
Three changes with one motive: a second command costs an agent more than
the lines it saves. 'oc do' on a heading or text block now prints the read
instead of refusing, since refusing spends a whole turn naming the command
that should have run. A page that would finish within about four times the
budget is printed whole rather than cut, because the cut moves tokens into
a second command instead of saving them. And social timelines stopped
rendering as one fused paragraph: linkedom splits text nodes around
apostrophes, so fragments are merged back by parent node and edge
whitespace, block elements now end lines, and repeated button labels are
trimmed sooner than links because a button label is never the content.
With that, x.com profiles and posts read without a login, so a six line
cli definition ships for the two x.com pages that work.
2026-08-19 07:59:29 -04:00
only-cli 0435b386ae Lead the render with the page's main content
The budget was being spent on whatever came first in the document, which on
most pages is menus. On the Reddit thread the benchmark uses, all 500 tokens
went to nav, sidebar, and moderator boxes, so an agent that opened the page to
read the discussion had to escalate to oc raw to see a single comment.

distill now finds the content (main, role=main, a single article, else the
densest run of prose) and emits it first, with the rest of the page after it
under a divider. Nothing is dropped, so do <n> still reaches every link.

Link labels that repeat down a page go with it: a thread stamps permalink,
save, and report onto every comment, which cost more than the comments. The
count and three examples are printed in place, and oc raw still has them.

Same thread, before and after: 660 blocks to 254, whole compact page 4,184
tokens to 2,712, and the first view now holds comments instead of a sidebar.
Pages small enough to print whole keep document order.
2026-08-18 17:20:55 -04:00
only-cli 6aaa8f1975 add oc find <query> so a long page answers a lookup in one command
find searches the distilled page the session already holds, prints one line
per match with the number to read it by, and costs no fetch. It matches the
query as a phrase, case insensitive, and falls back to matching the words
separately when the phrase is not there.

On the reddit thread from the benchmark: 'oc find w3m' is 115 tokens against
9,670 for oc raw, and it lands on the numbers to read.
2026-08-18 16:16:43 -04:00
only-cli 0f7a38d44a add oc next and oc read <n> so a long page costs a screenful, not a refetch
The compact view was all or nothing: an agent that needed more than the 500
token budget had only oc raw, ten to twenty times the price. Now open saves
the distilled page, next continues it where the view stopped, and read <n>
prints one region in full. Headings and text blocks long enough to be cut are
numbered so they can be addressed, and the marker prices what it left behind.

On one Reddit thread: open 475 tokens, next 455, read 88, raw 9,670.
2026-08-18 16:11:46 -04:00
only-cli 79ddeebc2e implement oc do so agents can follow a numbered link
The compact view hides link URLs because printing them is most of what
makes a page expensive, which left an agent re-fetching the same page as
--json or raw just to learn where [15] pointed. oc open now saves the
handles it numbered to a small JSON file per session under ~/.only-cli
(OC_HOME relocates it), and oc do <n> resolves one and renders the target
exactly as open would. Search engine tracking redirects are unwrapped so a
result link opens the destination instead of a script page.

Errors name the command that fixes them, since agents read them: an
out-of-range number reports the valid range, an input says to use fill, a
button says the page handles it itself.

Two hops on Hacker News cost about 3k characters this way, against roughly
23k for the re-fetch route.
2026-08-18 15:00:36 -04:00
only-cli 3738f41825 readme: codex numbers from the six task run 2026-08-18 13:26:40 -04:00
only-cli babd5959d9 readme: six task agent benchmark, including multi step navigation 2026-08-18 13:15:07 -04:00
only-cli 3c735166f0 readme: note jina routes browsing through a third party 2026-08-18 13:02:16 -04:00
only-cli c59a9a7ae1 readme: codex agent results paragraph 2026-08-18 12:50:58 -04:00
only-cli 28fb94bc58 readme: turns, spend chart, and winner marks in the agent table 2026-08-18 12:39:46 -04:00
only-cli 45157e6441 readme: agent benchmark numbers from the skills run
Each claude -p session now loads a skill documenting its tool, so every
condition runs at its best. The multiplier on the page-view table is the
precise one: all six pages for less than half the tokens of the cheapest
rival, a single-screenshot floor.
2026-08-18 11:02:49 -04:00
only-cli 46d1695949 readme: benchmark section covers all eleven methods and the agent run
Page-view table now includes Playwright MCP snapshots, Browser Use state
messages, rendered HTML via Playwright and Selenium, and the computer-use
screenshot floors. New table for the end-to-end claude -p benchmark: the
agent finished all three tasks with oc on the fewest tokens and lowest
cost of any full-success condition, while raw curl, Jina Reader, and
Playwright MCP each burned 13 turns on the Reddit task and returned
nothing.
2026-08-18 10:47:49 -04:00
only-cli 853bbca853 feed reading: offline tests, readme row, and a raw-mode title fix
The feed fixture covers Atom entries (escaped bodies, self-closed
categories, bylines) and an RSS item with a CDATA body. Raw markdown of
a feed exposed an old quirk: cleanDocument removed the head before
toMarkdown read the title, so any page whose body lacked a matching h1
lost its title in raw mode. cleanDocument now captures the title first
and returns both.
2026-08-18 10:40:08 -04:00
only-cli bb214dcf59 read Atom and RSS feeds: Stack Overflow answers through the open /feeds door
Sites behind hard bot challenges often leave their feeds open. distill()
now detects feed XML, converts entries (title, byline, link, escaped HTML
body) into a plain HTML document, and everything downstream is unchanged.
fetch accepts xml content types. Ships a stackoverflow.com spec mapping
question/tag/user onto the feed URLs.

Live: oc open on a Stack Overflow question feed renders ~493 tokens vs
~29k for the page HTML, HTTP 200 where the HTML page is challenged.
2026-08-18 10:36:36 -04:00
only-cli 858755f979 readme: benchmark table now includes Jina Reader and lynx baselines 2026-08-18 10:09:23 -04:00
only-cli dfd3bd01b5 readme: refresh benchmark numbers from the 0.2.0-beta.1 run 2026-08-18 10:05:17 -04:00
only-cli b698ad468d ci: align setup-node with v7 used elsewhere 2026-08-18 10:02:24 -04:00
only-cli 97940355b2 release 0.2.0-beta.1: GitHub and LinkedIn site shortcuts v0.2.0-beta.1 2026-08-18 10:01:13 -04:00
only-cli 12256c7fea publish: drop OIDC debug logging now that trusted publishing works 2026-08-18 10:01:12 -04:00
only-cli b218ba367e publish: print OIDC claims to debug trusted publisher matching 2026-08-18 09:54:51 -04:00
only-cli 3e1fbb6c87 publish: temporary http-level logging to trace the OIDC exchange 2026-08-18 09:49:31 -04:00
only-cli b536cc2ccf publish fix, GitHub and LinkedIn site definitions
setup-node's registry-url writes an npmrc auth-token line with a
placeholder token, which npm used instead of OIDC and got a 404 from
the registry. Dropping registry-url lets trusted publishing work.

New clis: github.com (repo, user, search, trending, issues) and
linkedin.com (profile, company, jobs; public guest views work through
the Chrome fingerprint). Both verified live before shipping.
2026-08-18 09:48:04 -04:00
Mark CliandGitHub 96873e4b8f Merge pull request #1 from only-cli/dependabot/github_actions/actions/checkout-7
build(deps): bump actions/checkout from 4 to 7
2026-08-18 09:47:22 -04:00
Mark CliandGitHub ceda4e035f Merge branch 'main' into dependabot/github_actions/actions/checkout-7 2026-08-18 09:47:09 -04:00
Mark CliandGitHub 41fedb2bac Merge pull request #2 from only-cli/dependabot/github_actions/actions/setup-node-7
build(deps): bump actions/setup-node from 4 to 7
2026-08-18 09:46:34 -04:00
dependabot[bot]andGitHub 8dc8233824 build(deps): bump actions/setup-node from 4 to 7
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4 to 7.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v4...v7)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-18 13:43:14 +00:00
dependabot[bot]andGitHub 356e4d3ab4 build(deps): bump actions/checkout from 4 to 7
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 7.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v7)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-18 13:43:08 +00:00
only-cli 3e5e2979a5 dependabot: weekly update PRs for npm deps and CI actions 2026-08-18 09:42:30 -04:00
only-cli 6b11896336 repo is only-cli/oc, matching the npm name @only-cli/oc
With the package scoped, owner/repo and scope/name line up exactly:
github.com/only-cli/oc is npm @only-cli/oc is the oc command. The skill
installs with npx skills add only-cli/oc.
2026-08-18 09:39:09 -04:00
only-cli 0b8bfa2a7b publish as @only-cli/oc
npm rejects the unscoped name only-cli as too similar to the existing
onlycli package, so the package lives in the org scope with the binary
name. The command is still oc and the repo is still only-cli/only-cli;
install snippets across README, SKILL.md, llms.txt, and the benchmark
docs now say npx @only-cli/oc.
2026-08-18 09:38:28 -04:00
only-cli f81ff04fa8 readme: supported websites, benchmark results, llms.txt for discovery
The README now lists the tuned site shortcuts (Hacker News, Reddit,
DuckDuckGo, Bing) next to the generic engine, and cites the live
benchmark numbers from only-cli/benchmarks. llms.txt gives AI assistants
a one-page summary to index. npm keywords added for search.

The internal build spec moves out of the published repo.
2026-08-18 09:32:42 -04:00
only-cli c758ab2298 commit the lockfile and add npm release channels
npm ci in CI requires package-lock.json, so stop ignoring it; it pins CI
and contributor installs only, consumers never see it.

publish.yml now maps release channels to npm dist-tags: latest, beta,
alpha (from the version suffix of a GitHub release) and dev (manual runs
stamp a unique 0.x.y-dev.N version per build). Publishing a prerelease
version to latest fails loud.
2026-08-18 09:24:29 -04:00
only-cli b50e9ca395 ci: run tests on push and pull request 2026-08-18 09:23:00 -04:00
only-cli 9b68dc2ec9 point repo references at only-cli/only-cli
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.
2026-08-18 09:16:41 -04:00
only-cli dcc0531ef3 only-cli v0.1: turn websites into a compact CLI for AI agents
Generic distillation engine (no per-site adapters): fetch via impers
impersonating Chrome with a firefox-fingerprint retry, distill to an
interaction tree, render under a hard token budget with numbered action
handles. Raw mode emits markdown via turndown or cleaned HTML. Per-site
CLI definitions for HN, Reddit, Bing, DuckDuckGo. Offline test suite,
agent skill, OIDC publish workflow.
2026-08-18 09:01:41 -04:00