@inference/cli 0.0.8 → 0.0.9-beta.20

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 (3) hide show
  1. package/README.md +91 -15
  2. package/bin/inf.cjs +0 -0
  3. package/package.json +13 -30
package/README.md CHANGED
@@ -46,7 +46,7 @@ inf project list
46
46
  inf project switch <project-id>
47
47
 
48
48
  # Instrument a codebase with observability (run from your project directory)
49
- inf install
49
+ inf instrument
50
50
 
51
51
  # View recent training runs
52
52
  inf training list
@@ -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 (sk-observability-*)
66
+ inf auth set-key <key> # Set an API key for CI/headless use
67
67
  ```
68
68
 
69
69
  ### Projects
@@ -74,11 +74,11 @@ inf project switch <id> # Set the active project
74
74
  inf project current # Show the currently active project
75
75
  ```
76
76
 
77
- ### Install (Automated Observability Setup)
77
+ ### Instrument (Automated Observability Setup)
78
78
 
79
79
  ```bash
80
- inf install # Instrument your codebase with Catalyst observability
81
- inf install --dry-run # Preview changes without modifying files
80
+ inf instrument # Instrument your codebase with Catalyst observability
81
+ inf instrument --dry-run # Preview changes without modifying files
82
82
  ```
83
83
 
84
84
  Automatically instruments your codebase to route LLM API calls through the Inference.net observability proxy. The command:
@@ -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 | 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` | API key for headless/CI auth | |
158
- | `INF_PROJECT_ID` | Override active project ID | |
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
- export INF_API_KEY=sk-observability-...
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-observability-...
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.8",
3
+ "version": "0.0.9-beta.20",
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.8",
30
- "@inference/cli-darwin-x64": "0.0.8",
31
- "@inference/cli-linux-x64": "0.0.8",
32
- "@inference/cli-linux-arm64": "0.0.8"
29
+ "@inference/cli-darwin-arm64": "0.0.9-beta.20",
30
+ "@inference/cli-darwin-x64": "0.0.9-beta.20",
31
+ "@inference/cli-linux-x64": "0.0.9-beta.20",
32
+ "@inference/cli-linux-arm64": "0.0.9-beta.20"
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
- "build:npm:darwin-arm64": "bun build src/index.ts --bundle --compile --minify --external '@opentui/core-*' --target=bun-darwin-arm64 --outfile npm/cli-darwin-arm64/bin/inf",
39
- "build:npm:darwin-x64": "bun build src/index.ts --bundle --compile --minify --external '@opentui/core-*' --target=bun-darwin-x64 --outfile npm/cli-darwin-x64/bin/inf",
40
- "build:npm:linux-x64": "bun build src/index.ts --bundle --compile --minify --external '@opentui/core-*' --target=bun-linux-x64 --outfile npm/cli-linux-x64/bin/inf",
41
- "build:npm:linux-arm64": "bun build src/index.ts --bundle --compile --minify --external '@opentui/core-*' --target=bun-linux-arm64 --outfile npm/cli-linux-arm64/bin/inf",
42
- "build:npm:all": "bun run clean:npm && bun run build:npm:darwin-arm64 && bun run build:npm:darwin-x64 && bun run build:npm:linux-x64 && bun run build:npm:linux-arm64",
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,23 +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/cf-compatible-utils": "workspace:*",
57
- "@inference-net/llm-ops-trpc-api": "workspace:*",
58
- "@opentui/core": "0.1.80",
59
- "@opentui/react": "0.1.80",
60
- "@trpc/client": "11.4.0",
61
- "@trpc/server": "11.4.0",
62
- "@inquirer/confirm": "5.1.21",
63
- "@inquirer/select": "4.4.2",
64
- "@types/bun": "1.3.6",
65
- "chalk": "5.4.1",
66
- "cli-table3": "0.6.5",
67
- "commander": "13.1.0",
68
- "open": "10.1.0",
69
- "ora": "8.2.0",
70
- "typescript": "5"
71
54
  }
72
55
  }