Skip to content
Back to search

ax

The AI-era curl

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/yusukebe-ax/badge.svg)](/listings/yusukebe-ax)

HTML

<a href="/listings/yusukebe-ax"><img src="/api/listings/yusukebe-ax/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

These steps run a script from the network that findsafeskills does not scan.

curl -fsSL https://ax.yusuke.run/install | sh

Teach your agent: `npx skills add yusukebe/ax` — or have it run `ax agent-context`.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 97 lines · 1 finding marked

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # ax
  2. **The AI-era curl: fetch, discover, extract. One command.**
  3. ax 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.
  4. ```sh
  5. ax https://api.example.com/users # curl parity — but never silent
  6. ax https://example.com --outline # discover the page's structure
  7. ax https://example.com '.item' --row 'title=a, href=a@href'
  8. ax https://docs.example.com/guide --md --budget 800 # read docs as markdown
  9. ```
  10. ## Why
  11. Coding 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.
  12. ax replaces the loop with one command:
  13. - **Fetch, never silent** — `{status, ok, url, redirected, ms, headers, body}` for every request, including the final URL after redirects. 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, redirect/status notes on stderr.)
  14. - **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). Parse requests accept `-H`, `-u`, `-X`, `-d` and `-k`; requests with custom headers, a non-GET method, or a body bypass the cache, and `-k` responses are never written to it.
  15. - **Extract, structured** — `--row 'title=a, href=a@href'` pulls multi-field rows in one call; `--table` turns `<table>` into keyed rows; `--where` filters with a safe expression language.
  16. - **Token-cheap by design** — results cap at 50 with a stderr note (never silent truncation), `--budget <tokens>` targets an estimated token size (cuts at item boundaries, never splits an item, always emits at least one — an oversized item is announced), rows default to header-once TSV (`--json` for JSON). Truncation notes name the exact `--offset` to continue from, so a follow-up call emits only what wasn't shown — no overlap, and the parse cache means no refetch.
  17. For machine-readable continuation, add `--json-envelope`: stdout becomes
  18. `{data, meta}`. Continue only while `meta.state` is `"more"`, rerunning the
  19. same command with `--offset <meta.next_offset>`; stop on `"complete"` or
  20. `"past_end"`. Existing `--json` remains a top-level array. Do not restart from
  21. zero or increase the budget.
  22. ```bash
  23. ax page.html '.item' --row 'title=.title' --limit 20 --json-envelope
  24. ```
  25. ## Install
  26. ```sh
  27. curl -fsSL https://ax.yusuke.run/install | sh
    • Note: Pipes a downloaded script directly into a shell (curl | sh / wget | bash)
    • Line 38 on GitHub
  28. ```
  29. Teach your agent: `npx skills add yusukebe/ax` — or have it run `ax agent-context`.
  30. ## Nix
  31. The project provides optional Nix flake outputs for users who already use Nix.
  32. The flake builds ax from source — see `flake.nix` and `package.nix` for details.
  33. ```bash
  34. # Run without installing
  35. nix run github:yusukebe/ax
  36. # Install into your profile
  37. nix profile install github:yusukebe/ax
  38. ```
  39. ## Why not htmlq / curl / Firecrawl?
  40. **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.
  41. **curl is silent.** An empty 200 body prints nothing; agents re-run it with `-i`, `-w`, guessing. ax always reports.
  42. **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.)
  43. | | throwaway python | curl + htmlq | ax |
  44. | ---------------------------------------------- | :--------------: | :----------: | :-: |
  45. | fetch with a full report (status/headers/ms) | △ _write it_ | ✗ | ✓ |
  46. | structure discovery (`--outline` / `--locate`) | ✗ | ✗ | ✓ |
  47. | CSS-selector extraction | △ _needs bs4_ | ✓ | ✓ |
  48. | multi-field rows in one call (`--row`) | △ _write it_ | ✗ | ✓ |
  49. | `<table>` → keyed rows | △ _write it_ | ✗ | ✓ |
  50. | easier selector repair after markup drift | ✗ _(regex)_ | ✓ | ✓ |
  51. | page → readable markdown (`--md`) | ✗ | ✗ | ✓ |
  52. | token-shaped output (caps, `--budget`, notes) | ✗ | ✗ | ✓ |
  53. | zero code authored per task | ✗ | ✓ | ✓ |
  54. (△ = possible, but the agent writes and debugs the code every time — that authoring cost is the whole point.)
  55. ## Measured
  56. Real headless Claude Code sessions, same task, with and without ax — answers graded, both sides correct in every run:
  57. | task (Opus 4.8, agent already knows ax) | without ax | with ax |
  58. | ------------------------------------------ | ------------ | ----------------------- |
  59. | two pages with markup drift (breaks regex) | $0.458 | **$0.150 (−67%)** |
  60. | clean extraction from a 60-item catalog | $0.296 · 24s | **$0.104 · 14s (−65%)** |
  61. | live website, decoy markup (median of 3) | $0.248 | **$0.191 (−23%)** |
  62. | markup drift, agent's first-ever use of ax | $0.664 | **$0.282 (−58%)** |
  63. Full method — including the runs ax _lost_ — in [bench/RESULTS.md](bench/RESULTS.md).
  64. ## The full flag reference
  65. Run `ax --help`, or `ax agent-context` for the agent-oriented playbook (also served at [ax.yusuke.run/llms.txt](https://ax.yusuke.run/llms.txt)).
  66. ## Built with
  67. [Bun](https://bun.sh) (single-file binary via `bun build --compile`) and [linkedom](https://github.com/WebReflection/linkedom) for standard-DOM parsing — the only runtime dependency.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.