{"_id":"@aduanacross/tariff-cli","name":"@aduanacross/tariff-cli","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@aduanacross/tariff-cli","version":"0.1.0","description":"CLI client for the RSC Tariff Intelligence API — HTS lookup, duty rates, tariff status, CBP rulings, and USMCA origin checks","type":"module","engines":{"node":">=20.0.0"},"bin":{"tariff":"dist/cli.js"},"scripts":{"build":"tsc --project tsconfig.build.json","typecheck":"tsc --noEmit","lint":"npx biome check src tests","lint:fix":"npx biome check --write src tests","test":"vitest run --coverage","test:watch":"vitest","pack:dry":"npm pack --dry-run","prepublishOnly":"npm run build"},"dependencies":{"cli-table3":"^0.6.5","commander":"^12.1.0"},"devDependencies":{"@biomejs/biome":"^1.9.4","@types/node":"^20.17.0","@vitest/coverage-v8":"^3.1.1","typescript":"^5.8.3","vitest":"^3.1.1"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/areinking/mcp-tariff.git"},"keywords":["tariff","hts","customs","trade","duty","usmca","cbp","cli"],"license":"UNLICENSED","_id":"@aduanacross/tariff-cli@0.1.0","gitHead":"64709bc6e9c3a004e3081508f14118dc100db9c7","bugs":{"url":"https://github.com/areinking/mcp-tariff/issues"},"homepage":"https://github.com/areinking/mcp-tariff#readme","_nodeVersion":"22.22.0","_npmVersion":"10.9.4","dist":{"integrity":"sha512-eMAygcrsreBEtTEK/nmP4pWLkl7hlHETXCBiCtseOVbldaM7OQ4cMtEPi9m17LROmKnSXnh4wAWDuGKJMzQONg==","shasum":"cbb9c1c355fc0b05e110b285e56982d846e153a3","tarball":"https://registry.npmjs.org/@aduanacross/tariff-cli/-/tariff-cli-0.1.0.tgz","fileCount":58,"unpackedSize":116711,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCvazABObKo9wRifi+S7Z6+XCQQo6VTHLFw6k90X2kduQIgEuPltDUEAhzz11qM9IcZSajTV9aJ75stM4fHRPD6d18="}]},"_npmUser":{"name":"aduanacross","email":"support@aduanacross.com"},"directories":{},"maintainers":[{"name":"aduanacross","email":"support@aduanacross.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/tariff-cli_0.1.0_1776630726929_0.9828692550530793"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-19T20:32:06.795Z","0.1.0":"2026-04-19T20:32:07.064Z","modified":"2026-04-19T20:32:07.326Z"},"maintainers":[{"name":"aduanacross","email":"support@aduanacross.com"}],"description":"CLI client for the RSC Tariff Intelligence API — HTS lookup, duty rates, tariff status, CBP rulings, and USMCA origin checks","homepage":"https://github.com/areinking/mcp-tariff#readme","keywords":["tariff","hts","customs","trade","duty","usmca","cbp","cli"],"repository":{"type":"git","url":"git+https://github.com/areinking/mcp-tariff.git"},"bugs":{"url":"https://github.com/areinking/mcp-tariff/issues"},"license":"UNLICENSED","readme":"# @aduanacross/tariff-cli\n\nCLI client for the RSC Tariff Intelligence API. Access HTS code lookups, duty rate calculations,\ntariff status checks, CBP binding rulings, and USMCA origin eligibility from your terminal.\n\n## Installation\n\n```sh\nnpm install -g @aduanacross/tariff-cli\n```\n\nOr via Homebrew (after tap is published):\n\n```sh\nbrew install areinking/rsc/tariff-cli\n```\n\n## Quick Start\n\n```sh\n# Configure your API key\ntariff config set api-key sk-your-key-here\n\n# Search for HTS codes\ntariff hts-lookup \"cotton t-shirts\"\n\n# Calculate duty rate\ntariff duty-rate 6109100010 --country CN --value 5000\n\n# Check tariff status\ntariff tariff-status 8471300000\n\n# Search CBP rulings\ntariff cbp-rulings \"knitted cotton garments\"\n\n# Check USMCA eligibility\ntariff usmca-check 6203420010 --country MX\n```\n\n## Configuration\n\nThe CLI reads configuration from `~/.rsc-tariff/config.json` (created with `0600` permissions).\n\n### Priority (highest first)\n\n1. Environment variables\n2. Config file\n3. Built-in defaults\n\n### Environment variables\n\n| Variable | Purpose |\n|---|---|\n| `RSC_TARIFF_API_KEY` | API key (overrides config file) |\n| `RSC_TARIFF_BASE_URL` | Base URL override (for staging/self-hosted) |\n\n### Config commands\n\n```sh\ntariff config init                    # Interactive setup\ntariff config set api-key <key>       # Set API key\ntariff config set base-url <url>      # Set base URL\ntariff config show                    # Show config (key masked)\ntariff config get api-key             # Get masked API key\ntariff config reset                   # Delete config file\n```\n\n**Note:** The API key is stored in plaintext in `~/.rsc-tariff/config.json`. The file is\ncreated with `0600` permissions (user-readable only). Do not share or commit this file.\n\n## Commands\n\nAll commands support:\n- `--json` — output raw JSON (for scripting and CI)\n- `--base-url <url>` — override the base URL for staging/testing\n- `--help` — show help for the command\n\n### `tariff hts-lookup <query>`\n\nSearch for HTS codes by description or code prefix.\n\n```sh\ntariff hts-lookup \"cotton t-shirts\"\ntariff hts-lookup \"6109.10\"\ntariff hts-lookup \"steel pipe\" --json\n```\n\n### `tariff duty-rate <hts_code> --country <ISO2> --value <usd>`\n\nCalculate estimated duty rate for an HTS code, country of origin, and declared value.\n\n```sh\ntariff duty-rate 6109100010 --country CN --value 1000\ntariff duty-rate 7306300000 --country MX --value 50000 --json\n```\n\n### `tariff tariff-status <hts_code>`\n\nCheck Section 301, 232, 201, and IEEPA tariff status.\n\n```sh\ntariff tariff-status 8471300000\ntariff tariff-status 7206100000 --json\n```\n\n### `tariff cbp-rulings <query>`\n\nSearch CBP CROSS binding rulings. Returns up to 10 results.\n\n```sh\ntariff cbp-rulings \"cotton knit shirts\"\ntariff cbp-rulings \"N123456\" --json\n```\n\n### `tariff usmca-check <hts_code> --country <ISO2>`\n\nCheck USMCA preferential origin eligibility (Canada CA and Mexico MX only).\n\n```sh\ntariff usmca-check 6203420010 --country MX\ntariff usmca-check 8471300000 --country CA --json\n```\n\n## Legal\n\nThis tool provides informational data only. It does not constitute legal, tax, or customs\nadvice and MUST NOT be relied upon for official CBP entry filings, customs broker decisions,\nor binding trade commitments. Verify all duty calculations and origin determinations with\na licensed customs broker before acting.\n\nCBP binding rulings are sourced from the U.S. Customs and Border Protection CROSS database\n(rulings.cbp.gov). CBP does not endorse this product.\n\nTariff data may change due to executive orders and policy announcements without prior notice.\nAlways verify current Section 301 and IEEPA status at USTR.gov before making trade or\nprocurement decisions.\n\n## Rate Limits\n\n| Tier | Monthly Call Limit |\n|---|---|\n| Developer | 500 calls |\n| Pro | 5,000 calls |\n| Enterprise | Unlimited |\n\nGet an API key at [mcp-tariff.rsc-ep.com](https://mcp-tariff.rsc-ep.com).\n","readmeFilename":"README.md","_rev":"1-02dc512f7f154711350bd3c56650a30b"}