badgr-cli 1.0.0 → 1.0.2

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.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # badgr-cli
2
2
 
3
- Run or serve GPU workloads from one command.
3
+ Badgr supports many GPU workloads through two commands: `serve` for persistent endpoints, `run` for jobs.
4
4
 
5
5
  ```bash
6
6
  npm install -g badgr-cli
@@ -18,9 +18,9 @@ badgr login
18
18
  badgr serve meta-llama/Llama-3.1-8B-Instruct --gpu L40S
19
19
 
20
20
  # 3. Use the endpoint with any OpenAI SDK client
21
- # client = OpenAI(api_key="sk-...", base_url="https://dep-xyz.api.badgr.ai/v1")
21
+ # client = OpenAI(api_key="sk-...", base_url="https://dep-a1b2c3.api.badgr.ai/v1")
22
22
 
23
- # 4. View cost, provider, and route receipts
23
+ # 4. View cost, route, and retry receipts
24
24
  badgr receipts
25
25
 
26
26
  # 5. Stop billing
@@ -34,11 +34,15 @@ badgr down <deployment-id>
34
34
  | Command | What it does |
35
35
  |---------|-------------|
36
36
  | `badgr login` | Save API key to `~/.badgr/config.json` |
37
- | `badgr serve <model>` | Persistent OpenAI-compatible endpoint |
38
- | `badgr run <command>` | One-off GPU job (container) |
39
- | `badgr down <id>` | Terminate a deployment — stops billing |
40
- | `badgr logs <id>` | Tail logs for a deployment |
41
- | `badgr receipts [n]` | Cost / route / retry receipts (default 10) |
37
+ | `badgr serve <model>` | Start a persistent OpenAI-compatible endpoint |
38
+ | `badgr run <command>` | Run a one-off GPU job (any container command) |
39
+ | `badgr down <id>` | Terminate a deployment — stops billing immediately |
40
+ | `badgr logs <id>` | Fetch log output from a deployment |
41
+ | `badgr receipts [n]` | Cost, route, and retry receipts (default 10) |
42
+
43
+ `badgr serve` — for anything that needs a persistent endpoint: LLM serving, embeddings, image generation APIs, transcription APIs.
44
+
45
+ `badgr run` — for anything that starts, runs, and exits: batch inference, fine-tuning, evals, image/video batch jobs, audio processing.
42
46
 
43
47
  ---
44
48
 
@@ -51,7 +55,7 @@ badgr serve meta-llama/Llama-3.1-8B-Instruct --gpu L40S --region EU
51
55
  | Flag | Default | Description |
52
56
  |------|---------|-------------|
53
57
  | `--gpu <type>` | RTX_4090 | GPU: RTX_4090, L40S, A6000, A100, H100 |
54
- | `--region US\|EU\|AU` | US | Region preference |
58
+ | `--region <region>` | | Optional region preference. If omitted, Badgr chooses best available capacity. |
55
59
  | `--count <n>` | 1 | Number of GPUs (1–8) |
56
60
  | `--max-price <$/hr>` | — | Hard spend cap per GPU-hour |
57
61
  | `--dry-run` | — | Preview routing without provisioning |
@@ -69,7 +73,7 @@ badgr run python train.py --gpu A100 --env HF_TOKEN=$HF_TOKEN
69
73
  | `--gpu <type>` | RTX_4090 | GPU type |
70
74
  | `--image <img>` | python:3.11-slim | Docker image |
71
75
  | `--env KEY=VALUE` | — | Environment variable (repeatable) |
72
- | `--region US\|EU\|AU` | US | Region preference |
76
+ | `--region <region>` | | Optional region preference. If omitted, Badgr chooses best available capacity. |
73
77
  | `--max-price <$/hr>` | — | Hard spend cap per GPU-hour |
74
78
  | `--detach` | — | Launch and return immediately |
75
79
 
@@ -77,9 +81,11 @@ badgr run python train.py --gpu A100 --env HF_TOKEN=$HF_TOKEN
77
81
 
78
82
  ## Routing
79
83
 
80
- Badgr searches providers in order: own GPU hosts → Vast.ai → RunPod → TensorDock → SaladCloud. It picks the cheapest available instance that meets the GPU and region spec, then adds ~25% for routing margin and startup risk.
84
+ Badgr automatically searches available GPU capacity across its verified compute network.
85
+
86
+ Badgr automatically searches verified GPU capacity and chooses the best eligible route for your GPU type, workload, price cap, and optional region preference.
81
87
 
82
- Preview routing before committing:
88
+ Preview before provisioning:
83
89
 
84
90
  ```bash
85
91
  badgr serve mistral-7b --gpu RTX_4090 --dry-run
@@ -96,7 +102,7 @@ badgr receipts # last 10
96
102
  badgr receipts 50 # last 50
97
103
  ```
98
104
 
99
- Each receipt includes: receipt ID, provider, GPU, provisioning latency, rate/hr, and retry count.
105
+ Each receipt includes: receipt ID, GPU type, provisioning latency, rate/hr, route used, retry count, and status.
100
106
 
101
107
  ---
102
108
 
@@ -109,7 +115,7 @@ from openai import OpenAI
109
115
 
110
116
  client = OpenAI(
111
117
  api_key="your-badgr-api-key",
112
- base_url="https://dep-xyz.api.badgr.ai/v1", # from badgr serve output
118
+ base_url="https://dep-a1b2c3.api.badgr.ai/v1", # from badgr serve output
113
119
  )
114
120
  resp = client.chat.completions.create(
115
121
  model="meta-llama/Llama-3.1-8B-Instruct",
@@ -121,7 +127,7 @@ resp = client.chat.completions.create(
121
127
  import OpenAI from "openai";
122
128
  const client = new OpenAI({
123
129
  apiKey: process.env.BADGR_API_KEY,
124
- baseURL: "https://dep-xyz.api.badgr.ai/v1",
130
+ baseURL: "https://dep-a1b2c3.api.badgr.ai/v1",
125
131
  });
126
132
  ```
127
133
 
@@ -129,7 +135,7 @@ const client = new OpenAI({
129
135
 
130
136
  ## GPU options
131
137
 
132
- | Flag value | GPU | VRAM | Est. rate/hr |
138
+ | Flag value | GPU | VRAM | Estimated Badgr price/hr |
133
139
  |-----------|-----|------|-------------|
134
140
  | RTX_4090 | NVIDIA RTX 4090 | 24 GB | $0.65–0.89 |
135
141
  | L40S | NVIDIA L40S | 48 GB | $1.10–1.40 |
@@ -137,7 +143,7 @@ const client = new OpenAI({
137
143
  | A100 | NVIDIA A100 | 80 GB | $1.20–1.50 |
138
144
  | H100 | NVIDIA H100 | 80 GB | $2.80–3.10 |
139
145
 
140
- Rates are provider-level. Badgr adds ~25% for routing and startup risk.
146
+ Prices shown are estimated Badgr rates. Final $/GPU-hour is confirmed before provisioning and may vary by GPU type, availability, region, workload, and runtime.
141
147
 
142
148
  ---
143
149
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "badgr-cli",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Badgr — run or serve GPU workloads from one command",
5
5
  "type": "module",
6
6
  "bin": {
Binary file