badgr-cli 1.0.0 → 1.0.1

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
 
@@ -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
+ It chooses the cheapest eligible route that matches your GPU type, region, price cap, and workload type. If a route is unavailable, Badgr can try another eligible route without requiring you to change providers or rewrite code.
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
 
@@ -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
+ Rates are estimated market rates and may vary by region, availability, workload type, 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.1",
4
4
  "description": "Badgr — run or serve GPU workloads from one command",
5
5
  "type": "module",
6
6
  "bin": {
Binary file