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

@sthan/cli

v0.1.5

Published

Command-line tool for sthan.io — verify, parse, geocode US addresses from your terminal or any AI agent

Downloads

531

Readme

@sthan/cli

Command-line tool for sthan.io — verify, parse, and geocode US addresses from your terminal, scripts, CI, or any AI agent.

One binary handles single lookups and batch files (CSV/Excel), so AI coding agents can run it directly instead of looping per row.

Install

npm install -g @sthan/cli
# or run without installing:
npx @sthan/cli verify "1600 Pennsylvania Ave NW, Washington, DC 20500"

Quickstart

# 1. Sign up at https://sthan.io (free tier, no credit card) and create an
#    API key from your dashboard: https://sthan.io/dashboard
# 2. Save it locally:
sthan login --api-key sthan_test_your_api_key_here

# 3. Verify an address:
sthan verify "123 Main St, New York, NY 10001"
123 Main St, New York, NY 10001-1234
✓ deliverable
  ZIP+4: 10001-1234
  DPV: Y
  Deliverable status: Confirmed

Commands

| Command | Description | |---------|-------------| | sthan login --api-key <key> | Save your API key to ~/.sthan/credentials.json | | sthan whoami | Show the API key in use (masked) and its source | | sthan verify <address> | Verify a US address — single, or batch with --input | | sthan parse <address> | Parse a freeform address into structured components | | sthan geocode <address> | Address → coordinates (use -r lat,lon for reverse) | | sthan ip <ip> | Geolocate an IPv4 or IPv6 address |

Every data command prints a human-readable summary by default; add --json for the raw response.

Batch file processing

Verify a whole file in one command — file parsing, throttling, and output are all handled for you:

sthan verify --input addresses.csv  --output results.csv
sthan verify -i customers.xlsx      -o results.xlsx
sthan verify -i data.csv -o out.csv --column "mailing_address"
sthan verify -i data.csv -o out.csv --concurrency 20
  • Input formats: .csv, .tsv, .xlsx, or plain .txt (one address per line).
  • Output formats: .csv or .xlsx (chosen by the output file's extension).
  • Address column: auto-detected (address, full_address, addr, …) or set it with --column.
  • Output rows: your original columns are preserved, with these appended: standardized_address, dpv, deliverable_status, zip4, confidence, error.
  • Requests run with bounded concurrency (default 10) and automatic backoff if rate limited. Each address counts as one API call.

Authentication

The API key is resolved in this order:

  1. --api-key <key> flag (per command)
  2. STHAN_API_KEY environment variable
  3. ~/.sthan/credentials.json (written by sthan login)

For CI/CD, set STHAN_API_KEY and skip login.

Use with AI agents

Because it's a single binary with file I/O built in, AI coding agents (Claude Code, Cursor, …) can run it directly:

"Verify the addresses in customers.xlsx."

→ the agent runs sthan verify -i customers.xlsx -o results.csv and reads back the summary. For an in-chat tool experience instead, see @sthan/mcp-server.

Environment variables

| Variable | Required | Description | |----------|----------|-------------| | STHAN_API_KEY | No* | Your sthan.io API key. *Required unless saved via sthan login or passed with --api-key. | | STHAN_API_URL | No | Override base URL (default: https://api.sthan.io) |

Exit codes

| Code | Meaning | |------|---------| | 0 | Success | | 1 | General error | | 2 | Authentication error (missing/invalid API key) | | 3 | Authorization error (plan limit / rate limited) | | 4 | Input error (bad file or arguments) | | 5 | Network error | | 6 | Partial success (batch: some rows failed) |

Links

License

MIT