ibee-cli 0.2.0__tar.gz → 0.3.0__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.
- ibee_cli-0.3.0/PKG-INFO +282 -0
- ibee_cli-0.3.0/README.md +257 -0
- {ibee_cli-0.2.0 → ibee_cli-0.3.0}/pyproject.toml +5 -4
- {ibee_cli-0.2.0 → ibee_cli-0.3.0}/src/ibee_cli/__init__.py +1 -1
- ibee_cli-0.3.0/src/ibee_cli/commands/billing.py +47 -0
- ibee_cli-0.3.0/src/ibee_cli/commands/block_storage.py +139 -0
- ibee_cli-0.3.0/src/ibee_cli/commands/buckets.py +272 -0
- ibee_cli-0.3.0/src/ibee_cli/commands/cdn.py +162 -0
- {ibee_cli-0.2.0 → ibee_cli-0.3.0}/src/ibee_cli/commands/compute.py +11 -33
- ibee_cli-0.3.0/src/ibee_cli/commands/console.py +77 -0
- ibee_cli-0.3.0/src/ibee_cli/commands/firewalls.py +261 -0
- {ibee_cli-0.2.0 → ibee_cli-0.3.0}/src/ibee_cli/commands/gpus.py +36 -10
- ibee_cli-0.3.0/src/ibee_cli/commands/load_balancers.py +256 -0
- ibee_cli-0.3.0/src/ibee_cli/commands/networking.py +474 -0
- {ibee_cli-0.2.0 → ibee_cli-0.3.0}/src/ibee_cli/commands/ops.py +2 -2
- ibee_cli-0.3.0/src/ibee_cli/commands/reserved_ips.py +164 -0
- ibee_cli-0.3.0/src/ibee_cli/commands/secrets.py +930 -0
- ibee_cli-0.3.0/src/ibee_cli/commands/vm_lifecycle.py +862 -0
- {ibee_cli-0.2.0 → ibee_cli-0.3.0}/src/ibee_cli/commands/vms.py +36 -10
- ibee_cli-0.3.0/src/ibee_cli/context.py +142 -0
- {ibee_cli-0.2.0 → ibee_cli-0.3.0}/src/ibee_cli/helpers.py +101 -7
- {ibee_cli-0.2.0 → ibee_cli-0.3.0}/src/ibee_cli/main.py +24 -1
- {ibee_cli-0.2.0 → ibee_cli-0.3.0}/src/ibee_cli/render.py +29 -5
- ibee_cli-0.3.0/src/ibee_cli.egg-info/PKG-INFO +282 -0
- {ibee_cli-0.2.0 → ibee_cli-0.3.0}/src/ibee_cli.egg-info/SOURCES.txt +16 -1
- {ibee_cli-0.2.0 → ibee_cli-0.3.0}/src/ibee_cli.egg-info/requires.txt +3 -1
- ibee_cli-0.3.0/tests/test_billing_preflight.py +128 -0
- ibee_cli-0.3.0/tests/test_block_storage_cdn_commands.py +172 -0
- ibee_cli-0.3.0/tests/test_cli.py +401 -0
- ibee_cli-0.3.0/tests/test_cloud_vm_commands.py +332 -0
- ibee_cli-0.3.0/tests/test_networking_commands.py +370 -0
- ibee_cli-0.3.0/tests/test_object_storage_commands.py +230 -0
- ibee_cli-0.3.0/tests/test_vm_lifecycle_commands.py +258 -0
- ibee_cli-0.2.0/PKG-INFO +0 -119
- ibee_cli-0.2.0/README.md +0 -95
- ibee_cli-0.2.0/src/ibee_cli/commands/buckets.py +0 -83
- ibee_cli-0.2.0/src/ibee_cli/commands/secrets.py +0 -228
- ibee_cli-0.2.0/src/ibee_cli/context.py +0 -70
- ibee_cli-0.2.0/src/ibee_cli.egg-info/PKG-INFO +0 -119
- ibee_cli-0.2.0/tests/test_cli.py +0 -34
- {ibee_cli-0.2.0 → ibee_cli-0.3.0}/LICENSE +0 -0
- {ibee_cli-0.2.0 → ibee_cli-0.3.0}/setup.cfg +0 -0
- {ibee_cli-0.2.0 → ibee_cli-0.3.0}/src/ibee_cli/commands/__init__.py +0 -0
- {ibee_cli-0.2.0 → ibee_cli-0.3.0}/src/ibee_cli.egg-info/dependency_links.txt +0 -0
- {ibee_cli-0.2.0 → ibee_cli-0.3.0}/src/ibee_cli.egg-info/entry_points.txt +0 -0
- {ibee_cli-0.2.0 → ibee_cli-0.3.0}/src/ibee_cli.egg-info/top_level.txt +0 -0
ibee_cli-0.3.0/PKG-INFO
ADDED
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ibee-cli
|
|
3
|
+
Version: 0.3.0
|
|
4
|
+
Summary: Official command-line interface for the IBEE Solutions cloud platform
|
|
5
|
+
Author-email: IBEE Solutions <support@ibee.ai>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://ibee.ai
|
|
8
|
+
Project-URL: Documentation, https://ibee.ai/docs/api-reference
|
|
9
|
+
Project-URL: Repository, https://github.com/devs-ibee/ibee-cli
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Operating System :: OS Independent
|
|
12
|
+
Classifier: Environment :: Console
|
|
13
|
+
Requires-Python: >=3.10
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
License-File: LICENSE
|
|
16
|
+
Requires-Dist: ibee<0.4.0,>=0.3.0
|
|
17
|
+
Requires-Dist: httpx>=0.27
|
|
18
|
+
Requires-Dist: typer>=0.12
|
|
19
|
+
Requires-Dist: click>=8.1
|
|
20
|
+
Requires-Dist: rich>=13.0
|
|
21
|
+
Provides-Extra: dev
|
|
22
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
23
|
+
Requires-Dist: build; extra == "dev"
|
|
24
|
+
Dynamic: license-file
|
|
25
|
+
|
|
26
|
+
# IBEE Solutions CLI
|
|
27
|
+
|
|
28
|
+
Official command-line interface for the IBEE Solutions cloud platform. Built on the [`ibee` Python SDK](https://github.com/devs-ibee/ibee-python).
|
|
29
|
+
|
|
30
|
+
## Installation
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
pip install ibee-cli
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Requires Python 3.10+.
|
|
37
|
+
|
|
38
|
+
## Authentication
|
|
39
|
+
|
|
40
|
+
Create an API token in the portal under **Settings > API Tokens**, then:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
export IBEE_TOKEN="ibee_prod_key_xxxxxxxxxxxx"
|
|
44
|
+
export IBEE_WORKSPACE_ID="710995"
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Both can also be passed per command with `--token` and `--workspace`.
|
|
48
|
+
|
|
49
|
+
## Usage
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
# Object storage
|
|
53
|
+
ibee buckets list
|
|
54
|
+
ibee buckets create my-bucket --region in-south-1
|
|
55
|
+
ibee buckets get my-bucket
|
|
56
|
+
ibee buckets update my-bucket --public
|
|
57
|
+
ibee buckets delete my-bucket --yes
|
|
58
|
+
|
|
59
|
+
# S3-compatible credentials (secret_access_key is shown only at creation)
|
|
60
|
+
ibee buckets credentials list
|
|
61
|
+
ibee buckets credentials create --name deploy
|
|
62
|
+
ibee buckets credentials create \
|
|
63
|
+
--name backups --bucket-scope specific --allowed-bucket my-bucket
|
|
64
|
+
ibee buckets credentials get ACCESS_KEY_ID
|
|
65
|
+
ibee buckets credentials revoke ACCESS_KEY_ID --yes
|
|
66
|
+
|
|
67
|
+
# Secret Store — stores
|
|
68
|
+
ibee secrets stores list
|
|
69
|
+
ibee secrets stores create production-secrets --description "prod"
|
|
70
|
+
ibee secrets stores get STORE_ID
|
|
71
|
+
ibee secrets stores update STORE_ID --name renamed
|
|
72
|
+
ibee secrets stores archive STORE_ID --yes
|
|
73
|
+
|
|
74
|
+
# Secret Store — secrets
|
|
75
|
+
ibee secrets list --store-id STORE_ID
|
|
76
|
+
ibee secrets create --store-id STORE_ID --name db-url --value '{"url":"postgres://..."}'
|
|
77
|
+
ibee secrets get SECRET_ID # metadata
|
|
78
|
+
ibee secrets value SECRET_ID # current value
|
|
79
|
+
ibee secrets set-value SECRET_ID --value '{"url":"postgres://new"}'
|
|
80
|
+
ibee secrets delete SECRET_ID --yes
|
|
81
|
+
|
|
82
|
+
# Compute catalog (discover placement / plans / images for `create`)
|
|
83
|
+
ibee compute sites
|
|
84
|
+
ibee compute plans --vm-type cloud
|
|
85
|
+
ibee compute images --vm-type gpu
|
|
86
|
+
|
|
87
|
+
# Billing admission (SKU must come from an IBEE product catalog)
|
|
88
|
+
ibee billing eligibility --sku-code PLAN_SKU
|
|
89
|
+
|
|
90
|
+
# Standalone Block Storage
|
|
91
|
+
ibee block-storage list
|
|
92
|
+
ibee block-storage create data --size-gb 100 --site-id SITE_ID
|
|
93
|
+
ibee block-storage get VOLUME_ID
|
|
94
|
+
ibee block-storage operations VOLUME_ID
|
|
95
|
+
ibee block-storage attach VOLUME_ID --node-name NODE --vm-id VM_ID
|
|
96
|
+
ibee block-storage detach VOLUME_ID --node-name NODE --confirm-unmounted
|
|
97
|
+
ibee block-storage resize VOLUME_ID --new-size-gb 200
|
|
98
|
+
ibee block-storage delete VOLUME_ID --yes
|
|
99
|
+
|
|
100
|
+
# CDN
|
|
101
|
+
ibee cdn list
|
|
102
|
+
ibee cdn create assets --origin-id BUCKET_NAME
|
|
103
|
+
ibee cdn get DISTRIBUTION_ID
|
|
104
|
+
ibee cdn update DISTRIBUTION_ID --cache-policy media
|
|
105
|
+
ibee cdn website set DISTRIBUTION_ID --index-document index.html
|
|
106
|
+
ibee cdn domains create DISTRIBUTION_ID static.example.com
|
|
107
|
+
ibee cdn domains verify DISTRIBUTION_ID static.example.com
|
|
108
|
+
ibee cdn purge DISTRIBUTION_ID --mode all
|
|
109
|
+
ibee cdn generate-url BUCKET_NAME path/to/object.jpg --expires-in 3600
|
|
110
|
+
ibee cdn delete DISTRIBUTION_ID --yes
|
|
111
|
+
|
|
112
|
+
# Cloud VMs
|
|
113
|
+
ibee vms list
|
|
114
|
+
ibee vms get VM_ID
|
|
115
|
+
ibee vms create web-01 --plan-id PLAN_ID --template-id IMAGE_ID --ssh-key-id KEY_ID --wait
|
|
116
|
+
ibee vms start VM_ID
|
|
117
|
+
ibee vms stop VM_ID
|
|
118
|
+
ibee vms reboot VM_ID
|
|
119
|
+
ibee vms metrics VM_ID
|
|
120
|
+
ibee vms metrics-timeseries VM_ID --range 24h
|
|
121
|
+
ibee vms bandwidth VM_ID --month 2026-08
|
|
122
|
+
ibee vms events VM_ID --limit 50
|
|
123
|
+
|
|
124
|
+
# Access credentials. Passwords are never accepted as command arguments.
|
|
125
|
+
printf '%s\n' "$NEW_VM_PASSWORD" | ibee vms access-update VM_ID --password-stdin --wait
|
|
126
|
+
ibee vms access-update VM_ID --prompt-password --enable-password-auth --wait
|
|
127
|
+
ibee vms access-update VM_ID --ssh-key-mode add --ssh-key-id SSH_KEY_ID --wait
|
|
128
|
+
|
|
129
|
+
# Resize and persistent block volumes
|
|
130
|
+
ibee vms resize-precheck VM_ID --cpu 4 --ram-mb 8192 --disk-gb 80
|
|
131
|
+
ibee vms resize VM_ID --cpu 4 --ram-mb 8192 --disk-gb 80 --wait
|
|
132
|
+
ibee vms resize-plan VM_ID --cpu 8 --ram-mb 16384 --confirm-downgrade --wait
|
|
133
|
+
ibee vms resize-root-disk VM_ID --new-size-gb 120 --wait
|
|
134
|
+
ibee vms volume-attach VM_ID VOLUME_ID --mode single-writer --wait
|
|
135
|
+
ibee vms mount-guidance-acknowledge VM_ID VOLUME_ID
|
|
136
|
+
ibee vms volume-detach VM_ID VOLUME_ID --confirm-unmounted --yes --wait
|
|
137
|
+
|
|
138
|
+
# Snapshots and restores
|
|
139
|
+
ibee vms snapshots list VM_ID
|
|
140
|
+
ibee vms snapshots create VM_ID before-upgrade --mode all_attached
|
|
141
|
+
ibee vms snapshots get SNAPSHOT_SET_ID
|
|
142
|
+
ibee vms snapshots restore VM_ID SNAPSHOT_SET_ID \
|
|
143
|
+
--target-mode new_vm --target-vm-name restored-web --auto-start --yes
|
|
144
|
+
ibee vms snapshots restore-status RESTORE_ID
|
|
145
|
+
ibee vms snapshots delete SNAPSHOT_SET_ID --yes
|
|
146
|
+
|
|
147
|
+
# Automated backup policy and manual backup runs
|
|
148
|
+
ibee vms backup-policy get VM_ID
|
|
149
|
+
ibee vms backup-policy enable VM_ID \
|
|
150
|
+
--frequency daily --timezone Asia/Kolkata --hour 2 --retention-days 30
|
|
151
|
+
ibee vms backup-policy update VM_ID --frequency weekly --day-of-week 6
|
|
152
|
+
ibee vms backup-policy reschedule VM_ID --next-run-at 2026-08-10T02:00:00Z
|
|
153
|
+
ibee vms backup-policy disable VM_ID
|
|
154
|
+
ibee vms backups list VM_ID
|
|
155
|
+
ibee vms backups create VM_ID --reason before-release
|
|
156
|
+
ibee vms backups get BACKUP_RUN_ID
|
|
157
|
+
ibee vms backups restore VM_ID RECOVERY_POINT_ID --target-mode replace --yes
|
|
158
|
+
ibee vms backups restore-status RESTORE_ID
|
|
159
|
+
ibee vms delete VM_ID --yes --wait
|
|
160
|
+
|
|
161
|
+
# GPU VMs expose the same lifecycle, snapshot, backup, metrics, and volume commands
|
|
162
|
+
ibee gpus list
|
|
163
|
+
ibee gpus create train-01 --gpu-model A100 --gpu-count 1 \
|
|
164
|
+
--plan-id PLAN_ID --template-id IMAGE_ID --wait
|
|
165
|
+
ibee gpus start VM_ID
|
|
166
|
+
ibee gpus stop VM_ID
|
|
167
|
+
ibee gpus reboot VM_ID
|
|
168
|
+
ibee gpus metrics VM_ID
|
|
169
|
+
ibee gpus resize-precheck VM_ID --cpu 16 --ram-mb 65536
|
|
170
|
+
ibee gpus snapshots create VM_ID before-training --mode root_only
|
|
171
|
+
ibee gpus backup-policy enable VM_ID --frequency daily --retention-days 14
|
|
172
|
+
ibee gpus delete VM_ID --yes
|
|
173
|
+
|
|
174
|
+
# Short-lived graphical console sessions for either VM type
|
|
175
|
+
ibee console create VM_ID --vm-type cloud
|
|
176
|
+
ibee console get SESSION_ID
|
|
177
|
+
ibee console close SESSION_ID --yes
|
|
178
|
+
|
|
179
|
+
# Async operations — poll a create/delete/power action to completion
|
|
180
|
+
ibee ops get OPERATION_ID --wait
|
|
181
|
+
|
|
182
|
+
# VPCs
|
|
183
|
+
ibee vpcs sites
|
|
184
|
+
ibee vpcs list
|
|
185
|
+
ibee vpcs create production --site-id SITE_ID --cidr 10.44.0.0/22 --no-auto-cidr
|
|
186
|
+
ibee vpcs get VPC_ID
|
|
187
|
+
ibee vpcs update VPC_ID --name production-apps
|
|
188
|
+
ibee vpcs delete VPC_ID --yes
|
|
189
|
+
|
|
190
|
+
# Subnets and VM attachments
|
|
191
|
+
ibee vpcs subnets list VPC_ID
|
|
192
|
+
ibee vpcs subnets create VPC_ID services --cidr 10.44.0.0/24 --no-auto-cidr
|
|
193
|
+
ibee vpcs subnets update VPC_ID SUBNET_ID --dns 1.1.1.1 --dns 8.8.8.8
|
|
194
|
+
ibee vpcs nodes list VPC_ID
|
|
195
|
+
ibee vpcs nodes attach VPC_ID VM_ID --subnet-id SUBNET_ID --connectivity private
|
|
196
|
+
ibee vpcs nodes detach VPC_ID VM_ID --yes
|
|
197
|
+
|
|
198
|
+
# NAT and port forwarding
|
|
199
|
+
ibee vpcs nat list VPC_ID
|
|
200
|
+
ibee vpcs nat create VPC_ID --name egress --reserved-ip-id RESERVED_IP_ID
|
|
201
|
+
ibee vpcs forwarding list VPC_ID NAT_GATEWAY_ID
|
|
202
|
+
ibee vpcs forwarding create VPC_ID NAT_GATEWAY_ID ssh \
|
|
203
|
+
--external-port 2222 --internal-ip 10.44.0.10 --internal-port 22
|
|
204
|
+
ibee vpcs forwarding update VPC_ID NAT_GATEWAY_ID RULE_ID --external-port 2200
|
|
205
|
+
|
|
206
|
+
# Reserved public IPs
|
|
207
|
+
ibee reserved-ips list --site-id SITE_ID
|
|
208
|
+
ibee reserved-ips reserve --site-id SITE_ID --label edge
|
|
209
|
+
ibee reserved-ips update RESERVED_IP_ID --reverse-dns app.example.com
|
|
210
|
+
ibee reserved-ips attach RESERVED_IP_ID VM_ID --vpc-id VPC_ID --subnet-id SUBNET_ID
|
|
211
|
+
ibee reserved-ips detach RESERVED_IP_ID
|
|
212
|
+
ibee reserved-ips move RESERVED_IP_ID NEW_VM_ID --vpc-id VPC_ID --subnet-id SUBNET_ID
|
|
213
|
+
ibee reserved-ips release RESERVED_IP_ID --yes
|
|
214
|
+
|
|
215
|
+
# Firewall groups, rules, and attachments
|
|
216
|
+
ibee firewalls create web --description "Web ingress"
|
|
217
|
+
ibee firewalls rules create FIREWALL_GROUP_ID \
|
|
218
|
+
--protocol tcp --port-start 443 --port-end 443 --remote-target 0.0.0.0/0
|
|
219
|
+
ibee firewalls rules update FIREWALL_GROUP_ID RULE_ID --disabled
|
|
220
|
+
ibee firewalls attachments attach FIREWALL_GROUP_ID VM_ID
|
|
221
|
+
ibee firewalls attachments detach FIREWALL_GROUP_ID VM_ID --yes
|
|
222
|
+
|
|
223
|
+
# L4 and L7 load balancers
|
|
224
|
+
ibee load-balancers list --layer l7
|
|
225
|
+
ibee load-balancers create-l4 tcp-edge \
|
|
226
|
+
--backends '[{"type":"ip","target":"10.44.0.10","port":443}]'
|
|
227
|
+
ibee load-balancers create-l7 web \
|
|
228
|
+
--protocol https \
|
|
229
|
+
--backends '[{"type":"service","target":"api","port":8080}]' \
|
|
230
|
+
--routing '{"algorithm":"least_request"}' \
|
|
231
|
+
--custom-domain app.example.com
|
|
232
|
+
ibee load-balancers update-l7 LOAD_BALANCER_ID --name public-web
|
|
233
|
+
ibee load-balancers status LOAD_BALANCER_ID
|
|
234
|
+
ibee load-balancers delete LOAD_BALANCER_ID --yes
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
Create/delete/power, access, resize, and volume actions are asynchronous; add
|
|
238
|
+
`--wait` to block until the operation finishes, or poll the returned operation
|
|
239
|
+
later with `ibee ops get`.
|
|
240
|
+
|
|
241
|
+
Snapshot and backup restores can replace a VM, create a new VM, or restore one
|
|
242
|
+
volume. They require `--yes` (or an interactive confirmation). Run the command
|
|
243
|
+
with `--help` to see placement, plan, GPU, bandwidth, and selected-volume restore
|
|
244
|
+
options. Snapshot deletion and volume detachment use the same confirmation rule.
|
|
245
|
+
|
|
246
|
+
`access-update` never accepts a password value in the command line, so passwords
|
|
247
|
+
do not appear in shell history or process listings. Use `--prompt-password` for
|
|
248
|
+
an interactive hidden prompt, or pipe one line to `--password-stdin`.
|
|
249
|
+
|
|
250
|
+
Bucket and VM placement are automatic when `--site-id` is omitted. Use
|
|
251
|
+
`ibee compute sites` and pass `--site-id` only when placement must be pinned.
|
|
252
|
+
|
|
253
|
+
Billable creates send one product request. The public gateway performs the
|
|
254
|
+
authoritative, fail-closed billing decision before routing; a valid denial is
|
|
255
|
+
returned without calling the product service. `ibee billing eligibility`
|
|
256
|
+
remains available as an optional point-in-time preview.
|
|
257
|
+
|
|
258
|
+
For load-balancer backends, routing, TLS, and L7 rules, pass JSON matching the
|
|
259
|
+
[API reference](https://ibee.ai/docs/api-reference). This keeps advanced
|
|
260
|
+
configurations available without a large set of fragile shell flags.
|
|
261
|
+
|
|
262
|
+
Every command accepts `--json` for raw output:
|
|
263
|
+
|
|
264
|
+
```bash
|
|
265
|
+
ibee --json buckets list
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
## Environments
|
|
269
|
+
|
|
270
|
+
The CLI targets production at `https://api.ibee.ai/v1` by default. Use `--dev`
|
|
271
|
+
(or `IBEE_ENV=dev`) for `https://api.ibee.co.in/v1`, or `--base-url` for a
|
|
272
|
+
custom endpoint. Match production tokens to `.ai` and development tokens to
|
|
273
|
+
`.co.in`; resource IDs are environment-specific:
|
|
274
|
+
|
|
275
|
+
```bash
|
|
276
|
+
ibee --dev buckets list
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
## Related
|
|
280
|
+
|
|
281
|
+
- [Python SDK](https://github.com/devs-ibee/ibee-python) — `pip install ibee`
|
|
282
|
+
- [API documentation](https://ibee.ai/docs/api-reference)
|
ibee_cli-0.3.0/README.md
ADDED
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
# IBEE Solutions CLI
|
|
2
|
+
|
|
3
|
+
Official command-line interface for the IBEE Solutions cloud platform. Built on the [`ibee` Python SDK](https://github.com/devs-ibee/ibee-python).
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install ibee-cli
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Requires Python 3.10+.
|
|
12
|
+
|
|
13
|
+
## Authentication
|
|
14
|
+
|
|
15
|
+
Create an API token in the portal under **Settings > API Tokens**, then:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
export IBEE_TOKEN="ibee_prod_key_xxxxxxxxxxxx"
|
|
19
|
+
export IBEE_WORKSPACE_ID="710995"
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Both can also be passed per command with `--token` and `--workspace`.
|
|
23
|
+
|
|
24
|
+
## Usage
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
# Object storage
|
|
28
|
+
ibee buckets list
|
|
29
|
+
ibee buckets create my-bucket --region in-south-1
|
|
30
|
+
ibee buckets get my-bucket
|
|
31
|
+
ibee buckets update my-bucket --public
|
|
32
|
+
ibee buckets delete my-bucket --yes
|
|
33
|
+
|
|
34
|
+
# S3-compatible credentials (secret_access_key is shown only at creation)
|
|
35
|
+
ibee buckets credentials list
|
|
36
|
+
ibee buckets credentials create --name deploy
|
|
37
|
+
ibee buckets credentials create \
|
|
38
|
+
--name backups --bucket-scope specific --allowed-bucket my-bucket
|
|
39
|
+
ibee buckets credentials get ACCESS_KEY_ID
|
|
40
|
+
ibee buckets credentials revoke ACCESS_KEY_ID --yes
|
|
41
|
+
|
|
42
|
+
# Secret Store — stores
|
|
43
|
+
ibee secrets stores list
|
|
44
|
+
ibee secrets stores create production-secrets --description "prod"
|
|
45
|
+
ibee secrets stores get STORE_ID
|
|
46
|
+
ibee secrets stores update STORE_ID --name renamed
|
|
47
|
+
ibee secrets stores archive STORE_ID --yes
|
|
48
|
+
|
|
49
|
+
# Secret Store — secrets
|
|
50
|
+
ibee secrets list --store-id STORE_ID
|
|
51
|
+
ibee secrets create --store-id STORE_ID --name db-url --value '{"url":"postgres://..."}'
|
|
52
|
+
ibee secrets get SECRET_ID # metadata
|
|
53
|
+
ibee secrets value SECRET_ID # current value
|
|
54
|
+
ibee secrets set-value SECRET_ID --value '{"url":"postgres://new"}'
|
|
55
|
+
ibee secrets delete SECRET_ID --yes
|
|
56
|
+
|
|
57
|
+
# Compute catalog (discover placement / plans / images for `create`)
|
|
58
|
+
ibee compute sites
|
|
59
|
+
ibee compute plans --vm-type cloud
|
|
60
|
+
ibee compute images --vm-type gpu
|
|
61
|
+
|
|
62
|
+
# Billing admission (SKU must come from an IBEE product catalog)
|
|
63
|
+
ibee billing eligibility --sku-code PLAN_SKU
|
|
64
|
+
|
|
65
|
+
# Standalone Block Storage
|
|
66
|
+
ibee block-storage list
|
|
67
|
+
ibee block-storage create data --size-gb 100 --site-id SITE_ID
|
|
68
|
+
ibee block-storage get VOLUME_ID
|
|
69
|
+
ibee block-storage operations VOLUME_ID
|
|
70
|
+
ibee block-storage attach VOLUME_ID --node-name NODE --vm-id VM_ID
|
|
71
|
+
ibee block-storage detach VOLUME_ID --node-name NODE --confirm-unmounted
|
|
72
|
+
ibee block-storage resize VOLUME_ID --new-size-gb 200
|
|
73
|
+
ibee block-storage delete VOLUME_ID --yes
|
|
74
|
+
|
|
75
|
+
# CDN
|
|
76
|
+
ibee cdn list
|
|
77
|
+
ibee cdn create assets --origin-id BUCKET_NAME
|
|
78
|
+
ibee cdn get DISTRIBUTION_ID
|
|
79
|
+
ibee cdn update DISTRIBUTION_ID --cache-policy media
|
|
80
|
+
ibee cdn website set DISTRIBUTION_ID --index-document index.html
|
|
81
|
+
ibee cdn domains create DISTRIBUTION_ID static.example.com
|
|
82
|
+
ibee cdn domains verify DISTRIBUTION_ID static.example.com
|
|
83
|
+
ibee cdn purge DISTRIBUTION_ID --mode all
|
|
84
|
+
ibee cdn generate-url BUCKET_NAME path/to/object.jpg --expires-in 3600
|
|
85
|
+
ibee cdn delete DISTRIBUTION_ID --yes
|
|
86
|
+
|
|
87
|
+
# Cloud VMs
|
|
88
|
+
ibee vms list
|
|
89
|
+
ibee vms get VM_ID
|
|
90
|
+
ibee vms create web-01 --plan-id PLAN_ID --template-id IMAGE_ID --ssh-key-id KEY_ID --wait
|
|
91
|
+
ibee vms start VM_ID
|
|
92
|
+
ibee vms stop VM_ID
|
|
93
|
+
ibee vms reboot VM_ID
|
|
94
|
+
ibee vms metrics VM_ID
|
|
95
|
+
ibee vms metrics-timeseries VM_ID --range 24h
|
|
96
|
+
ibee vms bandwidth VM_ID --month 2026-08
|
|
97
|
+
ibee vms events VM_ID --limit 50
|
|
98
|
+
|
|
99
|
+
# Access credentials. Passwords are never accepted as command arguments.
|
|
100
|
+
printf '%s\n' "$NEW_VM_PASSWORD" | ibee vms access-update VM_ID --password-stdin --wait
|
|
101
|
+
ibee vms access-update VM_ID --prompt-password --enable-password-auth --wait
|
|
102
|
+
ibee vms access-update VM_ID --ssh-key-mode add --ssh-key-id SSH_KEY_ID --wait
|
|
103
|
+
|
|
104
|
+
# Resize and persistent block volumes
|
|
105
|
+
ibee vms resize-precheck VM_ID --cpu 4 --ram-mb 8192 --disk-gb 80
|
|
106
|
+
ibee vms resize VM_ID --cpu 4 --ram-mb 8192 --disk-gb 80 --wait
|
|
107
|
+
ibee vms resize-plan VM_ID --cpu 8 --ram-mb 16384 --confirm-downgrade --wait
|
|
108
|
+
ibee vms resize-root-disk VM_ID --new-size-gb 120 --wait
|
|
109
|
+
ibee vms volume-attach VM_ID VOLUME_ID --mode single-writer --wait
|
|
110
|
+
ibee vms mount-guidance-acknowledge VM_ID VOLUME_ID
|
|
111
|
+
ibee vms volume-detach VM_ID VOLUME_ID --confirm-unmounted --yes --wait
|
|
112
|
+
|
|
113
|
+
# Snapshots and restores
|
|
114
|
+
ibee vms snapshots list VM_ID
|
|
115
|
+
ibee vms snapshots create VM_ID before-upgrade --mode all_attached
|
|
116
|
+
ibee vms snapshots get SNAPSHOT_SET_ID
|
|
117
|
+
ibee vms snapshots restore VM_ID SNAPSHOT_SET_ID \
|
|
118
|
+
--target-mode new_vm --target-vm-name restored-web --auto-start --yes
|
|
119
|
+
ibee vms snapshots restore-status RESTORE_ID
|
|
120
|
+
ibee vms snapshots delete SNAPSHOT_SET_ID --yes
|
|
121
|
+
|
|
122
|
+
# Automated backup policy and manual backup runs
|
|
123
|
+
ibee vms backup-policy get VM_ID
|
|
124
|
+
ibee vms backup-policy enable VM_ID \
|
|
125
|
+
--frequency daily --timezone Asia/Kolkata --hour 2 --retention-days 30
|
|
126
|
+
ibee vms backup-policy update VM_ID --frequency weekly --day-of-week 6
|
|
127
|
+
ibee vms backup-policy reschedule VM_ID --next-run-at 2026-08-10T02:00:00Z
|
|
128
|
+
ibee vms backup-policy disable VM_ID
|
|
129
|
+
ibee vms backups list VM_ID
|
|
130
|
+
ibee vms backups create VM_ID --reason before-release
|
|
131
|
+
ibee vms backups get BACKUP_RUN_ID
|
|
132
|
+
ibee vms backups restore VM_ID RECOVERY_POINT_ID --target-mode replace --yes
|
|
133
|
+
ibee vms backups restore-status RESTORE_ID
|
|
134
|
+
ibee vms delete VM_ID --yes --wait
|
|
135
|
+
|
|
136
|
+
# GPU VMs expose the same lifecycle, snapshot, backup, metrics, and volume commands
|
|
137
|
+
ibee gpus list
|
|
138
|
+
ibee gpus create train-01 --gpu-model A100 --gpu-count 1 \
|
|
139
|
+
--plan-id PLAN_ID --template-id IMAGE_ID --wait
|
|
140
|
+
ibee gpus start VM_ID
|
|
141
|
+
ibee gpus stop VM_ID
|
|
142
|
+
ibee gpus reboot VM_ID
|
|
143
|
+
ibee gpus metrics VM_ID
|
|
144
|
+
ibee gpus resize-precheck VM_ID --cpu 16 --ram-mb 65536
|
|
145
|
+
ibee gpus snapshots create VM_ID before-training --mode root_only
|
|
146
|
+
ibee gpus backup-policy enable VM_ID --frequency daily --retention-days 14
|
|
147
|
+
ibee gpus delete VM_ID --yes
|
|
148
|
+
|
|
149
|
+
# Short-lived graphical console sessions for either VM type
|
|
150
|
+
ibee console create VM_ID --vm-type cloud
|
|
151
|
+
ibee console get SESSION_ID
|
|
152
|
+
ibee console close SESSION_ID --yes
|
|
153
|
+
|
|
154
|
+
# Async operations — poll a create/delete/power action to completion
|
|
155
|
+
ibee ops get OPERATION_ID --wait
|
|
156
|
+
|
|
157
|
+
# VPCs
|
|
158
|
+
ibee vpcs sites
|
|
159
|
+
ibee vpcs list
|
|
160
|
+
ibee vpcs create production --site-id SITE_ID --cidr 10.44.0.0/22 --no-auto-cidr
|
|
161
|
+
ibee vpcs get VPC_ID
|
|
162
|
+
ibee vpcs update VPC_ID --name production-apps
|
|
163
|
+
ibee vpcs delete VPC_ID --yes
|
|
164
|
+
|
|
165
|
+
# Subnets and VM attachments
|
|
166
|
+
ibee vpcs subnets list VPC_ID
|
|
167
|
+
ibee vpcs subnets create VPC_ID services --cidr 10.44.0.0/24 --no-auto-cidr
|
|
168
|
+
ibee vpcs subnets update VPC_ID SUBNET_ID --dns 1.1.1.1 --dns 8.8.8.8
|
|
169
|
+
ibee vpcs nodes list VPC_ID
|
|
170
|
+
ibee vpcs nodes attach VPC_ID VM_ID --subnet-id SUBNET_ID --connectivity private
|
|
171
|
+
ibee vpcs nodes detach VPC_ID VM_ID --yes
|
|
172
|
+
|
|
173
|
+
# NAT and port forwarding
|
|
174
|
+
ibee vpcs nat list VPC_ID
|
|
175
|
+
ibee vpcs nat create VPC_ID --name egress --reserved-ip-id RESERVED_IP_ID
|
|
176
|
+
ibee vpcs forwarding list VPC_ID NAT_GATEWAY_ID
|
|
177
|
+
ibee vpcs forwarding create VPC_ID NAT_GATEWAY_ID ssh \
|
|
178
|
+
--external-port 2222 --internal-ip 10.44.0.10 --internal-port 22
|
|
179
|
+
ibee vpcs forwarding update VPC_ID NAT_GATEWAY_ID RULE_ID --external-port 2200
|
|
180
|
+
|
|
181
|
+
# Reserved public IPs
|
|
182
|
+
ibee reserved-ips list --site-id SITE_ID
|
|
183
|
+
ibee reserved-ips reserve --site-id SITE_ID --label edge
|
|
184
|
+
ibee reserved-ips update RESERVED_IP_ID --reverse-dns app.example.com
|
|
185
|
+
ibee reserved-ips attach RESERVED_IP_ID VM_ID --vpc-id VPC_ID --subnet-id SUBNET_ID
|
|
186
|
+
ibee reserved-ips detach RESERVED_IP_ID
|
|
187
|
+
ibee reserved-ips move RESERVED_IP_ID NEW_VM_ID --vpc-id VPC_ID --subnet-id SUBNET_ID
|
|
188
|
+
ibee reserved-ips release RESERVED_IP_ID --yes
|
|
189
|
+
|
|
190
|
+
# Firewall groups, rules, and attachments
|
|
191
|
+
ibee firewalls create web --description "Web ingress"
|
|
192
|
+
ibee firewalls rules create FIREWALL_GROUP_ID \
|
|
193
|
+
--protocol tcp --port-start 443 --port-end 443 --remote-target 0.0.0.0/0
|
|
194
|
+
ibee firewalls rules update FIREWALL_GROUP_ID RULE_ID --disabled
|
|
195
|
+
ibee firewalls attachments attach FIREWALL_GROUP_ID VM_ID
|
|
196
|
+
ibee firewalls attachments detach FIREWALL_GROUP_ID VM_ID --yes
|
|
197
|
+
|
|
198
|
+
# L4 and L7 load balancers
|
|
199
|
+
ibee load-balancers list --layer l7
|
|
200
|
+
ibee load-balancers create-l4 tcp-edge \
|
|
201
|
+
--backends '[{"type":"ip","target":"10.44.0.10","port":443}]'
|
|
202
|
+
ibee load-balancers create-l7 web \
|
|
203
|
+
--protocol https \
|
|
204
|
+
--backends '[{"type":"service","target":"api","port":8080}]' \
|
|
205
|
+
--routing '{"algorithm":"least_request"}' \
|
|
206
|
+
--custom-domain app.example.com
|
|
207
|
+
ibee load-balancers update-l7 LOAD_BALANCER_ID --name public-web
|
|
208
|
+
ibee load-balancers status LOAD_BALANCER_ID
|
|
209
|
+
ibee load-balancers delete LOAD_BALANCER_ID --yes
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
Create/delete/power, access, resize, and volume actions are asynchronous; add
|
|
213
|
+
`--wait` to block until the operation finishes, or poll the returned operation
|
|
214
|
+
later with `ibee ops get`.
|
|
215
|
+
|
|
216
|
+
Snapshot and backup restores can replace a VM, create a new VM, or restore one
|
|
217
|
+
volume. They require `--yes` (or an interactive confirmation). Run the command
|
|
218
|
+
with `--help` to see placement, plan, GPU, bandwidth, and selected-volume restore
|
|
219
|
+
options. Snapshot deletion and volume detachment use the same confirmation rule.
|
|
220
|
+
|
|
221
|
+
`access-update` never accepts a password value in the command line, so passwords
|
|
222
|
+
do not appear in shell history or process listings. Use `--prompt-password` for
|
|
223
|
+
an interactive hidden prompt, or pipe one line to `--password-stdin`.
|
|
224
|
+
|
|
225
|
+
Bucket and VM placement are automatic when `--site-id` is omitted. Use
|
|
226
|
+
`ibee compute sites` and pass `--site-id` only when placement must be pinned.
|
|
227
|
+
|
|
228
|
+
Billable creates send one product request. The public gateway performs the
|
|
229
|
+
authoritative, fail-closed billing decision before routing; a valid denial is
|
|
230
|
+
returned without calling the product service. `ibee billing eligibility`
|
|
231
|
+
remains available as an optional point-in-time preview.
|
|
232
|
+
|
|
233
|
+
For load-balancer backends, routing, TLS, and L7 rules, pass JSON matching the
|
|
234
|
+
[API reference](https://ibee.ai/docs/api-reference). This keeps advanced
|
|
235
|
+
configurations available without a large set of fragile shell flags.
|
|
236
|
+
|
|
237
|
+
Every command accepts `--json` for raw output:
|
|
238
|
+
|
|
239
|
+
```bash
|
|
240
|
+
ibee --json buckets list
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
## Environments
|
|
244
|
+
|
|
245
|
+
The CLI targets production at `https://api.ibee.ai/v1` by default. Use `--dev`
|
|
246
|
+
(or `IBEE_ENV=dev`) for `https://api.ibee.co.in/v1`, or `--base-url` for a
|
|
247
|
+
custom endpoint. Match production tokens to `.ai` and development tokens to
|
|
248
|
+
`.co.in`; resource IDs are environment-specific:
|
|
249
|
+
|
|
250
|
+
```bash
|
|
251
|
+
ibee --dev buckets list
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
## Related
|
|
255
|
+
|
|
256
|
+
- [Python SDK](https://github.com/devs-ibee/ibee-python) — `pip install ibee`
|
|
257
|
+
- [API documentation](https://ibee.ai/docs/api-reference)
|
|
@@ -4,23 +4,24 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "ibee-cli"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.3.0"
|
|
8
8
|
description = "Official command-line interface for the IBEE Solutions cloud platform"
|
|
9
9
|
readme = "README.md"
|
|
10
|
-
license =
|
|
10
|
+
license = "MIT"
|
|
11
11
|
requires-python = ">=3.10"
|
|
12
12
|
authors = [
|
|
13
13
|
{name = "IBEE Solutions", email = "support@ibee.ai"},
|
|
14
14
|
]
|
|
15
15
|
classifiers = [
|
|
16
16
|
"Programming Language :: Python :: 3",
|
|
17
|
-
"License :: OSI Approved :: MIT License",
|
|
18
17
|
"Operating System :: OS Independent",
|
|
19
18
|
"Environment :: Console",
|
|
20
19
|
]
|
|
21
20
|
dependencies = [
|
|
22
|
-
"ibee>=0.
|
|
21
|
+
"ibee>=0.3.0,<0.4.0",
|
|
22
|
+
"httpx>=0.27",
|
|
23
23
|
"typer>=0.12",
|
|
24
|
+
"click>=8.1",
|
|
24
25
|
"rich>=13.0",
|
|
25
26
|
]
|
|
26
27
|
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"""Billing admission commands."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Optional
|
|
6
|
+
|
|
7
|
+
import typer
|
|
8
|
+
|
|
9
|
+
from ..context import get_client, get_settings, require_workspace
|
|
10
|
+
from ..helpers import check_billing_eligibility
|
|
11
|
+
from ..render import handle_api_errors, print_json
|
|
12
|
+
|
|
13
|
+
app = typer.Typer(help="Billing resource eligibility", no_args_is_help=True)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@app.command("eligibility")
|
|
17
|
+
@handle_api_errors
|
|
18
|
+
def resource_eligibility(
|
|
19
|
+
ctx: typer.Context,
|
|
20
|
+
sku_code: Optional[str] = typer.Option(
|
|
21
|
+
None, "--sku-code", help="Billing SKU from an IBEE product catalog"
|
|
22
|
+
),
|
|
23
|
+
estimated_cost_minor: Optional[int] = typer.Option(
|
|
24
|
+
None,
|
|
25
|
+
"--estimated-cost-minor",
|
|
26
|
+
min=0,
|
|
27
|
+
help="Optional catalog-derived cost in the currency's minor unit",
|
|
28
|
+
),
|
|
29
|
+
) -> None:
|
|
30
|
+
"""Check whether the workspace may create a billable resource."""
|
|
31
|
+
|
|
32
|
+
settings = get_settings(ctx)
|
|
33
|
+
workspace = require_workspace(settings)
|
|
34
|
+
decision = check_billing_eligibility(
|
|
35
|
+
get_client(settings),
|
|
36
|
+
workspace,
|
|
37
|
+
sku_code=sku_code,
|
|
38
|
+
estimated_cost_minor=estimated_cost_minor,
|
|
39
|
+
)
|
|
40
|
+
if decision is None:
|
|
41
|
+
typer.secho(
|
|
42
|
+
"The installed ibee SDK does not expose billing eligibility; upgrade the SDK.",
|
|
43
|
+
fg=typer.colors.RED,
|
|
44
|
+
err=True,
|
|
45
|
+
)
|
|
46
|
+
raise typer.Exit(code=2)
|
|
47
|
+
print_json(decision)
|