JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 8
  • Score
    100M100P100Q27587F
  • License GPL-3.0-or-later

Unofficial CLI for interacting with ebag.bg using cookie-based auth.

Package Exports

  • ebag
  • ebag/dist/lib/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ebag) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

ebag

CLI for interacting with ebag.bg (unofficial).

Installation

npm install -g ebag

Or run without installing:

npx ebag --help

Login

Get the cookie header from your browser and store it:

ebag login --cookie "<cookie>"

Notes:

  • Session data is stored in plain text at ~/.config/ebag/session.json with owner-only permissions (0600).
  • List-based search caches product details in ~/.config/ebag/cache.json for up to 6 hours.
  • Completed orders may be cached locally for faster access.
ebag search "lindt"
ebag search "lindt" --json

Delivery slots

ebag slots

Orders

ebag order list
ebag order list --from 2024-02-01 --to 2024-03-31
ebag order show DE9CD146FECD05BF

Cart

ebag cart add 5128 --qty 1
ebag cart update 5128 --qty 2
ebag cart show

Lists

ebag list show
ebag list add 753250 5128 --qty 1
ebag list show 753250

Contributing

Build

npm run build

End-to-end tests

By default, npm run test:e2e reads cookies from tests/.secrets/ebag-cookies (gitignored). You can also override with EBAG_COOKIE.

Optional query override:

EBAG_COOKIE="<cookie>" EBAG_TEST_QUERY="lindt" npm run test:e2e

Store test cookies in tests/.secrets/ebag-cookies (gitignored), then run:

npm run test:e2e