LLM-optimized reference toolkit. JSON output for AI agents, not humans.
Bypasses bot protection (403/999) via headless Chrome.
# curl gets blocked
curl https://linkedin.com/... # 999 Request Denied
# ref gets through
ref fetch https://linkedin.com/... # JSON with contentFrom releases:
# macOS (Apple Silicon)
curl -L https://github.com/royalbit/ref/releases/latest/download/ref-aarch64-apple-darwin.tar.gz | tar xz
sudo mv ref /usr/local/bin/
# macOS (Intel)
curl -L https://github.com/royalbit/ref/releases/latest/download/ref-x86_64-apple-darwin.tar.gz | tar xz
sudo mv ref /usr/local/bin/
# Linux (x64)
curl -L https://github.com/royalbit/ref/releases/latest/download/ref-x86_64-unknown-linux-musl.tar.gz | tar xz
sudo mv ref /usr/local/bin/
# Linux (ARM64)
curl -L https://github.com/royalbit/ref/releases/latest/download/ref-aarch64-unknown-linux-musl.tar.gz | tar xz
sudo mv ref /usr/local/bin/From crates.io:
cargo install royalbit-refref <COMMAND>
Commands:
fetch Fetch URL and convert HTML to structured JSON (LLM-optimized)
pdf Extract text from PDF files to structured JSON
init Create references.yaml template
scan Scan markdown files for URLs, build references.yaml
verify-refs Verify references.yaml entries and update status
check-links Check URL health in markdown files or single URLs
refresh-data Extract live data from URLs (market sizes, pricing, statistics)
update Update to the latest version from GitHub releases
Options:
-h, --help Print help
-V, --version Print version
Fetch URL content as structured JSON.
ref fetch <url>
ref fetch <url> --raw # Include raw HTML
ref fetch <url> --cookies # Use browser cookiesExtract text from PDF files to structured JSON.
ref pdf document.pdf
ref pdf *.pdf # Multiple filesCreate a new references.yaml template.
ref init # Creates references.yaml
ref init -o refs.yaml # Custom filename
ref init --force # Overwrite existingScan markdown files for URLs, build/update references.yaml.
ref scan README.md docs/*.md
ref scan . --output refs.yamlVerify references.yaml entries, update status.
ref verify-refs references.yaml
ref verify-refs references.yaml --category research
ref verify-refs references.yaml --parallel 10
ref verify-refs references.yaml --dry-runCheck URL health. Returns status codes.
ref check-links <file.md> # All URLs in file
ref check-links --url <URL> # Single URL
ref check-links --stdin # From stdin
ref check-links -c 10 <file.md> # 10 parallel checksExtract structured data (market sizes, stats, follower counts).
ref refresh-data --url <URL>
ref refresh-data <file.md>Self-update to the latest version from GitHub releases.
ref update # Download and install latest
ref update --check # Check for updates only
ref update --force # Force reinstall current versionAll commands output JSON to stdout, logs to stderr.
ref fetch https://example.com 2>/dev/null | jq .- Chrome/Chromium (headless) - for fetch, check-links, verify-refs
- Rust toolchain (build from source only)
Elastic License 2.0 - RoyalBit Inc.