CLI tool to validate USPS addresses
npm install uspsA command-line tool to validate USPS addresses using the USPS Address Validation API.
1. Get your USPS API credentials (Client ID and Client Secret)
2. Set up your environment variables:
``bash`
export USPS_CLIENT_ID=your_client_id
export USPS_CLIENT_SECRET=your_client_secret
First, you need to authenticate with the USPS API:
`bash`
npx usps login
To validate an address:
`bash``
npx usps validate "123 Main St,New York,NY,10001"
The address should be provided in the format: "street,city,state,zip"
MIT