Star on GitHub

The AI-era curl
ax — fetch, discover,
extract. One command.

Local HTTP and HTML I/O for coding agents. One command instead of curl + throwaway Python — structured, token-cheap, capped by default, never silent.

1installcurl -fsSL https://ax.yusuke.run/install | sh
2teach agentax is installed. Run `ax agent-context` to learn it — use it instead of throwaway scripts.
# what's on this page?
$ ax https://shop.example --outline
   80  .prod
# pull it out, structured
$ ax https://shop.example '.prod' \
  --row 'name=h3, price=.price'
name        price
Desk Lamp   $29
Mug         $12
...
ax: note: 80 rows extracted, no empty fields

Coding agents keep writing this.

before — real agent session: 3m 19s · 8.6k tokens
python3 - <<'PY'
import re
h=open('page.html',errors='replace').read()
blocks=re.findall(
  r'<li class="lesson">([\s\S]*?)</li>',h)
rows=[]
for b in blocks:
  href=re.search(r'href="([^"]+)"',b)
  title=re.search(r'<a [^>]*>([^<]+)</a>',b)
  ...
PY
after — one ax command
ax https://site.example '.lesson' \
  --row 'title=a, href=a@href, level=.cefr'

title        href            level
Small talk   /lesson/1.htm   A2
Directions   /lesson/2.htm   A2
...
ax: note: 50 rows extracted, no empty fields

Fetch. Discover. Extract.

01

fetch

curl-like fetching for agent workflows: every request yields a structured report instead of silent failure.

ax https://api.site.example/users
→ { "status": 200, "ok": true,
    "ms": 84, "headers": {...},
    "body": [...] }
02

discover

Understand an unknown page without dumping raw HTML into context.

ax https://site.example --outline
   50  div.lesson
ax https://site.example --locate 'text'
ax https://site.example '.card' --count
03

extract

CSS selectors → structured rows. Easier for agents to repair than regex when markup changes.

ax url '.item' --row 'title=a, href=a@href'
ax url 'table' --table --where 'Stars > 100'
ax url --md --budget 800   # docs as markdown

Versus the usual local fallback.

What agents reach for inside a coding session: python snippets, htmlq-style selector tools, and ax.

pythonhtmlqax
fetch with a full report (status / headers / ms)
structure discovery (--outline / --locate)
multi-field rows in one call (--row / --table)
easier selector repair after markup drift
page → readable markdown (--md)
token-shaped output (caps, --budget, never-silent notes)
zero code authored per task

△ = possible, but the agent writes and debugs the code every time — that authoring cost is the point.

Benchmarked on real agent sessions.

Markup drift across two pages — where regex scripts break (Opus 4.8)−67% costwithout ax $0.458 → with ax $0.150
Structured extraction from a 60-item catalog page (Opus 4.8)−65% costwithout ax $0.296 / 24s → with ax $0.104 / 14s
Live website, real internet, decoy markup — median of 3 runs (Opus 4.8)−23% costwithout ax $0.248 → with ax $0.191
Same drift task, the agent's first-ever use of ax — cost of reading the docs included−58% costwithout ax $0.664 → with ax $0.282

Agent already knowing ax (except the last row). Both sides correct in every run. Method, prompts, variance notes and the failed runs — in the repo.

Built for agents, not just humans.

ax agent-context prints the full manual, offline. Paste the prompt for one session, or install the skill to make it stick.

teach agentax is installed. Run `ax agent-context` to learn it — use it instead of throwaway scripts.
add skillnpx skills add yusukebe/ax

Install