ax  by yusukebe

AI-era CLI for web data extraction and agentic workflows

Created 1 week ago

New!

412 stars

Top 70.5% on SourcePulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

Summary

ax positions itself as the "AI-era curl," addressing the inefficiency and brittleness of traditional web scraping for AI agents. It replaces the common pattern of curl piped into throwaway parsing scripts with a single, deterministic command that fetches, understands page structure, and extracts structured data locally. This significantly benefits AI agents by providing reliable, context-window-shaped output, reducing LLM token costs and development complexity.

How It Works

ax streamlines the AI agent's web interaction loop—fetch, understand, extract—into a single command. It replaces brittle curl piped into ad-hoc parsing scripts. The core design emphasizes deterministic, local execution. Fetching provides a comprehensive report including status, headers, and body, unlike curl's silence on empty responses. Discovery modes (--outline, --locate) analyze page structure and identify selectors without exposing raw HTML to the agent's context. Extraction is highly structured, supporting multi-field rows (--row), HTML tables to keyed data (--table), and filtering (--where) via a safe expression language. This approach minimizes LLM token costs and development effort by providing pre-parsed, structured data.

Quick Start & Requirements

  • Primary install: curl -fsSL https://ax.yusuke.run/install | sh
  • Prerequisites: Built with Bun (single-file binary via bun build --compile) and linkedom for standard-DOM parsing. No other runtime dependencies are listed.
  • Agent Integration: Can be taught to agents via npx skills add yusukebe/ax or by running ax agent-context.
  • Relevant Links: Installation script URL, ax.yusuke.run/llms.txt (agent-oriented playbook).

Highlighted Details

  • Comprehensive Fetch Reporting: Unlike curl, ax never returns silently, always providing status, headers, and body details, even for empty or error responses.
  • Structural Discovery: --outline and --locate modes intelligently analyze page structure, enabling agents to understand content hierarchy and find specific elements without parsing raw HTML.
  • Advanced Structured Extraction: Features like --row for multi-field records, --table for converting HTML tables to structured data, and --where for filtering enable complex data retrieval in a single operation.
  • Token-Efficient Output: Results are capped by default (with notifications) and can be further limited using --budget <tokens>, producing output optimized for LLM context windows.
  • Performance Gains: Benchmarks indicate significant reductions in LLM operational costs (up to 67%) and task completion times when ax replaces manual curl and parsing workflows.
  • Local & Deterministic: Operates entirely locally, ensuring reproducible results without reliance on external APIs or keys.

Maintenance & Community

The project is primarily authored by "yusukebe." No specific community channels (like Discord/Slack) or detailed roadmap information are provided in the README snippet.

Licensing & Compatibility

The license type is not specified in the provided README content. Compatibility is noted for local execution, but for JavaScript-heavy Single Page Applications (SPAs), a browser tool is still recommended.

Limitations & Caveats

For JavaScript-heavy SPAs, a dedicated browser tool remains the recommended approach. The specific open-source license governing the use and distribution of ax is not stated in the provided documentation, which may present an adoption blocker.

Health Check
Last Commit

1 day ago

Responsiveness

Inactive

Pull Requests (30d)
20
Issues (30d)
1
Star History
412 stars in the last 7 days

Explore Similar Projects

Feedback? Help us improve.