selva-cli
v0.1.1
Published
Shopping platform CLI for AI agents. Search, inspect, and buy physical products from Amazon through a single interface.
Readme
Selva CLI
Shopping platform CLI for AI agents. Search, inspect, and buy physical products from Amazon through a single interface.
Quick start
- Register an API key:
npx selva-cli register- Set name (required before buying):
npx selva-cli settings set-name --name "Jane Doe"- Set address (required before buying,
--line2optional):
npx selva-cli settings set-address --street "123 Main St" --line2 "Apt 4B" --city "Austin" --state "TX" --zip "78701" --country "US"- Optionally set phone:
npx selva-cli settings set-phone --phone "+14155551234"- Optionally set email (for receipts and approval notifications):
npx selva-cli settings set-email --email "[email protected]"- Optionally link a card / configure approval threshold via settings page:
npx selva-cli settings pageCommands
Search
npx selva-cli search "<query>"Returns up to 10 normalized results with selva_id, title, price, rating, source, and url.
Details
npx selva-cli details <selva_id>Returns expanded product details for a result (for example amzn_B0EXAMPLE).
Buy
npx selva-cli buy <selva_id> --method <saved|card>Requires name and address to be set before placing an order.
Options:
--method saveduses the linked card from settings page.--method card --number <num> --exp <MM/YY> --cvv <code>uses card details and tokenizes via Stripe.
Orders
npx selva-cli ordersLists all orders with status (pending, approved, expired, shipping).
Settings
npx selva-cli settingsnpx selva-cli settings pagenpx selva-cli settings set-address --street <street> [--line2 <line2>] --city <city> --state <state> --zip <zip> --country <country>npx selva-cli settings set-name --name <name>npx selva-cli settings set-email --email <email>npx selva-cli settings set-phone --phone <phone>
Product ID format
IDs are prefixed by provider: amzn_ for Amazon.
Local development
npm install
npm run build
node dist/dev-index.js registeror
bun install
bun run build
bun ./dist/dev-index.js registerdist/index.js targets https://api.useselva.com for production usage.
Publish to npm
npm run build
npm publish --access publicPackage name: selva-cli.
