Compact semantic trees and agent-ready page checks from HTML, URLs, WebViews, and live browser pages.
Core features:
- readable semantic trees from URLs, files, stdin, or captured browser HTML
- compact
--agentJSON for search, page checks, and browser handoff loops
npx --yes ax-grep@latest https://example.com --agent-brief
curl -fsSL https://raw.githubusercontent.com/hmmhmmhm/ax-grep/main/skills.sh | shThe first command verifies the CLI. The second installs the Codex skill prompt
so subagents know to inspect pages with ax-grep before opening a browser.
Restart Codex after installing a new skill if it is not listed immediately.
ax-grep https://example.com --agent
npx --yes ax-grep@latest https://example.com --agentAgents should read agent.executor, agent.handoff, agent.readTargets,
pageCheck, and verification first. Open a browser only when the handoff
fields say static HTML is not enough.
npm install ax-grepimport { extract, formatSemanticTreeText } from "ax-grep";
const html = await fetch("https://example.com").then((r) => r.text());
const tree = extract(html);
const promptText = formatSemanticTreeText(tree);ax-grep is ESM-only and requires Node 18 or newer. CommonJS services can use
const { extract } = await import("ax-grep").
import { createExtractorScript } from "ax-grep";
const script = createExtractorScript({ format: "text" });
const text = await page.evaluate(script);
// iOS/Android WebView: evaluateJavaScript(script) returns the same text value.