@inference/cli 0.0.7 → 0.0.9-beta.19
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 +87 -11
- package/bin/inf.cjs +0 -0
- package/package.json +13 -29
package/README.md
CHANGED
|
@@ -63,7 +63,7 @@ inf dashboard
|
|
|
63
63
|
inf auth login # Sign in via browser (device authorization flow)
|
|
64
64
|
inf auth logout # Sign out and clear stored credentials
|
|
65
65
|
inf auth status # Show current authentication status
|
|
66
|
-
inf auth set-key <key> # Set an API key for CI/headless use
|
|
66
|
+
inf auth set-key <key> # Set an API key for CI/headless use
|
|
67
67
|
```
|
|
68
68
|
|
|
69
69
|
### Projects
|
|
@@ -149,13 +149,13 @@ Stored at `~/.inf/config.json`. Managed automatically by `inf auth` commands.
|
|
|
149
149
|
|
|
150
150
|
### Environment Variables
|
|
151
151
|
|
|
152
|
-
| Variable | Description
|
|
153
|
-
| ---------------- |
|
|
154
|
-
| `INF_API_URL` | LLM Ops API base URL
|
|
155
|
-
| `INF_AUTH_URL` | Auth server base URL
|
|
156
|
-
| `INF_UI_URL` | Web app URL (for device auth)
|
|
157
|
-
| `INF_API_KEY` |
|
|
158
|
-
| `INF_PROJECT_ID` | Override
|
|
152
|
+
| Variable | Description | Default |
|
|
153
|
+
| ---------------- | --------------------------------------------------------------------- | ----------------------------------------- |
|
|
154
|
+
| `INF_API_URL` | LLM Ops API base URL | `https://observability-api.inference.net` |
|
|
155
|
+
| `INF_AUTH_URL` | Auth server base URL | Derived from API URL |
|
|
156
|
+
| `INF_UI_URL` | Web app URL (for device auth) | Derived from API URL |
|
|
157
|
+
| `INF_API_KEY` | Scoped platform key for headless/CI auth | |
|
|
158
|
+
| `INF_PROJECT_ID` | Override the selected project when a key can access multiple projects | |
|
|
159
159
|
|
|
160
160
|
### Priority Order
|
|
161
161
|
|
|
@@ -177,18 +177,94 @@ For CI pipelines and automated environments where browser-based login is not pos
|
|
|
177
177
|
|
|
178
178
|
```bash
|
|
179
179
|
# Set your API key (obtain from Inference.net dashboard under project settings)
|
|
180
|
-
|
|
180
|
+
# New keys use the sk-inference-* prefix. Existing sk-observability-* keys still work.
|
|
181
|
+
export INF_API_KEY=sk-inference-...
|
|
181
182
|
|
|
182
183
|
# Or persist it in the config file
|
|
183
|
-
inf auth set-key sk-
|
|
184
|
+
inf auth set-key sk-inference-...
|
|
184
185
|
|
|
185
|
-
# Set the project
|
|
186
|
+
# Set the project when the key is scoped to multiple projects.
|
|
187
|
+
# Single-project keys or keys with a default project can omit this.
|
|
186
188
|
export INF_PROJECT_ID=your-project-id
|
|
187
189
|
|
|
188
190
|
# Now all commands work without interactive login
|
|
189
191
|
inf training list --json
|
|
190
192
|
```
|
|
191
193
|
|
|
194
|
+
## Release Workflow
|
|
195
|
+
|
|
196
|
+
INF-CLI is published to npm entirely through GitHub Actions.
|
|
197
|
+
|
|
198
|
+
- Workflow: `.github/workflows/inference--inf-cli-release.yml`
|
|
199
|
+
- Packages published together:
|
|
200
|
+
- `@inference/cli`
|
|
201
|
+
- `@inference/cli-darwin-arm64`
|
|
202
|
+
- `@inference/cli-darwin-x64`
|
|
203
|
+
- `@inference/cli-linux-x64`
|
|
204
|
+
- `@inference/cli-linux-arm64`
|
|
205
|
+
- Version source of truth: `inference/apps/inf-cli/package.json`
|
|
206
|
+
- The checked-in version must always be a stable semver like `0.0.9`
|
|
207
|
+
- Do not commit prerelease versions like `0.0.9-beta.3` to git
|
|
208
|
+
|
|
209
|
+
### Branch Mapping
|
|
210
|
+
|
|
211
|
+
| Branch | Environment | Published Version Format | npm Dist-Tag |
|
|
212
|
+
| ------------- | ----------- | ------------------------ | ------------ |
|
|
213
|
+
| `development` | Beta | `0.0.9-beta.<run>` | `beta` |
|
|
214
|
+
| `main` | Stable | `0.0.9` | `latest` |
|
|
215
|
+
|
|
216
|
+
Developers publish across environments by moving the same stable base version through `development` first, then `main`.
|
|
217
|
+
|
|
218
|
+
### What The Workflow Does
|
|
219
|
+
|
|
220
|
+
On a qualifying push or manual dispatch, the workflow:
|
|
221
|
+
|
|
222
|
+
1. Validates that the run is on `development` or `main`
|
|
223
|
+
2. Reads the stable base version from `apps/inf-cli/package.json`
|
|
224
|
+
3. Computes the publish version for the target environment
|
|
225
|
+
4. Runs INF-CLI unit tests and `bun tsc --noEmit`
|
|
226
|
+
5. Builds the umbrella CLI plus all four platform binaries
|
|
227
|
+
6. Creates a staged publish artifact and rewrites package versions only inside staging
|
|
228
|
+
7. Validates each staged package with `npm pack --dry-run`
|
|
229
|
+
8. Publishes platform packages first and `@inference/cli` last
|
|
230
|
+
9. Retries npm verification until the expected version and dist-tag are visible
|
|
231
|
+
|
|
232
|
+
The workflow can also repair a partial stable release. If `@inference/cli` already exists on npm but one of the platform packages is missing, rerunning the workflow on the same stable version will publish only the missing packages.
|
|
233
|
+
|
|
234
|
+
### Releasing A New Version
|
|
235
|
+
|
|
236
|
+
1. Choose the next stable version.
|
|
237
|
+
2. Sync all committed CLI manifests to that version.
|
|
238
|
+
|
|
239
|
+
```bash
|
|
240
|
+
cd inference/apps/inf-cli
|
|
241
|
+
bun scripts/sync-versions.ts 0.0.9
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
3. Commit the manifest changes.
|
|
245
|
+
4. Merge or push that version to `development` to start the beta train.
|
|
246
|
+
5. Validate the beta release from npm using the `beta` dist-tag.
|
|
247
|
+
6. Merge the same version to `main` to publish the stable release to `latest`.
|
|
248
|
+
|
|
249
|
+
### Manual Runs
|
|
250
|
+
|
|
251
|
+
- `workflow_dispatch` is intended for dry runs and emergency re-publishes
|
|
252
|
+
- Set `dry_run=true` to validate the full build and packaging path without publishing to npm
|
|
253
|
+
- Set `dry_run=false` only on `development` or `main`
|
|
254
|
+
- Manual runs from other branches are rejected by the workflow
|
|
255
|
+
|
|
256
|
+
### Local Release Preview
|
|
257
|
+
|
|
258
|
+
If you want to verify the compiled CLI version locally without changing committed manifests, you can inject a temporary build version:
|
|
259
|
+
|
|
260
|
+
```bash
|
|
261
|
+
cd inference/apps/inf-cli
|
|
262
|
+
INFERENCE_CLI_BUILD_VERSION=0.0.9-beta.local bun run build:npm:all
|
|
263
|
+
./bin/inf --version
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
This is useful for previewing beta-style binaries before the GitHub Actions workflow publishes them.
|
|
267
|
+
|
|
192
268
|
## License
|
|
193
269
|
|
|
194
270
|
MIT
|
package/bin/inf.cjs
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inference/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9-beta.19",
|
|
4
4
|
"description": "Inference.net CLI - manage training runs, evals, datasets, and inferences from your terminal",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -26,20 +26,21 @@
|
|
|
26
26
|
"ai"
|
|
27
27
|
],
|
|
28
28
|
"optionalDependencies": {
|
|
29
|
-
"@inference/cli-darwin-arm64": "0.0.
|
|
30
|
-
"@inference/cli-darwin-x64": "0.0.
|
|
31
|
-
"@inference/cli-linux-x64": "0.0.
|
|
32
|
-
"@inference/cli-linux-arm64": "0.0.
|
|
29
|
+
"@inference/cli-darwin-arm64": "0.0.9-beta.19",
|
|
30
|
+
"@inference/cli-darwin-x64": "0.0.9-beta.19",
|
|
31
|
+
"@inference/cli-linux-x64": "0.0.9-beta.19",
|
|
32
|
+
"@inference/cli-linux-arm64": "0.0.9-beta.19"
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|
|
35
35
|
"build": "bun run clean:bin && bun run build:cli",
|
|
36
|
-
"build:cli": "bun build src/index.ts --compile --minify --outfile bin/inf",
|
|
37
|
-
"build:cli:local": "bun build src/index.ts --compile --outfile bin/inf",
|
|
38
|
-
"
|
|
39
|
-
"build:npm:darwin-
|
|
40
|
-
"build:npm:
|
|
41
|
-
"build:npm:linux-
|
|
42
|
-
"build:npm:
|
|
36
|
+
"build:cli": "bun build src/index.ts --compile --minify --env=INFERENCE_CLI_* --outfile bin/inf",
|
|
37
|
+
"build:cli:local": "bun build src/index.ts --compile --env=INFERENCE_CLI_* --outfile bin/inf",
|
|
38
|
+
"prepare:npm:manifests": "bun scripts/sync-versions.ts",
|
|
39
|
+
"build:npm:darwin-arm64": "bun build src/index.ts --bundle --compile --minify --env=INFERENCE_CLI_* --external '@opentui/core-*' --target=bun-darwin-arm64 --outfile npm/cli-darwin-arm64/bin/inf",
|
|
40
|
+
"build:npm:darwin-x64": "bun build src/index.ts --bundle --compile --minify --env=INFERENCE_CLI_* --external '@opentui/core-*' --target=bun-darwin-x64 --outfile npm/cli-darwin-x64/bin/inf",
|
|
41
|
+
"build:npm:linux-x64": "bun build src/index.ts --bundle --compile --minify --env=INFERENCE_CLI_* --external '@opentui/core-*' --target=bun-linux-x64 --outfile npm/cli-linux-x64/bin/inf",
|
|
42
|
+
"build:npm:linux-arm64": "bun build src/index.ts --bundle --compile --minify --env=INFERENCE_CLI_* --external '@opentui/core-*' --target=bun-linux-arm64 --outfile npm/cli-linux-arm64/bin/inf",
|
|
43
|
+
"build:npm:all": "bun run clean:npm && bun run build && bun run build:npm:darwin-arm64 && bun run build:npm:darwin-x64 && bun run build:npm:linux-x64 && bun run build:npm:linux-arm64",
|
|
43
44
|
"clean:bin": "rm -rf bin/inf",
|
|
44
45
|
"clean:npm": "rm -f npm/cli-darwin-arm64/bin/inf npm/cli-darwin-x64/bin/inf npm/cli-linux-x64/bin/inf npm/cli-linux-arm64/bin/inf",
|
|
45
46
|
"dev": "bun src/index.ts",
|
|
@@ -50,22 +51,5 @@
|
|
|
50
51
|
"tsc": "tsc",
|
|
51
52
|
"test": "bun run test:unit",
|
|
52
53
|
"test:unit": "bun test ./tests/unit"
|
|
53
|
-
},
|
|
54
|
-
"devDependencies": {
|
|
55
|
-
"@inference-net/cf-compatible-models": "workspace:*",
|
|
56
|
-
"@inference-net/llm-ops-trpc-api": "workspace:*",
|
|
57
|
-
"@opentui/core": "0.1.80",
|
|
58
|
-
"@opentui/react": "0.1.80",
|
|
59
|
-
"@trpc/client": "11.4.0",
|
|
60
|
-
"@trpc/server": "11.4.0",
|
|
61
|
-
"@inquirer/confirm": "5.1.21",
|
|
62
|
-
"@inquirer/select": "4.4.2",
|
|
63
|
-
"@types/bun": "1.3.6",
|
|
64
|
-
"chalk": "5.4.1",
|
|
65
|
-
"cli-table3": "0.6.5",
|
|
66
|
-
"commander": "13.1.0",
|
|
67
|
-
"open": "10.1.0",
|
|
68
|
-
"ora": "8.2.0",
|
|
69
|
-
"typescript": "5"
|
|
70
54
|
}
|
|
71
55
|
}
|