Skip to main content

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


Download files

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

Source Distribution

polar_cli-1.0.0.tar.gz (61.7 kB view details)

Uploaded Source

Built Distribution

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

polar_cli-1.0.0-py3-none-any.whl (46.0 kB view details)

Uploaded Python 3

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

Hashes for polar_cli-1.0.0.tar.gz
Algorithm Hash digest
SHA256 214d5beb7a285db33a451ad207664e116a8c379aee16e5608f7ede743c3f7620
MD5 f8dc59190df97b121a70637360a6a52f
BLAKE2b-256 79b1a305206f0d73e08c6a3d891535f142371767c6d02ef28e84ab341c3cc626

See more details on using hashes here.

Provenance

The following attestation bundles were made for polar_cli-1.0.0.tar.gz:

Publisher: release.yaml on berkantay/polar-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 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

Hashes for polar_cli-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fd23c3fa5a2f2a479dc0f7f015d9f8b1eabf36308448ae128335d9d1c51243dd
MD5 0ba3093334ecb3225a6c4791e358c4f6
BLAKE2b-256 d214c5bfede522722d78ce2ae25ac149c21717df16421c1b04b6c825aff7d10c

See more details on using hashes here.

Provenance

The following attestation bundles were made for polar_cli-1.0.0-py3-none-any.whl:

Publisher: release.yaml on berkantay/polar-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