proxy-platform 0.3.0__tar.gz → 0.3.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. proxy_platform-0.3.1/PKG-INFO +99 -0
  2. proxy_platform-0.3.1/README.public.md +77 -0
  3. {proxy_platform-0.3.0 → proxy_platform-0.3.1}/proxy_platform/config.py +1 -1
  4. proxy_platform-0.3.1/proxy_platform.egg-info/PKG-INFO +99 -0
  5. {proxy_platform-0.3.0 → proxy_platform-0.3.1}/proxy_platform.egg-info/SOURCES.txt +1 -0
  6. {proxy_platform-0.3.0 → proxy_platform-0.3.1}/pyproject.toml +2 -2
  7. proxy_platform-0.3.0/PKG-INFO +0 -400
  8. proxy_platform-0.3.0/proxy_platform.egg-info/PKG-INFO +0 -400
  9. {proxy_platform-0.3.0 → proxy_platform-0.3.1}/README.md +0 -0
  10. {proxy_platform-0.3.0 → proxy_platform-0.3.1}/proxy_platform/__init__.py +0 -0
  11. {proxy_platform-0.3.0 → proxy_platform-0.3.1}/proxy_platform/client.py +0 -0
  12. {proxy_platform-0.3.0 → proxy_platform-0.3.1}/proxy_platform/commands/__init__.py +0 -0
  13. {proxy_platform-0.3.0 → proxy_platform-0.3.1}/proxy_platform/commands/auth.py +0 -0
  14. {proxy_platform-0.3.0 → proxy_platform-0.3.1}/proxy_platform/commands/clusters.py +0 -0
  15. {proxy_platform-0.3.0 → proxy_platform-0.3.1}/proxy_platform/commands/deployments.py +0 -0
  16. {proxy_platform-0.3.0 → proxy_platform-0.3.1}/proxy_platform/commands/feedback.py +0 -0
  17. {proxy_platform-0.3.0 → proxy_platform-0.3.1}/proxy_platform/commands/firewalls.py +0 -0
  18. {proxy_platform-0.3.0 → proxy_platform-0.3.1}/proxy_platform/commands/orders.py +0 -0
  19. {proxy_platform-0.3.0 → proxy_platform-0.3.1}/proxy_platform/commands/products.py +0 -0
  20. {proxy_platform-0.3.0 → proxy_platform-0.3.1}/proxy_platform/commands/support.py +0 -0
  21. {proxy_platform-0.3.0 → proxy_platform-0.3.1}/proxy_platform/commands/users.py +0 -0
  22. {proxy_platform-0.3.0 → proxy_platform-0.3.1}/proxy_platform/main.py +0 -0
  23. {proxy_platform-0.3.0 → proxy_platform-0.3.1}/proxy_platform/main_public.py +0 -0
  24. {proxy_platform-0.3.0 → proxy_platform-0.3.1}/proxy_platform.egg-info/dependency_links.txt +0 -0
  25. {proxy_platform-0.3.0 → proxy_platform-0.3.1}/proxy_platform.egg-info/entry_points.txt +0 -0
  26. {proxy_platform-0.3.0 → proxy_platform-0.3.1}/proxy_platform.egg-info/requires.txt +0 -0
  27. {proxy_platform-0.3.0 → proxy_platform-0.3.1}/proxy_platform.egg-info/top_level.txt +0 -0
  28. {proxy_platform-0.3.0 → proxy_platform-0.3.1}/setup.cfg +0 -0
  29. {proxy_platform-0.3.0 → proxy_platform-0.3.1}/setup.py +0 -0
  30. {proxy_platform-0.3.0 → proxy_platform-0.3.1}/tests/test_admin_feedback.py +0 -0
  31. {proxy_platform-0.3.0 → proxy_platform-0.3.1}/tests/test_auth.py +0 -0
  32. {proxy_platform-0.3.0 → proxy_platform-0.3.1}/tests/test_client.py +0 -0
  33. {proxy_platform-0.3.0 → proxy_platform-0.3.1}/tests/test_clusters.py +0 -0
  34. {proxy_platform-0.3.0 → proxy_platform-0.3.1}/tests/test_config.py +0 -0
  35. {proxy_platform-0.3.0 → proxy_platform-0.3.1}/tests/test_deployments.py +0 -0
  36. {proxy_platform-0.3.0 → proxy_platform-0.3.1}/tests/test_dev.py +0 -0
  37. {proxy_platform-0.3.0 → proxy_platform-0.3.1}/tests/test_feedback.py +0 -0
  38. {proxy_platform-0.3.0 → proxy_platform-0.3.1}/tests/test_firewalls.py +0 -0
  39. {proxy_platform-0.3.0 → proxy_platform-0.3.1}/tests/test_main.py +0 -0
  40. {proxy_platform-0.3.0 → proxy_platform-0.3.1}/tests/test_orders.py +0 -0
  41. {proxy_platform-0.3.0 → proxy_platform-0.3.1}/tests/test_products.py +0 -0
  42. {proxy_platform-0.3.0 → proxy_platform-0.3.1}/tests/test_users.py +0 -0
@@ -0,0 +1,99 @@
1
+ Metadata-Version: 2.4
2
+ Name: proxy-platform
3
+ Version: 0.3.1
4
+ Summary: CLI client for the Proxy Platform
5
+ Author: Proxy Platform Team
6
+ License: Proprietary
7
+ Requires-Python: >=3.11
8
+ Description-Content-Type: text/markdown
9
+ Requires-Dist: typer[all]>=0.15.0
10
+ Requires-Dist: rich==13.7.1
11
+ Requires-Dist: requests>=2.33.0
12
+ Requires-Dist: python-dotenv>=1.2.2
13
+ Provides-Extra: dev
14
+ Requires-Dist: pytest>=9.0.3; extra == "dev"
15
+ Requires-Dist: pytest-cov==6.0.0; extra == "dev"
16
+ Requires-Dist: pytest-mock==3.14.0; extra == "dev"
17
+ Requires-Dist: httpx==0.28.1; extra == "dev"
18
+ Requires-Dist: ruff==0.14.1; extra == "dev"
19
+ Requires-Dist: mypy==1.14.0; extra == "dev"
20
+ Requires-Dist: types-requests==2.32.4.20250913; extra == "dev"
21
+ Dynamic: requires-python
22
+
23
+ # Proxy Platform CLI
24
+
25
+ A command-line client for the Proxy Platform.
26
+
27
+ ## Installation
28
+
29
+ ```bash
30
+ pipx install proxy-platform
31
+ ```
32
+
33
+ Or with pip:
34
+
35
+ ```bash
36
+ pip install proxy-platform
37
+ ```
38
+
39
+ ## Quick Start
40
+
41
+ ```bash
42
+ # Show available commands
43
+ proxy-platform --help
44
+
45
+ # Log in
46
+ proxy-platform login
47
+
48
+ # Browse the product catalog
49
+ proxy-platform products list
50
+
51
+ # Create an order
52
+ proxy-platform orders create
53
+
54
+ # List your clusters
55
+ proxy-platform clusters list
56
+
57
+ # View your profile
58
+ proxy-platform users profile
59
+ ```
60
+
61
+ ## Commands
62
+
63
+ | Command group | Purpose |
64
+ |---------------|---------|
65
+ | `auth` | Login, logout, and session management |
66
+ | `products` | Browse the product catalog |
67
+ | `orders` | Create and manage orders |
68
+ | `clusters` | Manage your clusters |
69
+ | `firewall` | Manage firewall rules |
70
+ | `users` | View and update your profile |
71
+ | `support` | Open and track support tickets |
72
+ | `feedback` | Submit feedback |
73
+
74
+ Run any command with `--help` for usage details:
75
+
76
+ ```bash
77
+ proxy-platform clusters --help
78
+ proxy-platform orders create --help
79
+ ```
80
+
81
+ ## Shell Completion
82
+
83
+ Enable tab completion in your shell:
84
+
85
+ ```bash
86
+ proxy-platform --install-completion
87
+ ```
88
+
89
+ ## Configuration
90
+
91
+ Configuration and tokens are stored in `~/.proxy-platform/`. Tokens are saved with `0600` permissions and refreshed automatically.
92
+
93
+ ## Requirements
94
+
95
+ - Python 3.11 or newer
96
+
97
+ ## License
98
+
99
+ Proprietary. © Proxy Managed Services.
@@ -0,0 +1,77 @@
1
+ # Proxy Platform CLI
2
+
3
+ A command-line client for the Proxy Platform.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pipx install proxy-platform
9
+ ```
10
+
11
+ Or with pip:
12
+
13
+ ```bash
14
+ pip install proxy-platform
15
+ ```
16
+
17
+ ## Quick Start
18
+
19
+ ```bash
20
+ # Show available commands
21
+ proxy-platform --help
22
+
23
+ # Log in
24
+ proxy-platform login
25
+
26
+ # Browse the product catalog
27
+ proxy-platform products list
28
+
29
+ # Create an order
30
+ proxy-platform orders create
31
+
32
+ # List your clusters
33
+ proxy-platform clusters list
34
+
35
+ # View your profile
36
+ proxy-platform users profile
37
+ ```
38
+
39
+ ## Commands
40
+
41
+ | Command group | Purpose |
42
+ |---------------|---------|
43
+ | `auth` | Login, logout, and session management |
44
+ | `products` | Browse the product catalog |
45
+ | `orders` | Create and manage orders |
46
+ | `clusters` | Manage your clusters |
47
+ | `firewall` | Manage firewall rules |
48
+ | `users` | View and update your profile |
49
+ | `support` | Open and track support tickets |
50
+ | `feedback` | Submit feedback |
51
+
52
+ Run any command with `--help` for usage details:
53
+
54
+ ```bash
55
+ proxy-platform clusters --help
56
+ proxy-platform orders create --help
57
+ ```
58
+
59
+ ## Shell Completion
60
+
61
+ Enable tab completion in your shell:
62
+
63
+ ```bash
64
+ proxy-platform --install-completion
65
+ ```
66
+
67
+ ## Configuration
68
+
69
+ Configuration and tokens are stored in `~/.proxy-platform/`. Tokens are saved with `0600` permissions and refreshed automatically.
70
+
71
+ ## Requirements
72
+
73
+ - Python 3.11 or newer
74
+
75
+ ## License
76
+
77
+ Proprietary. © Proxy Managed Services.
@@ -6,7 +6,7 @@ from datetime import datetime
6
6
  from pathlib import Path
7
7
  from typing import Any
8
8
 
9
- CONFIG_DIR = Path.home() / ".pbd-cli"
9
+ CONFIG_DIR = Path.home() / ".proxy-platform"
10
10
  TOKEN_FILE = CONFIG_DIR / "tokens.json"
11
11
  CONFIG_FILE = CONFIG_DIR / "config.json"
12
12
 
@@ -0,0 +1,99 @@
1
+ Metadata-Version: 2.4
2
+ Name: proxy-platform
3
+ Version: 0.3.1
4
+ Summary: CLI client for the Proxy Platform
5
+ Author: Proxy Platform Team
6
+ License: Proprietary
7
+ Requires-Python: >=3.11
8
+ Description-Content-Type: text/markdown
9
+ Requires-Dist: typer[all]>=0.15.0
10
+ Requires-Dist: rich==13.7.1
11
+ Requires-Dist: requests>=2.33.0
12
+ Requires-Dist: python-dotenv>=1.2.2
13
+ Provides-Extra: dev
14
+ Requires-Dist: pytest>=9.0.3; extra == "dev"
15
+ Requires-Dist: pytest-cov==6.0.0; extra == "dev"
16
+ Requires-Dist: pytest-mock==3.14.0; extra == "dev"
17
+ Requires-Dist: httpx==0.28.1; extra == "dev"
18
+ Requires-Dist: ruff==0.14.1; extra == "dev"
19
+ Requires-Dist: mypy==1.14.0; extra == "dev"
20
+ Requires-Dist: types-requests==2.32.4.20250913; extra == "dev"
21
+ Dynamic: requires-python
22
+
23
+ # Proxy Platform CLI
24
+
25
+ A command-line client for the Proxy Platform.
26
+
27
+ ## Installation
28
+
29
+ ```bash
30
+ pipx install proxy-platform
31
+ ```
32
+
33
+ Or with pip:
34
+
35
+ ```bash
36
+ pip install proxy-platform
37
+ ```
38
+
39
+ ## Quick Start
40
+
41
+ ```bash
42
+ # Show available commands
43
+ proxy-platform --help
44
+
45
+ # Log in
46
+ proxy-platform login
47
+
48
+ # Browse the product catalog
49
+ proxy-platform products list
50
+
51
+ # Create an order
52
+ proxy-platform orders create
53
+
54
+ # List your clusters
55
+ proxy-platform clusters list
56
+
57
+ # View your profile
58
+ proxy-platform users profile
59
+ ```
60
+
61
+ ## Commands
62
+
63
+ | Command group | Purpose |
64
+ |---------------|---------|
65
+ | `auth` | Login, logout, and session management |
66
+ | `products` | Browse the product catalog |
67
+ | `orders` | Create and manage orders |
68
+ | `clusters` | Manage your clusters |
69
+ | `firewall` | Manage firewall rules |
70
+ | `users` | View and update your profile |
71
+ | `support` | Open and track support tickets |
72
+ | `feedback` | Submit feedback |
73
+
74
+ Run any command with `--help` for usage details:
75
+
76
+ ```bash
77
+ proxy-platform clusters --help
78
+ proxy-platform orders create --help
79
+ ```
80
+
81
+ ## Shell Completion
82
+
83
+ Enable tab completion in your shell:
84
+
85
+ ```bash
86
+ proxy-platform --install-completion
87
+ ```
88
+
89
+ ## Configuration
90
+
91
+ Configuration and tokens are stored in `~/.proxy-platform/`. Tokens are saved with `0600` permissions and refreshed automatically.
92
+
93
+ ## Requirements
94
+
95
+ - Python 3.11 or newer
96
+
97
+ ## License
98
+
99
+ Proprietary. © Proxy Managed Services.
@@ -1,4 +1,5 @@
1
1
  README.md
2
+ README.public.md
2
3
  pyproject.toml
3
4
  setup.py
4
5
  proxy_platform/__init__.py
@@ -4,10 +4,10 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "proxy-platform"
7
- version = "0.3.0"
7
+ version = "0.3.1"
8
8
  description = "CLI client for the Proxy Platform"
9
9
  authors = [{ name = "Proxy Platform Team" }]
10
- readme = "README.md"
10
+ readme = "README.public.md"
11
11
  requires-python = ">=3.11"
12
12
  license = { text = "Proprietary" }
13
13
  dependencies = [
@@ -1,400 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: proxy-platform
3
- Version: 0.3.0
4
- Summary: CLI client for the Proxy Platform
5
- Author: Proxy Platform Team
6
- License: Proprietary
7
- Requires-Python: >=3.11
8
- Description-Content-Type: text/markdown
9
- Requires-Dist: typer[all]>=0.15.0
10
- Requires-Dist: rich==13.7.1
11
- Requires-Dist: requests>=2.33.0
12
- Requires-Dist: python-dotenv>=1.2.2
13
- Provides-Extra: dev
14
- Requires-Dist: pytest>=9.0.3; extra == "dev"
15
- Requires-Dist: pytest-cov==6.0.0; extra == "dev"
16
- Requires-Dist: pytest-mock==3.14.0; extra == "dev"
17
- Requires-Dist: httpx==0.28.1; extra == "dev"
18
- Requires-Dist: ruff==0.14.1; extra == "dev"
19
- Requires-Dist: mypy==1.14.0; extra == "dev"
20
- Requires-Dist: types-requests==2.32.4.20250913; extra == "dev"
21
- Dynamic: requires-python
22
-
23
- # PBD API CLI
24
-
25
- A command-line client for interacting with the PBD platform.
26
-
27
- ## Distributions
28
-
29
- This repository produces **two separate packages** from a single codebase:
30
-
31
- | Package | Entry point | Audience | Admin commands |
32
- |---------|-------------|----------|----------------|
33
- | `proxy-platform` | `proxy_platform.main:app` | Proxy employees (internal) | ✅ Included |
34
- | `proxy-platform-public` | `proxy_platform.main_public:app` | End users / customers | ❌ Excluded |
35
-
36
- Both packages expose the same `pbd` command and share all user-facing functionality. The internal package additionally exposes `pbd admin` commands.
37
-
38
- ## Features
39
-
40
- - 🔐 **Authentication** - Login, logout, and manage API tokens (with OTP/2FA support)
41
- - 🌍 **Multi-environment** - Switch between development, test, acceptance, and production
42
- - 🎯 **Dual API Support** - Separate Admin and User commands for clear access control
43
- - 🖥️ **Cluster Management** - List, inspect, rename, delete, kubeconfig, and etcd key
44
- - 🛒 **Orders & Payments** - Guided or fully non-interactive order creation
45
- - 🔥 **Firewall Management** - Create and manage firewall rules
46
- - 🎫 **Support Tickets** - Submit and track support requests
47
- - 💬 **Feedback Portal** - Submit feature requests and vote on community feedback
48
- - 📊 **Rich Output** - Beautiful tables and formatted output
49
- - 🚀 **Easy to Use** - Intuitive command structure with shell completion
50
- - 💾 **Token Storage** - Secure token management in `~/.proxy-platform/`
51
- - 🐛 **Debug Mode** - Verbose logging with `--verbose` flag
52
-
53
- ## Installation
54
-
55
- ### Internal (Proxy employees)
56
-
57
- ```bash
58
- pip install proxy-platform
59
- ```
60
-
61
- Includes all commands including `pbd admin`.
62
-
63
- ### Public (customers)
64
-
65
- ```bash
66
- pip install proxy-platform-public
67
- ```
68
-
69
- Identical to the internal package but without `pbd admin`.
70
-
71
- ### Development setup
72
-
73
- ```bash
74
- cd pbd-api-client
75
- pip install -e ".[dev]"
76
- pre-commit install
77
- ```
78
-
79
- This installs the internal version (with admin) plus all dev tools, and activates the pre-commit hooks.
80
-
81
- To test the public entry point locally:
82
-
83
- ```bash
84
- python -m proxy_platform.main_public
85
- ```
86
-
87
- ### Pre-commit hooks
88
-
89
- The following checks run automatically on every commit:
90
-
91
- | Hook | When | What |
92
- |------|------|------|
93
- | ruff (lint + format) | Python files changed | Code style and formatting |
94
- | mypy | Python files changed | Type checking |
95
- | bandit | `proxy_platform/` files changed | Static security analysis |
96
- | pip-audit | `pyproject*.toml` changed | Known CVEs in dependencies |
97
- | conventional-commit | Every commit | Commit message format |
98
-
99
- If a hook blocks your commit, fix the reported issue and commit again. To run all hooks manually:
100
-
101
- ```bash
102
- pre-commit run --all-files
103
- ```
104
-
105
- ### Enable Shell Completion (Recommended)
106
-
107
- ```bash
108
- pbd --install-completion
109
- source ~/.zshrc # or ~/.bashrc
110
- ```
111
-
112
- ## Quick Start
113
-
114
- ### 1. Set Environment
115
-
116
- ```bash
117
- pbd env production # Switch to production
118
- pbd env development # Switch to local dev
119
- pbd env --show # Show current environment
120
- ```
121
-
122
- ### 2. Login
123
-
124
- ```bash
125
- pbd login
126
- pbd login --email user@example.com --password mypassword
127
- ```
128
-
129
- If your account has 2FA enabled, you'll be prompted for your OTP code automatically.
130
-
131
- ### 3. Deploy a Cluster
132
-
133
- ```bash
134
- # Interactive (guided, recommended)
135
- pbd orders create
136
-
137
- # Fully non-interactive (all flags provided)
138
- pbd orders create --tier "Starter Kit" --provider hetzner --region nbg1 --firewall "My firewall" --yes
139
- ```
140
-
141
- After payment, your cluster is deployed automatically. Check status with:
142
-
143
- ```bash
144
- pbd clusters list
145
- pbd clusters get <cluster-id>
146
- ```
147
-
148
- ## Commands Reference
149
-
150
- ### Authentication
151
-
152
- ```bash
153
- pbd login [--email EMAIL] [--password PASSWORD] [--api admin|user]
154
- pbd logout
155
- pbd whoami [--api admin|user]
156
- pbd auth switch admin
157
- pbd auth switch user
158
- ```
159
-
160
- ### Clusters
161
-
162
- ```bash
163
- # List your clusters
164
- pbd clusters list [--limit 10]
165
-
166
- # Get cluster details
167
- pbd clusters get <cluster-id>
168
-
169
- # Rename a cluster (sets display name)
170
- pbd clusters rename <cluster-id> --name "My cluster"
171
-
172
- # Delete a cluster (shows what will be deleted, asks confirmation)
173
- pbd clusters delete <cluster-id>
174
- pbd clusters delete <cluster-id> --yes # Skip confirmation
175
-
176
- # Download kubeconfig
177
- pbd clusters kubeconfig <cluster-id>
178
- pbd clusters kubeconfig <cluster-id> --output ~/.kube/config
179
-
180
- # Show etcd encryption key
181
- pbd clusters etcd-key <cluster-id>
182
-
183
- # Get deployment info for a cluster
184
- pbd clusters deployment <cluster-id>
185
-
186
- # Get firewall attached to a cluster
187
- pbd clusters firewall <cluster-id>
188
-
189
- # Assign or change the firewall on a cluster
190
- pbd clusters assign-firewall <cluster-id> --firewall "My firewall"
191
- pbd clusters assign-firewall <cluster-id> # interactive selection
192
- ```
193
-
194
- ### Orders & Payments
195
-
196
- Deployments are triggered automatically after successful payment.
197
-
198
- ```bash
199
- # Create an order (interactive when no flags given)
200
- pbd orders create
201
-
202
- # Non-interactive (all steps via flags)
203
- pbd orders create \
204
- --tier "Starter Kit" \
205
- --provider hetzner \
206
- --region nbg1 \
207
- --firewall "My firewall" \
208
- --yes
209
-
210
- # Available flags:
211
- # --product -p Product ID (auto-selects if only one available)
212
- # --tier -t Pricing tier name or ID
213
- # --provider Cloud provider (hetzner)
214
- # --region -r Region code (nbg1, fsn1, hel1, ash)
215
- # --firewall -f Firewall name or ID
216
- # --no-firewall Deploy without firewall
217
- # --yes -y Accept terms without prompting
218
-
219
- # List your orders
220
- pbd orders list [--limit 10]
221
-
222
- # Get order details
223
- pbd orders get <order-id>
224
- ```
225
-
226
- In **development mode**, payment is simulated automatically after order creation. In **production**, a Mollie payment URL is shown.
227
-
228
- ### Firewalls
229
-
230
- ```bash
231
- # List all firewalls
232
- pbd firewall list
233
-
234
- # Get firewall details (including rules)
235
- pbd firewall get <firewall-id>
236
-
237
- # Get firewall by name
238
- pbd firewall by-name <firewall-name>
239
-
240
- # Create a firewall
241
- pbd firewall create --name my-firewall --description "Production firewall"
242
-
243
- # Update a firewall
244
- pbd firewall update <firewall-id> --name new-name
245
-
246
- # Delete a firewall
247
- pbd firewall delete <firewall-id>
248
- pbd firewall delete <firewall-id> --force # Skip confirmation
249
-
250
- # List clusters using a firewall
251
- pbd firewall clusters <firewall-id>
252
-
253
- # Firewall rules
254
- pbd firewall rules list <firewall-id>
255
- pbd firewall rules create <firewall-id> --direction inbound --protocol tcp --port-min 443 --port-max 443 --remote-ip 0.0.0.0/0
256
- pbd firewall rules delete <firewall-id> <rule-id>
257
- ```
258
-
259
- ### Products
260
-
261
- ```bash
262
- pbd products list [--limit 50]
263
- pbd products get <product-id>
264
- pbd products get f25bea71 # Partial IDs are resolved automatically
265
- ```
266
-
267
- ### Users
268
-
269
- ```bash
270
- pbd users profile
271
- pbd users stats
272
- pbd users activities [--limit 10]
273
- pbd users orders [--limit 10]
274
- pbd users verification
275
- ```
276
-
277
- ### Support
278
-
279
- ```bash
280
- pbd support submit --subject "Cannot access cluster" --description "Getting 403 error" --category technical
281
- pbd support list [--category technical] [--status open]
282
- pbd support get <ticket-id>
283
- pbd support reply <ticket-id> --content "Additional info"
284
- pbd support close <ticket-id> [--yes]
285
- ```
286
-
287
- Valid categories: `general`, `billing`, `technical`, `other`
288
- Valid statuses: `open`, `in_progress`, `closed`
289
-
290
- ### Feedback
291
-
292
- ```bash
293
- pbd feedback submit --title "Feature request" --description "..." --category feature
294
- pbd feedback list [--category feature] [--status open]
295
- pbd feedback get <feedback-id>
296
- pbd feedback vote <feedback-id>
297
- pbd feedback unvote <feedback-id>
298
- pbd feedback comment <feedback-id> --content "I need this too"
299
- ```
300
-
301
- ### Admin Commands (Proxy employees only)
302
-
303
- ```bash
304
- pbd admin login
305
- pbd admin clusters [--limit 10]
306
- pbd admin users [--limit 50] [--search "email@example.com"]
307
- pbd admin orders [--limit 50] [--status paid]
308
- ```
309
-
310
- Admin and user sessions are independent — you can be logged in as both simultaneously.
311
-
312
- ### Development Commands (Local only)
313
-
314
- These commands are blocked outside the `development` environment.
315
-
316
- ```bash
317
- pbd dev simulate-payment <order-id> [--status paid|failed]
318
- pbd dev trigger-deployment <order-id>
319
- ```
320
-
321
- ### Environment
322
-
323
- ```bash
324
- pbd env development
325
- pbd env test
326
- pbd env acceptance
327
- pbd env production
328
- pbd env --show
329
- ```
330
-
331
- ### General
332
-
333
- ```bash
334
- pbd version
335
- pbd --help
336
- pbd clusters --help
337
- ```
338
-
339
- ## Environment Configuration
340
-
341
- | Environment | Admin API | User API |
342
- |-------------|-----------|----------|
343
- | **development** | http://localhost:8001 | http://localhost:8002 |
344
- | **test** | https://admin-api.tst.pbd.proxy.nl | https://api.tst.pbd.proxy.nl |
345
- | **acceptance** | https://admin-api.acc.pbd.proxy.nl | https://api.acc.pbd.proxy.nl |
346
- | **production** | https://admin-api.prd.pbd.proxy.nl | https://api.platform.proxy.nl |
347
-
348
- ## Configuration
349
-
350
- Tokens and settings are stored in `~/.proxy-platform/`:
351
-
352
- ```
353
- ~/.proxy-platform/
354
- ├── config.json # Environment and default API settings
355
- └── tokens.json # Authentication tokens (per environment, 0600)
356
- ```
357
-
358
- ## Project Structure
359
-
360
- ```
361
- pbd-api-client/
362
- ├── pyproject.toml # Internal distribution (proxy-platform, includes admin)
363
- ├── pyproject.public.toml # Public distribution (proxy-platform-public, no admin)
364
- └── proxy_platform/
365
- ├── main.py # Internal CLI entry point
366
- ├── main_public.py # Public CLI entry point (no admin)
367
- ├── config.py
368
- ├── client.py
369
- └── commands/
370
- ├── auth.py
371
- ├── clusters.py
372
- ├── feedback.py
373
- ├── firewalls.py
374
- ├── orders.py
375
- ├── products.py
376
- ├── support.py
377
- ├── users.py
378
- └── admin/ # Only included in proxy-platform (internal)
379
- ```
380
-
381
- ## Troubleshooting
382
-
383
- ```bash
384
- # Debug mode — shows all API calls and responses
385
- pbd --verbose <command>
386
-
387
- # Re-authenticate
388
- pbd logout && pbd login
389
-
390
- # Check environment
391
- pbd env --show
392
- ```
393
-
394
- ## Requirements
395
-
396
- - Python 3.11+
397
-
398
- ## License
399
-
400
- Internal use only — PBD Development Team
@@ -1,400 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: proxy-platform
3
- Version: 0.3.0
4
- Summary: CLI client for the Proxy Platform
5
- Author: Proxy Platform Team
6
- License: Proprietary
7
- Requires-Python: >=3.11
8
- Description-Content-Type: text/markdown
9
- Requires-Dist: typer[all]>=0.15.0
10
- Requires-Dist: rich==13.7.1
11
- Requires-Dist: requests>=2.33.0
12
- Requires-Dist: python-dotenv>=1.2.2
13
- Provides-Extra: dev
14
- Requires-Dist: pytest>=9.0.3; extra == "dev"
15
- Requires-Dist: pytest-cov==6.0.0; extra == "dev"
16
- Requires-Dist: pytest-mock==3.14.0; extra == "dev"
17
- Requires-Dist: httpx==0.28.1; extra == "dev"
18
- Requires-Dist: ruff==0.14.1; extra == "dev"
19
- Requires-Dist: mypy==1.14.0; extra == "dev"
20
- Requires-Dist: types-requests==2.32.4.20250913; extra == "dev"
21
- Dynamic: requires-python
22
-
23
- # PBD API CLI
24
-
25
- A command-line client for interacting with the PBD platform.
26
-
27
- ## Distributions
28
-
29
- This repository produces **two separate packages** from a single codebase:
30
-
31
- | Package | Entry point | Audience | Admin commands |
32
- |---------|-------------|----------|----------------|
33
- | `proxy-platform` | `proxy_platform.main:app` | Proxy employees (internal) | ✅ Included |
34
- | `proxy-platform-public` | `proxy_platform.main_public:app` | End users / customers | ❌ Excluded |
35
-
36
- Both packages expose the same `pbd` command and share all user-facing functionality. The internal package additionally exposes `pbd admin` commands.
37
-
38
- ## Features
39
-
40
- - 🔐 **Authentication** - Login, logout, and manage API tokens (with OTP/2FA support)
41
- - 🌍 **Multi-environment** - Switch between development, test, acceptance, and production
42
- - 🎯 **Dual API Support** - Separate Admin and User commands for clear access control
43
- - 🖥️ **Cluster Management** - List, inspect, rename, delete, kubeconfig, and etcd key
44
- - 🛒 **Orders & Payments** - Guided or fully non-interactive order creation
45
- - 🔥 **Firewall Management** - Create and manage firewall rules
46
- - 🎫 **Support Tickets** - Submit and track support requests
47
- - 💬 **Feedback Portal** - Submit feature requests and vote on community feedback
48
- - 📊 **Rich Output** - Beautiful tables and formatted output
49
- - 🚀 **Easy to Use** - Intuitive command structure with shell completion
50
- - 💾 **Token Storage** - Secure token management in `~/.proxy-platform/`
51
- - 🐛 **Debug Mode** - Verbose logging with `--verbose` flag
52
-
53
- ## Installation
54
-
55
- ### Internal (Proxy employees)
56
-
57
- ```bash
58
- pip install proxy-platform
59
- ```
60
-
61
- Includes all commands including `pbd admin`.
62
-
63
- ### Public (customers)
64
-
65
- ```bash
66
- pip install proxy-platform-public
67
- ```
68
-
69
- Identical to the internal package but without `pbd admin`.
70
-
71
- ### Development setup
72
-
73
- ```bash
74
- cd pbd-api-client
75
- pip install -e ".[dev]"
76
- pre-commit install
77
- ```
78
-
79
- This installs the internal version (with admin) plus all dev tools, and activates the pre-commit hooks.
80
-
81
- To test the public entry point locally:
82
-
83
- ```bash
84
- python -m proxy_platform.main_public
85
- ```
86
-
87
- ### Pre-commit hooks
88
-
89
- The following checks run automatically on every commit:
90
-
91
- | Hook | When | What |
92
- |------|------|------|
93
- | ruff (lint + format) | Python files changed | Code style and formatting |
94
- | mypy | Python files changed | Type checking |
95
- | bandit | `proxy_platform/` files changed | Static security analysis |
96
- | pip-audit | `pyproject*.toml` changed | Known CVEs in dependencies |
97
- | conventional-commit | Every commit | Commit message format |
98
-
99
- If a hook blocks your commit, fix the reported issue and commit again. To run all hooks manually:
100
-
101
- ```bash
102
- pre-commit run --all-files
103
- ```
104
-
105
- ### Enable Shell Completion (Recommended)
106
-
107
- ```bash
108
- pbd --install-completion
109
- source ~/.zshrc # or ~/.bashrc
110
- ```
111
-
112
- ## Quick Start
113
-
114
- ### 1. Set Environment
115
-
116
- ```bash
117
- pbd env production # Switch to production
118
- pbd env development # Switch to local dev
119
- pbd env --show # Show current environment
120
- ```
121
-
122
- ### 2. Login
123
-
124
- ```bash
125
- pbd login
126
- pbd login --email user@example.com --password mypassword
127
- ```
128
-
129
- If your account has 2FA enabled, you'll be prompted for your OTP code automatically.
130
-
131
- ### 3. Deploy a Cluster
132
-
133
- ```bash
134
- # Interactive (guided, recommended)
135
- pbd orders create
136
-
137
- # Fully non-interactive (all flags provided)
138
- pbd orders create --tier "Starter Kit" --provider hetzner --region nbg1 --firewall "My firewall" --yes
139
- ```
140
-
141
- After payment, your cluster is deployed automatically. Check status with:
142
-
143
- ```bash
144
- pbd clusters list
145
- pbd clusters get <cluster-id>
146
- ```
147
-
148
- ## Commands Reference
149
-
150
- ### Authentication
151
-
152
- ```bash
153
- pbd login [--email EMAIL] [--password PASSWORD] [--api admin|user]
154
- pbd logout
155
- pbd whoami [--api admin|user]
156
- pbd auth switch admin
157
- pbd auth switch user
158
- ```
159
-
160
- ### Clusters
161
-
162
- ```bash
163
- # List your clusters
164
- pbd clusters list [--limit 10]
165
-
166
- # Get cluster details
167
- pbd clusters get <cluster-id>
168
-
169
- # Rename a cluster (sets display name)
170
- pbd clusters rename <cluster-id> --name "My cluster"
171
-
172
- # Delete a cluster (shows what will be deleted, asks confirmation)
173
- pbd clusters delete <cluster-id>
174
- pbd clusters delete <cluster-id> --yes # Skip confirmation
175
-
176
- # Download kubeconfig
177
- pbd clusters kubeconfig <cluster-id>
178
- pbd clusters kubeconfig <cluster-id> --output ~/.kube/config
179
-
180
- # Show etcd encryption key
181
- pbd clusters etcd-key <cluster-id>
182
-
183
- # Get deployment info for a cluster
184
- pbd clusters deployment <cluster-id>
185
-
186
- # Get firewall attached to a cluster
187
- pbd clusters firewall <cluster-id>
188
-
189
- # Assign or change the firewall on a cluster
190
- pbd clusters assign-firewall <cluster-id> --firewall "My firewall"
191
- pbd clusters assign-firewall <cluster-id> # interactive selection
192
- ```
193
-
194
- ### Orders & Payments
195
-
196
- Deployments are triggered automatically after successful payment.
197
-
198
- ```bash
199
- # Create an order (interactive when no flags given)
200
- pbd orders create
201
-
202
- # Non-interactive (all steps via flags)
203
- pbd orders create \
204
- --tier "Starter Kit" \
205
- --provider hetzner \
206
- --region nbg1 \
207
- --firewall "My firewall" \
208
- --yes
209
-
210
- # Available flags:
211
- # --product -p Product ID (auto-selects if only one available)
212
- # --tier -t Pricing tier name or ID
213
- # --provider Cloud provider (hetzner)
214
- # --region -r Region code (nbg1, fsn1, hel1, ash)
215
- # --firewall -f Firewall name or ID
216
- # --no-firewall Deploy without firewall
217
- # --yes -y Accept terms without prompting
218
-
219
- # List your orders
220
- pbd orders list [--limit 10]
221
-
222
- # Get order details
223
- pbd orders get <order-id>
224
- ```
225
-
226
- In **development mode**, payment is simulated automatically after order creation. In **production**, a Mollie payment URL is shown.
227
-
228
- ### Firewalls
229
-
230
- ```bash
231
- # List all firewalls
232
- pbd firewall list
233
-
234
- # Get firewall details (including rules)
235
- pbd firewall get <firewall-id>
236
-
237
- # Get firewall by name
238
- pbd firewall by-name <firewall-name>
239
-
240
- # Create a firewall
241
- pbd firewall create --name my-firewall --description "Production firewall"
242
-
243
- # Update a firewall
244
- pbd firewall update <firewall-id> --name new-name
245
-
246
- # Delete a firewall
247
- pbd firewall delete <firewall-id>
248
- pbd firewall delete <firewall-id> --force # Skip confirmation
249
-
250
- # List clusters using a firewall
251
- pbd firewall clusters <firewall-id>
252
-
253
- # Firewall rules
254
- pbd firewall rules list <firewall-id>
255
- pbd firewall rules create <firewall-id> --direction inbound --protocol tcp --port-min 443 --port-max 443 --remote-ip 0.0.0.0/0
256
- pbd firewall rules delete <firewall-id> <rule-id>
257
- ```
258
-
259
- ### Products
260
-
261
- ```bash
262
- pbd products list [--limit 50]
263
- pbd products get <product-id>
264
- pbd products get f25bea71 # Partial IDs are resolved automatically
265
- ```
266
-
267
- ### Users
268
-
269
- ```bash
270
- pbd users profile
271
- pbd users stats
272
- pbd users activities [--limit 10]
273
- pbd users orders [--limit 10]
274
- pbd users verification
275
- ```
276
-
277
- ### Support
278
-
279
- ```bash
280
- pbd support submit --subject "Cannot access cluster" --description "Getting 403 error" --category technical
281
- pbd support list [--category technical] [--status open]
282
- pbd support get <ticket-id>
283
- pbd support reply <ticket-id> --content "Additional info"
284
- pbd support close <ticket-id> [--yes]
285
- ```
286
-
287
- Valid categories: `general`, `billing`, `technical`, `other`
288
- Valid statuses: `open`, `in_progress`, `closed`
289
-
290
- ### Feedback
291
-
292
- ```bash
293
- pbd feedback submit --title "Feature request" --description "..." --category feature
294
- pbd feedback list [--category feature] [--status open]
295
- pbd feedback get <feedback-id>
296
- pbd feedback vote <feedback-id>
297
- pbd feedback unvote <feedback-id>
298
- pbd feedback comment <feedback-id> --content "I need this too"
299
- ```
300
-
301
- ### Admin Commands (Proxy employees only)
302
-
303
- ```bash
304
- pbd admin login
305
- pbd admin clusters [--limit 10]
306
- pbd admin users [--limit 50] [--search "email@example.com"]
307
- pbd admin orders [--limit 50] [--status paid]
308
- ```
309
-
310
- Admin and user sessions are independent — you can be logged in as both simultaneously.
311
-
312
- ### Development Commands (Local only)
313
-
314
- These commands are blocked outside the `development` environment.
315
-
316
- ```bash
317
- pbd dev simulate-payment <order-id> [--status paid|failed]
318
- pbd dev trigger-deployment <order-id>
319
- ```
320
-
321
- ### Environment
322
-
323
- ```bash
324
- pbd env development
325
- pbd env test
326
- pbd env acceptance
327
- pbd env production
328
- pbd env --show
329
- ```
330
-
331
- ### General
332
-
333
- ```bash
334
- pbd version
335
- pbd --help
336
- pbd clusters --help
337
- ```
338
-
339
- ## Environment Configuration
340
-
341
- | Environment | Admin API | User API |
342
- |-------------|-----------|----------|
343
- | **development** | http://localhost:8001 | http://localhost:8002 |
344
- | **test** | https://admin-api.tst.pbd.proxy.nl | https://api.tst.pbd.proxy.nl |
345
- | **acceptance** | https://admin-api.acc.pbd.proxy.nl | https://api.acc.pbd.proxy.nl |
346
- | **production** | https://admin-api.prd.pbd.proxy.nl | https://api.platform.proxy.nl |
347
-
348
- ## Configuration
349
-
350
- Tokens and settings are stored in `~/.proxy-platform/`:
351
-
352
- ```
353
- ~/.proxy-platform/
354
- ├── config.json # Environment and default API settings
355
- └── tokens.json # Authentication tokens (per environment, 0600)
356
- ```
357
-
358
- ## Project Structure
359
-
360
- ```
361
- pbd-api-client/
362
- ├── pyproject.toml # Internal distribution (proxy-platform, includes admin)
363
- ├── pyproject.public.toml # Public distribution (proxy-platform-public, no admin)
364
- └── proxy_platform/
365
- ├── main.py # Internal CLI entry point
366
- ├── main_public.py # Public CLI entry point (no admin)
367
- ├── config.py
368
- ├── client.py
369
- └── commands/
370
- ├── auth.py
371
- ├── clusters.py
372
- ├── feedback.py
373
- ├── firewalls.py
374
- ├── orders.py
375
- ├── products.py
376
- ├── support.py
377
- ├── users.py
378
- └── admin/ # Only included in proxy-platform (internal)
379
- ```
380
-
381
- ## Troubleshooting
382
-
383
- ```bash
384
- # Debug mode — shows all API calls and responses
385
- pbd --verbose <command>
386
-
387
- # Re-authenticate
388
- pbd logout && pbd login
389
-
390
- # Check environment
391
- pbd env --show
392
- ```
393
-
394
- ## Requirements
395
-
396
- - Python 3.11+
397
-
398
- ## License
399
-
400
- Internal use only — PBD Development Team
File without changes
File without changes
File without changes