[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-93003":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":15,"stars30d":16,"stars90d":15,"forks30d":15,"starsTrendScore":15,"compositeScore":17,"rankGlobal":10,"rankLanguage":10,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":21,"hasPages":19,"topics":22,"createdAt":10,"pushedAt":10,"updatedAt":23,"readmeContent":24,"aiSummary":25,"trendingCount":15,"starSnapshotCount":15,"syncStatus":26,"lastSyncTime":27,"discoverSource":28},93003,"ax","yusukebe\u002Fax","yusukebe","The AI-era curl","https:\u002F\u002Fax.yusuke.run\u002F",null,"TypeScript",361,6,1,0,143,52.54,"MIT License",false,"main",true,[],"2026-07-22 04:02:07","# ax\n\n**The AI-era curl: fetch, discover, extract. One command.**\n\nax is what a coding agent should reach for instead of `curl` piped into a throwaway parsing script. It fetches a page, helps the agent understand its structure, and extracts structured data — locally, deterministically, with output shaped for a context window.\n\n```sh\nax https:\u002F\u002Fapi.example.com\u002Fusers                     # curl parity — but never silent\nax https:\u002F\u002Fexample.com --outline                     # discover the page's structure\nax https:\u002F\u002Fexample.com '.item' --row 'title=a, href=a@href'\nax https:\u002F\u002Fdocs.example.com\u002Fguide --md --budget 800  # read docs as markdown\n```\n\n## Why\n\nCoding agents do one web loop constantly: **fetch → understand → extract**. Today that means `curl` (which prints _nothing_ on an empty body), eyeballing raw HTML in the context window (thousands of tokens), and a regex-over-HTML script that breaks the moment the markup shifts.\n\nax replaces the loop with one command:\n\n- **Fetch, never silent** — `{status, ok, ms, headers, body}` for every request. Empty bodies and error statuses still produce a full report. JSON bodies are parsed. Fetch mode never caches — every request is live. (`--body` gives you the classic pipe: body only on stdout.)\n- **Discover, don't dump** — `--outline` shows a page's repeating structures; `--locate 'text'` answers \"which selector holds this?\" — no raw HTML ever hits the context. Parse-mode URLs are cached for ~2 minutes so probing is free (every hit announced on stderr; `--fresh` refetches, `--no-cache` never touches the disk).\n- **Extract, structured** — `--row 'title=a, href=a@href'` pulls multi-field rows in one call; `--table` turns `\u003Ctable>` into keyed rows; `--where` filters with a safe expression language.\n- **Token-cheap by design** — results cap at 50 with a stderr note (never silent truncation), `--budget \u003Ctokens>` caps output by estimated tokens, rows default to header-once TSV (`--json` for JSON).\n\n## Install\n\n```sh\ncurl -fsSL https:\u002F\u002Fax.yusuke.run\u002Finstall | sh\n```\n\nTeach your agent: `npx skills add yusukebe\u002Fax` — or have it run `ax agent-context`.\n\n## Why not htmlq \u002F curl \u002F Firecrawl?\n\n**htmlq is a selector; ax is the loop.** htmlq covers one step (CSS selector → text) and can't fetch, so every use marries it to curl. Multi-field extraction means running it N times and zipping by hand — exactly the moment agents give up and write python. ax does fetch + discovery + structured rows + tables + filtering in one binary, with agent-shaped output.\n\n**curl is silent.** An empty 200 body prints nothing; agents re-run it with `-i`, `-w`, guessing. ax always reports.\n\n**Firecrawl & friends return markdown blobs via metered cloud APIs.** ax is local, deterministic, zero-key, and returns _structure_ (rows, tables), not just prose. (For JavaScript-heavy SPAs you still want a browser tool — ax is the fast path for everything else.)\n\n|                                                | throwaway python | curl + htmlq | ax  |\n| ---------------------------------------------- | :--------------: | :----------: | :-: |\n| fetch with a full report (status\u002Fheaders\u002Fms)   |   △ _write it_   |      ✗       |  ✓  |\n| structure discovery (`--outline` \u002F `--locate`) |        ✗         |      ✗       |  ✓  |\n| CSS-selector extraction                        |  △ _needs bs4_   |      ✓       |  ✓  |\n| multi-field rows in one call (`--row`)         |   △ _write it_   |      ✗       |  ✓  |\n| `\u003Ctable>` → keyed rows                         |   △ _write it_   |      ✗       |  ✓  |\n| easier selector repair after markup drift      |   ✗ _(regex)_    |      ✓       |  ✓  |\n| page → readable markdown (`--md`)              |        ✗         |      ✗       |  ✓  |\n| token-shaped output (caps, `--budget`, notes)  |        ✗         |      ✗       |  ✓  |\n| zero code authored per task                    |        ✗         |      ✓       |  ✓  |\n\n(△ = possible, but the agent writes and debugs the code every time — that authoring cost is the whole point.)\n\n## Measured\n\nReal headless Claude Code sessions, same task, with and without ax — answers graded, both sides correct in every run:\n\n| task (Opus 4.8, agent already knows ax)    | without ax   | with ax                 |\n| ------------------------------------------ | ------------ | ----------------------- |\n| two pages with markup drift (breaks regex) | $0.458       | **$0.150 (−67%)**       |\n| clean extraction from a 60-item catalog    | $0.296 · 24s | **$0.104 · 14s (−65%)** |\n| live website, decoy markup (median of 3)   | $0.248       | **$0.191 (−23%)**       |\n| markup drift, agent's first-ever use of ax | $0.664       | **$0.282 (−58%)**       |\n\nFull method — including the runs ax _lost_ — in [bench\u002FRESULTS.md](bench\u002FRESULTS.md).\n\n## The full flag reference\n\nRun `ax --help`, or `ax agent-context` for the agent-oriented playbook (also served at [ax.yusuke.run\u002Fllms.txt](https:\u002F\u002Fax.yusuke.run\u002Fllms.txt)).\n\n## Built with\n\n[Bun](https:\u002F\u002Fbun.sh) (single-file binary via `bun build --compile`) and [linkedom](https:\u002F\u002Fgithub.com\u002FWebReflection\u002Flinkedom) for standard-DOM parsing — the only runtime dependency.\n","ax 是一款面向 AI 编程代理的现代网页交互命令行工具，替代传统 curl + 解析脚本的组合。它将获取（fetch）、结构发现（outline\u002Flocate）和结构化提取（row\u002Ftable\u002Fwhere）三步整合为单命令，支持本地确定性执行、HTTP 元信息完整输出、CSS 选择器多字段提取、Token 预算控制及 Markdown 转换。所有解析在本地完成，无需网络 API 或密钥，输出专为上下文窗口优化（如 TSV 行格式、截断提示、结构化 JSON）。适用于 LLM 编程代理自动化 Web 数据采集、文档解析、API 响应调试等场景。",2,"2026-07-11 02:30:38","CREATED_QUERY"]