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-0.1.0.tar.gz (61.3 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-0.1.0-py3-none-any.whl (46.0 kB view details)

Uploaded Python 3

File details

Details for the file polar_cli-0.1.0.tar.gz.

File metadata

  • Download URL: polar_cli-0.1.0.tar.gz
  • Upload date:
  • Size: 61.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for polar_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ad54968d94a0cc47e3be22f4d99119d78ee0baf2b0f27f43d3c3127fa4ab45b4
MD5 da29d3300a1ca5cb449169500acafb75
BLAKE2b-256 160561de49047d5fbe46e665e22dc1e8be6b31e6e1f2d68c753a1a56cf4125e3

See more details on using hashes here.

Provenance

The following attestation bundles were made for polar_cli-0.1.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-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: polar_cli-0.1.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-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4a15c5533b13701775e0f09a70dda29f529a797a60363ac016519d04f09261c2
MD5 a562ade84daacbb579b04290d582c0ff
BLAKE2b-256 5335b56e037bd52c04b5f60219dc94842c47176dbdd84b3f35705664feaa456d

See more details on using hashes here.

Provenance

The following attestation bundles were made for polar_cli-0.1.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