Skip to main content

CLI for browsing Allegro offers, managing cart, and tracking packages — human-readable and LLM-agent friendly

Project description

🛒 allegro-cli

CI License: MIT Python 3.10+

The power-user's gateway to Allegro.

allegro-cli is a high-performance command-line interface for browsing offers, managing carts, and tracking packages on Allegro.pl. It is designed for two types of users: power-users who want to automate their shopping and AI Agents who need structured, token-efficient access to marketplace data.


✨ Key Features

  • 🚀 Agent-First Design: Optimized JSON outputs (--compact) to minimize LLM token usage while maximizing data density.
  • 🎨 Rich UX: Beautifully formatted, color-coded tables for humans.
  • 🔍 Advanced Filtering: Precision search with filters for condition, free shipping, Allegro Smart, and delivery speed.
  • 📦 Full Tracking: Detailed package tracking beyond simple summaries.
  • 🛡️ Bot Bypass: CloakBrowser (source-patched Chromium) defeats DataDome/Cloudflare with 58+ C++ fingerprint patches — no external solver needed.
  • 🛠️ Extensible: Pure Python implementation, easy to integrate into larger automation pipelines.

🚀 Quick Start

Installation

From GitHub Releases (recommended):

pip install https://github.com/pkonowrocki/allegro-cli/releases/latest/download/allegro_cli-0.6.0-py3-none-any.whl

From source (latest):

pip install git+https://github.com/pkonowrocki/allegro-cli.git

Setup

To access personalized data (cart, packages), you need to provide your session cookies:

allegro login

Follow the prompt to paste your cookies from Chrome DevTools (Application $\rightarrow$ Cookies $\rightarrow$ allegro.pl).


📖 Usage

🔍 Search for Products

Find exactly what you need with advanced filters:

# Basic search
allegro search "kawa ziarnista"

# Power-user search: New, with Allegro Smart, delivered in 1 day, sorted by price ascending
allegro search "kawa ziarnista" --condition new --smart --delivery-time one_day --sort p

# Filter by custom criteria (e.g., specific brand or parameter)
allegro search "laptop" --filter "marka=Apple"

# Search on a specific seller's page
allegro search "kawa" --seller Muvepl

# Price range
allegro search "laptop" --price-min 1000 --price-max 3000

# Allegro Pay offers only
allegro search "iphone" --pay

Search Flags:

Flag Description Examples
--category Category ID or slug 491, laptopy-491
--sort p (price ↑), pd (price ↓), m (relevance), n (newest) --sort pd
--condition Product condition (can specify multiple) --condition new, --condition new used
--smart Filter for Allegro Smart --smart
--free-shipping Alias for --smart (Allegro Smart) --free-shipping
--delivery-time Delivery speed one_day, two_day, three_day
--price-min Minimum price in PLN --price-min 100
--price-max Maximum price in PLN --price-max 500
--seller Search on seller's page --seller Muvepl
--pay Filter for Allegro Pay --pay
--location Shipping location --location polska
--filter Key=Value custom filter (repeatable) --filter "color=black"
--columns Custom output columns --columns id,name,seller.name

📦 Manage Your Shopping

Offers:

# Get full details and extracted product specifications
allegro offer 12345678

Cart:

allegro cart list                      # View current items
allegro cart add OFFER_ID              # Add item to cart (seller auto-detected)
allegro cart add OFFER_ID SELLER_ID    # Add item with explicit seller
allegro cart add OFFER_ID --quantity 3 # Add multiple units
allegro cart remove OFFER_ID           # Remove item from cart

Tracking:

allegro packages            # List all active shipments with detailed status

Claude Code Skill:

allegro skill               # Install as a Claude Code skill (auto-discovered by agents)

🤖 For AI Agents (LLM Optimization)

If you are building an AI agent, use the --format json and --compact flags. The compact mode strips unnecessary metadata to save tokens while keeping all critical data points — including the smart field that indicates Allegro Smart eligibility (free delivery).

allegro search "mechanical keyboard" --format json --compact

Compact search output includes: id, name, price, seller, url, smart Compact offer output includes: id, name, price, seller, url, smart, parameters

Allegro Smart

Allegro Smart! is a subscription (59.90 PLN/yr) giving unlimited free delivery on eligible offers above 49.90 PLN. The smart field in compact output shows whether an offer qualifies. Use --smart or --free-shipping to filter for Smart-eligible offers.

Install as a Claude Code Skill

To auto-register the CLI as a Claude Code skill (so AI agents discover it automatically):

allegro skill

🛠️ Development

# Install dev dependencies
pip install -e ".[dev]"

# Run the test suite (including Mock Client tests)
pytest

📜 License

Distributed under the MIT License. See LICENSE for more information.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

allegro_cli-0.7.1.tar.gz (32.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

allegro_cli-0.7.1-py3-none-any.whl (27.5 kB view details)

Uploaded Python 3

File details

Details for the file allegro_cli-0.7.1.tar.gz.

File metadata

  • Download URL: allegro_cli-0.7.1.tar.gz
  • Upload date:
  • Size: 32.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for allegro_cli-0.7.1.tar.gz
Algorithm Hash digest
SHA256 711a4c313993e6940411dfa0f482e1acf3d121f2684934ae6ae31f08b3fc729a
MD5 de94834180a82fa349a23e44a21467f8
BLAKE2b-256 455c8c6b556bc00f260f2127342d0ff01bb3bacdcc68abd9a7fe087efa229ee8

See more details on using hashes here.

Provenance

The following attestation bundles were made for allegro_cli-0.7.1.tar.gz:

Publisher: bump.yml on pkonowrocki/allegro-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file allegro_cli-0.7.1-py3-none-any.whl.

File metadata

  • Download URL: allegro_cli-0.7.1-py3-none-any.whl
  • Upload date:
  • Size: 27.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for allegro_cli-0.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 eefee04a6f03eb95655dd454de97526090eb154948dcf63531cc82a44d9739dd
MD5 228319f2bf5936917660dc09e79161af
BLAKE2b-256 6e8afd036470a47cdf324079b89ad7dc07e93e5fdb364077691a009a52d2ae27

See more details on using hashes here.

Provenance

The following attestation bundles were made for allegro_cli-0.7.1-py3-none-any.whl:

Publisher: bump.yml on pkonowrocki/allegro-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page