CLI for browsing Allegro offers, managing cart, and tracking packages — human-readable and LLM-agent friendly
Project description
🛒 allegro-cli
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file allegro_cli-0.8.0.tar.gz.
File metadata
- Download URL: allegro_cli-0.8.0.tar.gz
- Upload date:
- Size: 36.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
488210b5a92a605a51738b1c8a4b70b1e9b5abf7c81889485fc8252b00362e30
|
|
| MD5 |
ed1a29d7e89467ec817ed085d4b6a292
|
|
| BLAKE2b-256 |
a0ddcb33ba9000bef55324ec387ea5cc49a4589346e6c8ad4a42c253d2e39678
|
Provenance
The following attestation bundles were made for allegro_cli-0.8.0.tar.gz:
Publisher:
bump.yml on pkonowrocki/allegro-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
allegro_cli-0.8.0.tar.gz -
Subject digest:
488210b5a92a605a51738b1c8a4b70b1e9b5abf7c81889485fc8252b00362e30 - Sigstore transparency entry: 2170021036
- Sigstore integration time:
-
Permalink:
pkonowrocki/allegro-cli@9c6d4875f2c617b2d30e109544ca465676a04b13 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/pkonowrocki
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
bump.yml@9c6d4875f2c617b2d30e109544ca465676a04b13 -
Trigger Event:
push
-
Statement type:
File details
Details for the file allegro_cli-0.8.0-py3-none-any.whl.
File metadata
- Download URL: allegro_cli-0.8.0-py3-none-any.whl
- Upload date:
- Size: 29.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c753df90e997c2a12870b23a986dbca69a2f0b1c8b585fd1578bc37dbe9d9fe3
|
|
| MD5 |
7ad16f8317f3980cffcb7388ccb21c55
|
|
| BLAKE2b-256 |
e1fb2cafa2302ce7cf37857634558db36d14ce9a5fc5c0697e25f3a1bf1608d1
|
Provenance
The following attestation bundles were made for allegro_cli-0.8.0-py3-none-any.whl:
Publisher:
bump.yml on pkonowrocki/allegro-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
allegro_cli-0.8.0-py3-none-any.whl -
Subject digest:
c753df90e997c2a12870b23a986dbca69a2f0b1c8b585fd1578bc37dbe9d9fe3 - Sigstore transparency entry: 2170021046
- Sigstore integration time:
-
Permalink:
pkonowrocki/allegro-cli@9c6d4875f2c617b2d30e109544ca465676a04b13 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/pkonowrocki
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
bump.yml@9c6d4875f2c617b2d30e109544ca465676a04b13 -
Trigger Event:
push
-
Statement type: