@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
Maintainers
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-cliOr via Homebrew (after tap is published):
brew install areinking/rsc/tariff-cliQuick 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 MXConfiguration
The CLI reads configuration from ~/.rsc-tariff/config.json (created with 0600 permissions).
Priority (highest first)
- Environment variables
- Config file
- 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 fileNote: 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" --jsontariff 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 --jsontariff tariff-status <hts_code>
Check Section 301, 232, 201, and IEEPA tariff status.
tariff tariff-status 8471300000
tariff tariff-status 7206100000 --jsontariff cbp-rulings <query>
Search CBP CROSS binding rulings. Returns up to 10 results.
tariff cbp-rulings "cotton knit shirts"
tariff cbp-rulings "N123456" --jsontariff 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 --jsonLegal
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.
