CLI for Polar — manage products, customers, and webhooks from the terminal
Project description
Polar CLI
A command-line interface for Polar — manage products, customers, subscriptions, and webhooks from your terminal.
Installation
pip install polar-cli
Or with uv:
uv tool install polar-cli
Quick Start
# Authenticate with Polar
polar auth login
# List your products
polar products list
# Create a customer
polar customers create --email user@example.com --name "John Doe"
# Stream events in real-time
polar events stream
Features
- Full API coverage: Products, customers, subscriptions, orders, webhooks, and more
- Multiple output formats: Table (default), JSON, or YAML
- Secure authentication: OAuth device flow with secure token storage
- Real-time streaming: Watch events as they happen
- Sandbox support: Test against sandbox environment with
--sandbox
Commands
polar auth Authentication commands
polar products Manage products
polar customers Manage customers
polar subscriptions Manage subscriptions
polar orders Manage orders
polar webhooks Manage webhook endpoints
polar events View and stream events
polar checkouts Manage checkout sessions
polar discounts Manage discounts
polar benefits Manage benefits
polar license-keys Manage license keys
polar meters Manage usage meters
polar files Manage files
polar refunds Manage refunds
polar organizations Manage organizations
Output Formats
# Default table output
polar products list
# JSON output
polar products list --output json
# YAML output
polar products list --output yaml
Sandbox Mode
Test against the sandbox environment:
polar --sandbox products list
Or set globally:
polar config set sandbox true
Configuration
Configuration is stored in ~/.config/polar-cli/ (or platform equivalent).
# View current config
polar config show
# Set default organization
polar config set default_org org_xxx
# Set default output format
polar config set output json
Development
# Clone the repo
git clone https://github.com/berkantay/polar-cli
cd polar-cli
# Install with dev dependencies
uv sync --dev
# Run tests
uv run pytest
# Run the CLI
uv run polar --help
License
Apache 2.0
Project details
Release history Release notifications | RSS feed
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 polar_cli-1.0.0.tar.gz.
File metadata
- Download URL: polar_cli-1.0.0.tar.gz
- Upload date:
- Size: 61.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
214d5beb7a285db33a451ad207664e116a8c379aee16e5608f7ede743c3f7620
|
|
| MD5 |
f8dc59190df97b121a70637360a6a52f
|
|
| BLAKE2b-256 |
79b1a305206f0d73e08c6a3d891535f142371767c6d02ef28e84ab341c3cc626
|
Provenance
The following attestation bundles were made for polar_cli-1.0.0.tar.gz:
Publisher:
release.yaml on berkantay/polar-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
polar_cli-1.0.0.tar.gz -
Subject digest:
214d5beb7a285db33a451ad207664e116a8c379aee16e5608f7ede743c3f7620 - Sigstore transparency entry: 995666673
- Sigstore integration time:
-
Permalink:
berkantay/polar-cli@2e9a4a4af5714b4fbc74fb6e96869ae3d87abf75 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/berkantay
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@2e9a4a4af5714b4fbc74fb6e96869ae3d87abf75 -
Trigger Event:
push
-
Statement type:
File details
Details for the file polar_cli-1.0.0-py3-none-any.whl.
File metadata
- Download URL: polar_cli-1.0.0-py3-none-any.whl
- Upload date:
- Size: 46.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd23c3fa5a2f2a479dc0f7f015d9f8b1eabf36308448ae128335d9d1c51243dd
|
|
| MD5 |
0ba3093334ecb3225a6c4791e358c4f6
|
|
| BLAKE2b-256 |
d214c5bfede522722d78ce2ae25ac149c21717df16421c1b04b6c825aff7d10c
|
Provenance
The following attestation bundles were made for polar_cli-1.0.0-py3-none-any.whl:
Publisher:
release.yaml on berkantay/polar-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
polar_cli-1.0.0-py3-none-any.whl -
Subject digest:
fd23c3fa5a2f2a479dc0f7f015d9f8b1eabf36308448ae128335d9d1c51243dd - Sigstore transparency entry: 995666711
- Sigstore integration time:
-
Permalink:
berkantay/polar-cli@2e9a4a4af5714b4fbc74fb6e96869ae3d87abf75 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/berkantay
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@2e9a4a4af5714b4fbc74fb6e96869ae3d87abf75 -
Trigger Event:
push
-
Statement type: