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

@aduanacross/tariff-cli

v0.1.0

Published

CLI client for the RSC Tariff Intelligence API — HTS lookup, duty rates, tariff status, CBP rulings, and USMCA origin checks

Downloads

121

Readme

@aduanacross/tariff-cli

CLI client for the RSC Tariff Intelligence API. Access HTS code lookups, duty rate calculations, tariff status checks, CBP binding rulings, and USMCA origin eligibility from your terminal.

Installation

npm install -g @aduanacross/tariff-cli

Or via Homebrew (after tap is published):

brew install areinking/rsc/tariff-cli

Quick Start

# Configure your API key
tariff config set api-key sk-your-key-here

# Search for HTS codes
tariff hts-lookup "cotton t-shirts"

# Calculate duty rate
tariff duty-rate 6109100010 --country CN --value 5000

# Check tariff status
tariff tariff-status 8471300000

# Search CBP rulings
tariff cbp-rulings "knitted cotton garments"

# Check USMCA eligibility
tariff usmca-check 6203420010 --country MX

Configuration

The CLI reads configuration from ~/.rsc-tariff/config.json (created with 0600 permissions).

Priority (highest first)

  1. Environment variables
  2. Config file
  3. Built-in defaults

Environment variables

| Variable | Purpose | |---|---| | RSC_TARIFF_API_KEY | API key (overrides config file) | | RSC_TARIFF_BASE_URL | Base URL override (for staging/self-hosted) |

Config commands

tariff config init                    # Interactive setup
tariff config set api-key <key>       # Set API key
tariff config set base-url <url>      # Set base URL
tariff config show                    # Show config (key masked)
tariff config get api-key             # Get masked API key
tariff config reset                   # Delete config file

Note: The API key is stored in plaintext in ~/.rsc-tariff/config.json. The file is created with 0600 permissions (user-readable only). Do not share or commit this file.

Commands

All commands support:

  • --json — output raw JSON (for scripting and CI)
  • --base-url <url> — override the base URL for staging/testing
  • --help — show help for the command

tariff hts-lookup <query>

Search for HTS codes by description or code prefix.

tariff hts-lookup "cotton t-shirts"
tariff hts-lookup "6109.10"
tariff hts-lookup "steel pipe" --json

tariff duty-rate <hts_code> --country <ISO2> --value <usd>

Calculate estimated duty rate for an HTS code, country of origin, and declared value.

tariff duty-rate 6109100010 --country CN --value 1000
tariff duty-rate 7306300000 --country MX --value 50000 --json

tariff tariff-status <hts_code>

Check Section 301, 232, 201, and IEEPA tariff status.

tariff tariff-status 8471300000
tariff tariff-status 7206100000 --json

tariff cbp-rulings <query>

Search CBP CROSS binding rulings. Returns up to 10 results.

tariff cbp-rulings "cotton knit shirts"
tariff cbp-rulings "N123456" --json

tariff usmca-check <hts_code> --country <ISO2>

Check USMCA preferential origin eligibility (Canada CA and Mexico MX only).

tariff usmca-check 6203420010 --country MX
tariff usmca-check 8471300000 --country CA --json

Legal

This tool provides informational data only. It does not constitute legal, tax, or customs advice and MUST NOT be relied upon for official CBP entry filings, customs broker decisions, or binding trade commitments. Verify all duty calculations and origin determinations with a licensed customs broker before acting.

CBP binding rulings are sourced from the U.S. Customs and Border Protection CROSS database (rulings.cbp.gov). CBP does not endorse this product.

Tariff data may change due to executive orders and policy announcements without prior notice. Always verify current Section 301 and IEEPA status at USTR.gov before making trade or procurement decisions.

Rate Limits

| Tier | Monthly Call Limit | |---|---| | Developer | 500 calls | | Pro | 5,000 calls | | Enterprise | Unlimited |

Get an API key at mcp-tariff.rsc-ep.com.