Metadata-Version: 2.4
Name: proxy-platform
Version: 0.9.1
Summary: CLI client for the Proxy Platform
Author: Proxy Platform B.V.
License: Proprietary - Proxy Platform B.V.
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: typer[all]>=0.15.0
Requires-Dist: rich==13.7.1
Requires-Dist: requests>=2.33.0
Provides-Extra: dev
Requires-Dist: pytest>=9.0.3; extra == "dev"
Requires-Dist: pytest-cov==6.0.0; extra == "dev"
Requires-Dist: pytest-mock==3.14.0; extra == "dev"
Requires-Dist: httpx==0.28.1; extra == "dev"
Requires-Dist: ruff==0.14.1; extra == "dev"
Requires-Dist: mypy==1.14.0; extra == "dev"
Requires-Dist: types-requests==2.32.4.20250913; extra == "dev"

# Proxy Platform CLI

A command-line client for the Proxy Platform.

## Installation

```bash
pipx install proxy-platform
```

Or with pip:

```bash
pip install proxy-platform
```

## Quick Start

```bash
# Show available commands
proxy-platform --help

# Log in
proxy-platform login

# Browse the product catalog
proxy-platform products list

# List your clusters
proxy-platform clusters list

# List your managed databases
proxy-platform databases list

# List your managed Nextcloud environments
proxy-platform nextcloud list

# Browse the marketplace
proxy-platform marketplace list

# View your invoices
proxy-platform billing invoices

# View your profile
proxy-platform users profile
```

## Working in an organization

If you are a member of one or more organizations, choose the context the CLI works in.
Clusters, Nextcloud, databases and firewalls are listed and created in that context.

```bash
# List your organizations and your role in each
proxy-platform organizations list

# Work in an organization
proxy-platform organizations use <organization-id>

# Back to your personal account
proxy-platform organizations use personal

# Show the active context
proxy-platform organizations current
```

The choice is remembered. For scripts you can override it per command with the
`PROXY_PLATFORM_CONTEXT` environment variable (an organization ID or `personal`).

## Ordering

Orders go through the cart, like in the web portal:

```bash
proxy-platform cart add --product <product-id> --tier <tier-id> --type cluster --name prod \
    --config '{"provider": "hetzner", "region": "fsn1"}'
proxy-platform cart show

# Optional: turn the cart into a quote (PDF)
proxy-platform cart quote --reference PO-2026-114 --output quote.pdf

# Order everything in the cart; you must accept the documents explicitly
proxy-platform documents list
proxy-platform cart checkout --accept-documents
```

## Commands

| Command group | Purpose |
|---------------|---------|
| `auth` | Login, logout, and session management |
| `organizations` | Organizations, the active context, members, invites, and resource locks |
| `products` | Browse the product catalog |
| `cart` | Cart, quotes, and checkout |
| `orders` | View your orders, or order a single product directly |
| `clusters` | Manage your Kubernetes clusters, including scaling and logs |
| `apps` | Install, configure, upgrade, and remove marketplace apps on your clusters |
| `gpu-requests` | Request a GPU cluster, follow the review, and order it once approved |
| `databases` | Manage your managed databases |
| `nextcloud` | Manage your Nextcloud environments: upgrades, modules, login credentials, custom domain |
| `marketplace` | Browse marketplace apps, versions, and reviews |
| `billing` | Invoices, billing information, and payments |
| `subscriptions` | View your subscriptions, cancel per the end of the month, or undo a cancellation |
| `firewall` | Manage firewall rules |
| `providers` | Cloud provider regions and server types |
| `documents` | Download your documents |
| `settings` | Manage your account preferences |
| `users` | View and update your profile |
| `support` | Open and track support tickets |
| `feedback` | Submit feedback and feature requests |

Run any command with `--help` for usage details:

```bash
proxy-platform clusters --help
proxy-platform databases list --help
proxy-platform orders create --help
```

## Shell Completion

Enable tab completion in your shell:

```bash
proxy-platform --install-completion
```

## Configuration

Configuration and tokens are stored in `~/.proxy-platform/`. Tokens are saved with `0600` permissions and refreshed automatically.

## Requirements

- Python 3.11 or newer

## License

Proprietary. © Proxy Platform B.V.
