Skip to main content

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

Metadata

Release files for polar-cli 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for polar-cli 1.0.0
File Size Uploaded
polar_cli-1.0.0.tar.gz 61.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for polar-cli 1.0.0
File Interpreter ABI Platform
polar_cli-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 107.6 kB

Release files / polar_cli-1.0.0.tar.gz

Download URL polar_cli-1.0.0.tar.gz
Size 61.7 kB
Tags Source
SHA-256 checksum
How to use checksums
214d5beb7a285db33a451ad207664e116a8c379aee16e5608f7ede743c3f7620
BLAKE2b-256 checksum
How to use checksums
79b1a305206f0d73e08c6a3d891535f142371767c6d02ef28e84ab341c3cc626
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 26, 2026.

Transparency log

Release files / polar_cli-1.0.0-py3-none-any.whl

Download URL polar_cli-1.0.0-py3-none-any.whl
Size 46.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fd23c3fa5a2f2a479dc0f7f015d9f8b1eabf36308448ae128335d9d1c51243dd
BLAKE2b-256 checksum
How to use checksums
d214c5bfede522722d78ce2ae25ac149c21717df16421c1b04b6c825aff7d10c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 26, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page