npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ar.io/wayfinder-cli

v0.0.4

Published

Fast and user-friendly CLI for fetching files via AR.IO Wayfinder

Readme

Wayfinder CLI

Fast and user-friendly command-line interface for fetching files via AR.IO Wayfinder.

Installation

npm install -g @ar.io/wayfinder-cli
# or
yarn global add @ar.io/wayfinder-cli

Quick Start

# 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 --quiet

Commands

fetch

Fetch 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 --quiet

config

Manage wayfinder configuration settings.

wayfinder config <command> [options]

Subcommands:

  • set <key> <value> - Set a configuration value
  • get <key> - Get a configuration value
  • list - List all configuration values
  • path - 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 URL
  • outputFormat - 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 gateway

info

Display 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 20

Configuration

Wayfinder CLI supports configuration files for setting default options. Configuration is loaded from:

  1. Local .wayfinderrc file in the current directory
  2. Global ~/.wayfinderrc file in your home directory
  3. Command-line arguments (highest priority)

Configuration File Format

{
  "routing": "fastest",
  "verification": "hash",
  "gateway": "https://preferred-gateway.com",
  "progress": true,
  "verbose": false
}

Advanced Usage

Streaming Large Files

Wayfinder CLI efficiently streams large files to disk:

wayfinder fetch ar://large-dataset.csv -o data.csv --progress

Verification

Enable 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-root

Using with Scripts

Output JSON metadata for script processing:

# Get metadata as JSON
METADATA=$(wayfinder fetch ar://example --json)

# Extract gateway used
GATEWAY=$(echo $METADATA | jq -r '.gateway')

Quiet Mode for Pipelines

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 --quiet

Logging Levels

Wayfinder CLI follows a quiet-by-default philosophy with three logging levels:

Default (Quiet)

Shows only essential output like success messages and progress:

wayfinder fetch ar://data -o file.txt
# ✓ Saved to file.txt

Verbose (--verbose)

Shows 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.txt

Quiet (--quiet)

Shows only errors (perfect for scripts):

wayfinder fetch ar://data -o file.txt --quiet
# (no output unless there's an error)

Environment Variables

  • DEBUG - Enable debug output and stack traces
  • NO_COLOR - Disable colored output

Error Handling

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

Performance Tips

  1. Use fastest routing for optimal gateway selection:

    wayfinder config set routing fastest
  2. Enable progress for large downloads:

    wayfinder config set progress true
  3. Configure preferred gateway if you have a reliable one:

    wayfinder config set gateway https://fast-gateway.com

License

Licensed under the Apache License, Version 2.0. See LICENSE for details.