ax html
CSS selectors, structured rows, tables, and discovery for unknown pages.
ax html url '.card' --row 'title=a' ax html url 'table' --table ax html url --outline / --locate
A scriptless multitool for AI agents. Extract from HTML, query JSON and YAML, process text, decode and convert — in one line instead of a python heredoc. Token-cheap output, structured errors, capped by default.
curl -fsSL https://ax.yusuke.run/install | shThe ax CLI is installed. Run `ax agent-context` to learn it, then use it instead of writing throwaway python/regex scripts.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)
...
PYax html page.html '.lesson' \
--row 'title=a, href=a@href, level=.cefr'
[
{ "title": "Small talk",
"href": "/lesson/1.htm",
"level": "A2" },
...
]CSS selectors, structured rows, tables, and discovery for unknown pages.
ax html url '.card' --row 'title=a' ax html url 'table' --table ax html url --outline / --locate
A jq-subset path language plus --where expressions.
ax json api.json '.items[].name' ax json api.json '.users[]' \ --where 'age > 20'
Same paths, same flags — for compose, CI, k8s configs.
ax yaml compose.yml \ '.services[].image' --raw
grep, extract, frequency tables — the shell idioms, built in.
ax text app.log --grep 'ERROR' --count
ax text a.css --extract '#\w{6}' --freqbase64, url, hex, JWT peek, hashes. No more python -c.
ax enc jwt "$TOKEN" ax enc base64 -d 'aGVsbG8='
epoch ⇔ ISO ⇔ timezones ⇔ relative, in one call.
ax time 1783332078 ax time now --tz America/New_York
Output is capped by default (never silently). Errors are one structured line with a hint. --help costs a few dozen tokens, and ax agent-context prints the whole playbook offline. Your agent can also learn ax from two fetchable files:
curl -fsSL https://ax.yusuke.run/install | shbrew install yusukebe/tap/axgit clone https://github.com/yusukebe/ax && cd ax && bun run build