ebag
v0.1.5
Published
Unofficial CLI for interacting with ebag.bg using cookie-based auth.
Maintainers
Readme
ebag
CLI for interacting with ebag.bg (unofficial).
Installation
npm install -g ebagOr run without installing:
npx ebag --helpLogin
Get the cookie header from your browser and store it:
ebag login --cookie "<cookie>"Data and storage
- Config is stored in
~/.config/ebag(override withEBAG_CONFIG_DIR). - Session data is stored in plain text at
~/.config/ebag/session.jsonwith owner-only permissions (0600). - List-based search caches product details in
~/.config/ebag/cache.jsonfor up to 6 hours. - Completed orders may be cached locally for faster access, and the order cache is retained indefinitely.
Products
ebag product search "lindt"
ebag product search "lindt" --json
ebag product show 5128Delivery slots
ebag slotsOrders
ebag order list
ebag order list --from 2024-02-01 --to 2024-03-31
ebag order show DE9CD146FECD05BFCart
ebag cart add 5128 --qty 1
ebag cart update 5128 --qty 2
ebag cart showLists
ebag list show
ebag list add 753250 5128 --qty 1
ebag list show 753250Contributing
Build
npm run buildUnit tests
npm run test:unitEnd-to-end tests
Requires a valid session in tests/.config/ebag/session.json (gitignored):
npm run test:e2eAll tests
npm testChangelog
0.1.5
- Fix order totals to use paid amounts across primary and additional orders without double-counting tip
- Stabilize e2e cart/list mutation flow by retrying with other search candidates when the first product is unavailable
0.1.4
- Show out-of-stock status and expected restock date in cart output
0.1.3
- Require
--qtyfor cart update command
0.1.2
- Log unknown order statuses in the lib layer and warn in the CLI
- Add tests for order status logging and CLI warnings
0.1.1
- Add logging in the config directory
0.1.0
- Initial release
