Fast and user-friendly command-line interface for fetching files via AR.IO Wayfinder.
npm install -g @ar.io/wayfinder-cli
# or
yarn global add @ar.io/wayfinder-cli# Fetch and display content (quiet by default)
wayfinder fetch ar://ardrive
# Save to file with progress bar
wayfinder fetch ar://example.pdf -o example.pdf --progress
# Enable verbose logging to see detailed information
wayfinder fetch ar://data --verbose
# Completely silent (only errors)
wayfinder fetch ar://data -o file.txt --quietFetch data from ar:// URLs with support for streaming, progress tracking, and verification.
wayfinder fetch <url> [options]Options:
-o, --output <path>- Save to file instead of stdout-r, --routing <strategy>- Routing strategy (random, fastest, balanced, preferred)-v, --verify <strategy>- Verification strategy (hash, data-root, signature, remote, disabled)-g, --gateway <url>- Preferred gateway URL--progress- Show download progress bar--json- Output metadata as JSON--verbose- Enable verbose logging--quiet- Suppress all output except errors--timeout <ms>- Request timeout in milliseconds (default: 60000)
Examples:
# Basic fetch (quiet by default)
wayfinder fetch ar://example-name
# Save with progress and verbose output
wayfinder fetch ar://large-file.zip -o file.zip --progress --verbose
# Use fastest gateway with hash verification (verbose)
wayfinder fetch ar://important-data -r fastest -v hash --verbose
# Use specific gateway silently
wayfinder fetch ar://data -g https://my-gateway.com --quiet
# Output only JSON metadata
wayfinder fetch ar://example --json --quietManage wayfinder configuration settings.
wayfinder config <command> [options]Subcommands:
set <key> <value>- Set a configuration valueget <key>- Get a configuration valuelist- List all configuration valuespath- Show configuration file path
Options:
-g, --global- Use global config instead of local
Configuration Keys:
routing- Default routing strategy (random, fastest, balanced, preferred)verification- Default verification strategy (hash, data-root, signature, remote, disabled)gateway- Preferred gateway URLoutputFormat- Output format (human, json)verbose- Enable verbose logging (true, false)quiet- Suppress output (true, false)progress- Show progress by default (true, false)
Examples:
# Set default routing strategy
wayfinder config set routing fastest
# Set global verification strategy
wayfinder config set verification hash --global
# List all configurations
wayfinder config list
# Get specific value
wayfinder config get gatewayDisplay information about available gateways with latency testing.
wayfinder info [options]Options:
--json- Output as JSON-l, --limit <number>- Limit number of gateways to display (default: 10)
Examples:
# Show gateway information
wayfinder info
# Get JSON output
wayfinder info --json
# Show top 20 gateways
wayfinder info --limit 20Wayfinder CLI supports configuration files for setting default options. Configuration is loaded from:
- Local
.wayfinderrcfile in the current directory - Global
~/.wayfinderrcfile in your home directory - Command-line arguments (highest priority)
{
"routing": "fastest",
"verification": "hash",
"gateway": "https://preferred-gateway.com",
"progress": true,
"verbose": false
}Wayfinder CLI efficiently streams large files to disk:
wayfinder fetch ar://large-dataset.csv -o data.csv --progressEnable cryptographic verification to ensure data integrity:
# Hash verification (recommended)
wayfinder fetch ar://important-doc -v hash
# Signature verification
wayfinder fetch ar://signed-data -v signature
# Data root verification
wayfinder fetch ar://transaction -v data-rootOutput JSON metadata for script processing:
# Get metadata as JSON
METADATA=$(wayfinder fetch ar://example --json)
# Extract gateway used
GATEWAY=$(echo $METADATA | jq -r '.gateway')Use quiet mode when piping output:
# Pipe content to another command
wayfinder fetch ar://data.json --quiet | jq '.results'
# Save to file silently
wayfinder fetch ar://file.txt -o output.txt --quietWayfinder CLI follows a quiet-by-default philosophy with three logging levels:
Shows only essential output like success messages and progress:
wayfinder fetch ar://data -o file.txt
# ✓ Saved to file.txtShows detailed information about the fetch process:
wayfinder fetch ar://data -o file.txt --verbose
# ⚙ Using routing strategy: default
# ⚙ Using verification: disabled
# ⚙ Response from gateway: arweave.net
# ⚙ Content-Type: application/json
# ⚙ Content-Length: 1234 bytes
# ⚙ Verification status: skipped
# ⚙ Received 1234 bytes
# ✓ Saved to file.txtShows only errors (perfect for scripts):
wayfinder fetch ar://data -o file.txt --quiet
# (no output unless there's an error)DEBUG- Enable debug output and stack tracesNO_COLOR- Disable colored output
Wayfinder CLI provides helpful error messages with recovery suggestions:
# Invalid URL
$ wayfinder fetch invalid-url
✖ Invalid URL format
URLs must start with ar:// (e.g., ar://example-name)
# Network timeout
$ wayfinder fetch ar://example --timeout 1000
✖ Request timeout after 1000ms
Try increasing the timeout or using a different gateway-
Use fastest routing for optimal gateway selection:
wayfinder config set routing fastest -
Enable progress for large downloads:
wayfinder config set progress true
-
Configure preferred gateway if you have a reliable one:
wayfinder config set gateway https://fast-gateway.com
Licensed under the Apache License, Version 2.0. See LICENSE for details.