Astro Commerce is a Codex/OpenClaw skill and Python CLI for pulling, syncing, charting, and inspecting commerce data across sales and inventory channels like Shopify, Amazon, App Store, Stripe etc.
Supported channels
- Amazon
- Shopify
- Stripe
- App Store
- Fastspring
Features
- Sales and inventory reporting
- Built in charts
- SQLite sync for unified reporting
- CSV/table/JSON/records output
- Inventory alert calculations
Clone the repo and install Python dependencies:
git clone https://github.com/AstroHQ/astro-commerce.git
cd astro-commerce
python3 -m pip install --user -r requirements.txtFirst run configure to enable the services you want:
scripts/astro-commerce configureTo install command shims into your local workspace:
scripts/astro-commerce install --with-depsAfter installation:
astro-commerce doctor
astro-commerce --demo shopify sales --yesterday --group skuastro-commerce shopify sales --days 30 --match "luna" --group sku
astro-commerce amazon sales --days 7 --group day
astro-commerce stripe sales --days 30 --group sku
astro-commerce appstore sales --yesterday --group sku
astro-commerce fastspring sales --yesterday --group sku-day
astro-commerce sync run --channel all --days 7
astro-commerce inventory-alerts --output jsonLonger runnable examples live in demo/, including Slack webhook posting, chart generation, composable ETL, and daily report scripts.
astro-commerce --demo shopify sales --days 7 --group skuRepresentative output:
+----------------------+-------+-----------+
| SKU | Units | Revenue |
+----------------------+-------+-----------+
| luna-display-usb-c | 42 | $4,117.82 |
| rpp-ipad-pro-13 | 31 | $2,904.15 |
| fresh-coat-13 | 18 | $1,026.40 |
| TOTAL | 91 | $8,048.37 |
+----------------------+-------+-----------+
export SLACK_WEBHOOK_URL="<your Slack incoming webhook URL>"
demo/scripts/slack-daily-report.shSlack message shape:
*Daily commerce report*
- shopify: $12,418.92 / 217 units
- amazon: $8,734.11 / 164 units
- stripe: $2,129.00 / 38 units
- appstore: $1,840.52 / 93 units
- fastspring: $1,112.45 / 12 units
demo/scripts/inventory-alerts-slack.shRepresentative Slack output:
*Inventory alerts*
- HIGH shopify / ITB / rpp-ipad-pro-13: 6 days remaining, reorder 240 units
- MED amazon / FBA / luna-display-usb-c: 13 days remaining, reorder 120 units
- WATCH shopify / Warehouse / fresh-coat-13: 24 days remaining
PRODUCT_MATCH=luna CHANNEL=shopify OUT=luna-shopify-30d.png demo/scripts/product-trend-chart.shConfigure the default SQLite database:
astro-commerce configureCredential files and environment variables are intentionally not committed. Channel options are documented here:
Most source commands support:
tablefor terminal outputcsvfor spreadsheets and chartingjsonfor structured inspectionrecordsfor piping intoastro-commerce sync ingest
Example:
astro-commerce shopify sales --yesterday --output records | astro-commerce sync ingestastro-commerce inventory-alerts calculates action items from synced sales and inventory data:
astro-commerce inventory-alerts
astro-commerce inventory-alerts --days 30 --output slack
astro-commerce inventory-alerts --channel shopify --location "ITB" --hide-sku old-skuSee database-schema.md and sync.md for how synced data is stored.
Run the offline test suite:
python3 -m unittest discover -s testsLive API smoke tests are opt-in and skip channels without credentials:
python3 tests/test_astro_commerce_smoke.py --live
python3 tests/test_astro_commerce_smoke.py --live --channels shopify,stripeFor Codex/OpenClaw skill installation, this repository root is the skill directory. The skill manifest and agent instructions live in SKILL.md.
When calling from an agent without installing shims, prefer repo-relative commands:
{baseDir}/scripts/astro-commerce doctor
{baseDir}/scripts/astro-commerce sync run --channel all --days 7