@inference/cli 0.0.20 → 0.0.22-beta.524
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 +83 -10
- package/package.json +13 -10
package/README.md
CHANGED
|
@@ -63,6 +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 whoami # Show which user and team the CLI is currently authenticated as
|
|
66
67
|
inf auth set-key <key> # Set an API key for CI/headless use
|
|
67
68
|
```
|
|
68
69
|
|
|
@@ -74,6 +75,35 @@ inf project switch <id> # Set the active project
|
|
|
74
75
|
inf project current # Show the currently active project
|
|
75
76
|
```
|
|
76
77
|
|
|
78
|
+
### Team Management
|
|
79
|
+
|
|
80
|
+
A **team** is 1:1 with an organization on Inference.net. Commands that talk to the API scope to a team via a request header, so switching teams is a local, instant operation — no re-authentication required.
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
inf team list # List teams you belong to (marks the active one)
|
|
84
|
+
inf team current # Show the currently active team
|
|
85
|
+
inf team switch <id-or-slug> # Set the active team (ID, slug, or name)
|
|
86
|
+
inf team create <name> # Create a team (and default project); both become active
|
|
87
|
+
inf team invite <email> # Invite a member to the active team
|
|
88
|
+
inf team invite <email> --role admin # Invite as admin (default role: member)
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Team management commands (`list`, `current`, `switch`, `create`, `invite`) require session auth via `inf auth login`, not an API key. `inf team switch <id-or-slug>` is the one place slugs/names get resolved (it fetches your team list first) — the global `-t, --team <id>` flag and `INF_TEAM_ID` only accept a real team ID, since they skip that lookup for speed.
|
|
92
|
+
|
|
93
|
+
### API Key Management
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
inf api-key create <name> --project <id> # Create a project-scoped key (defaults: active project, read+write)
|
|
97
|
+
inf api-key create <name> --project <id> --permissions read # Read-only key
|
|
98
|
+
inf api-key create <name> --project <id> --team <id> # Create under a specific team
|
|
99
|
+
inf api-key list # List keys for the active team
|
|
100
|
+
inf api-key list --team <id> # List keys for a specific team
|
|
101
|
+
inf api-key revoke <id> # Revoke a key
|
|
102
|
+
inf api-key revoke <id> --team <id> # Revoke under a specific team
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
The raw key value is shown only once, at creation — save it immediately.
|
|
106
|
+
|
|
77
107
|
### Instrument (Automated Observability Setup)
|
|
78
108
|
|
|
79
109
|
```bash
|
|
@@ -119,10 +149,31 @@ inf dataset download <id> # Download a dataset (-o output path)
|
|
|
119
149
|
### Inferences
|
|
120
150
|
|
|
121
151
|
```bash
|
|
122
|
-
inf inference list # List
|
|
123
|
-
inf inference
|
|
152
|
+
inf inference list # List and filter inferences
|
|
153
|
+
inf inference facets # Probe valid filter values + full filter reference
|
|
154
|
+
inf inference get <id> # Get the full stored request + response (method, path, headers, bodies)
|
|
155
|
+
|
|
156
|
+
# Search / sort (no need to hardcode filter values — discover them with `facets`):
|
|
157
|
+
inf inference list --sort input_tokens --order desc --limit 50 # largest prompts first
|
|
158
|
+
inf inference list --filter inputTokens>39000 # numeric filter
|
|
159
|
+
inf inference list --model my-model --status 200 --range 7d # array + time filters
|
|
160
|
+
inf inference list --metadata user_id=abc123 # metadata filter
|
|
161
|
+
|
|
162
|
+
# Paginate from a script — JSON output includes nextCursor:
|
|
163
|
+
cursor=$(inf --json inference list --sort input_tokens --order desc | jq -r '.nextCursor')
|
|
164
|
+
inf --json inference list --sort input_tokens --order desc --cursor "$cursor"
|
|
165
|
+
|
|
166
|
+
# Fetch the complete bodies for scripting / archiving:
|
|
167
|
+
inf --json inference get <id> # Full payload as clean JSON (pipe to jq)
|
|
168
|
+
inf --json inference get <id> | jq '.response.body' # Just the response body
|
|
169
|
+
inf inference get <id> --response --body # Raw response body (no decoration)
|
|
170
|
+
inf inference get <id> --request --body -o req.json # Dump the raw request body to a file
|
|
171
|
+
inf --json inference get <id> -o dump.json # Save the full {request,response} payload
|
|
124
172
|
```
|
|
125
173
|
|
|
174
|
+
The full bodies are returned only when payload storage was enabled for the
|
|
175
|
+
request — otherwise `request`/`response` come back `null`.
|
|
176
|
+
|
|
126
177
|
### Traces
|
|
127
178
|
|
|
128
179
|
```bash
|
|
@@ -168,13 +219,14 @@ The dashboard provides a tabbed interface for browsing training runs, evals, dat
|
|
|
168
219
|
|
|
169
220
|
## Global Options
|
|
170
221
|
|
|
171
|
-
| Flag
|
|
172
|
-
|
|
|
173
|
-
| `--json`
|
|
174
|
-
| `-v, --verbose`
|
|
175
|
-
| `-p, --project <id>`
|
|
176
|
-
|
|
|
177
|
-
| `--
|
|
222
|
+
| Flag | Description |
|
|
223
|
+
| --------------------------- | ---------------------------------------------------------- |
|
|
224
|
+
| `--json` | Output results as JSON (useful for scripting) |
|
|
225
|
+
| `-v, --verbose` | Enable verbose debug output |
|
|
226
|
+
| `-p, --project <id>` | Override the active project for this command |
|
|
227
|
+
| `-t, --team <id>` | Override the active team for this command (team ID) |
|
|
228
|
+
| `--version` | Show the CLI version |
|
|
229
|
+
| `--help` | Show help |
|
|
178
230
|
|
|
179
231
|
## Configuration
|
|
180
232
|
|
|
@@ -191,6 +243,8 @@ Stored at `~/.inf/config.json`. Managed automatically by `inf auth` commands.
|
|
|
191
243
|
| `INF_UI_URL` | Web app URL (for device auth) | Derived from API URL |
|
|
192
244
|
| `INF_API_KEY` | Scoped platform key for headless/CI auth | |
|
|
193
245
|
| `INF_PROJECT_ID` | Override the selected project when a key can access multiple projects | |
|
|
246
|
+
| `INF_TEAM_ID` | Override the active team (team ID; use `inf team switch <id-or-slug>` to resolve a slug/name once) | |
|
|
247
|
+
| `INF_CONFIG_DIR` | Override where `~/.inf/config.json` is stored (primarily for test isolation) | `~/.inf` |
|
|
194
248
|
|
|
195
249
|
### Priority Order
|
|
196
250
|
|
|
@@ -268,6 +322,24 @@ The workflow can also repair a partial stable release. If `@inference/cli` alrea
|
|
|
268
322
|
|
|
269
323
|
### Releasing A New Version
|
|
270
324
|
|
|
325
|
+
#### Option A — Auto-bump from CI (recommended)
|
|
326
|
+
|
|
327
|
+
Trigger the workflow manually and let CI bump the version for you:
|
|
328
|
+
|
|
329
|
+
1. Run `workflow_dispatch` on the branch you want to release from
|
|
330
|
+
(`development` for beta, `main` for stable).
|
|
331
|
+
2. Set `semver_action` to `patch`, `minor`, or `major`.
|
|
332
|
+
3. The `bump-version` job runs `npx semver -i`, then
|
|
333
|
+
`scripts/sync-versions.ts` so the main package and all four platform
|
|
334
|
+
manifests move together, commits the result, and pushes a
|
|
335
|
+
`release-inf-cli-<version>-<sha>` tag back to the dispatched branch.
|
|
336
|
+
4. The same run then builds and publishes the bumped version.
|
|
337
|
+
|
|
338
|
+
Leave `semver_action=none` (the default) to publish the already-committed
|
|
339
|
+
version without bumping.
|
|
340
|
+
|
|
341
|
+
#### Option B — Bump manually
|
|
342
|
+
|
|
271
343
|
1. Choose the next stable version.
|
|
272
344
|
2. Sync all committed CLI manifests to that version.
|
|
273
345
|
|
|
@@ -283,8 +355,9 @@ bun scripts/sync-versions.ts 0.0.9
|
|
|
283
355
|
|
|
284
356
|
### Manual Runs
|
|
285
357
|
|
|
358
|
+
- `workflow_dispatch` takes a `semver_action` input (`none`/`patch`/`minor`/`major`); anything other than `none` bumps, commits, and tags the new version on the dispatched branch before publishing
|
|
286
359
|
- `workflow_dispatch` with `dry_run=false` always attempts a publish on `development` or `main`
|
|
287
|
-
- Set `dry_run=true` to validate the full build and packaging path without publishing to npm
|
|
360
|
+
- Set `dry_run=true` to validate the full build and packaging path without publishing to npm; a dry run computes and builds the bumped version but does not push the bump commit or tag, so it stays side-effect-free
|
|
288
361
|
- Pushes to `development` always publish a fresh beta release when this workflow is triggered
|
|
289
362
|
- Set `dry_run=false` only on `development` or `main`
|
|
290
363
|
- Manual runs from other branches are rejected by the workflow
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inference/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.22-beta.524",
|
|
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,10 +26,10 @@
|
|
|
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.22-beta.524",
|
|
30
|
+
"@inference/cli-darwin-x64": "0.0.22-beta.524",
|
|
31
|
+
"@inference/cli-linux-x64": "0.0.22-beta.524",
|
|
32
|
+
"@inference/cli-linux-arm64": "0.0.22-beta.524"
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|
|
35
35
|
"build": "bun run clean:bin && bun run build:cli",
|
|
@@ -45,13 +45,16 @@
|
|
|
45
45
|
"clean:bin": "rm -rf bin/inf",
|
|
46
46
|
"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",
|
|
47
47
|
"dev": "bun src/index.ts",
|
|
48
|
-
"format": "
|
|
49
|
-
"format:fix": "
|
|
50
|
-
"lint": "
|
|
51
|
-
"lint:fix": "
|
|
48
|
+
"format": "oxfmt --check .",
|
|
49
|
+
"format:fix": "oxfmt --write .",
|
|
50
|
+
"lint": "ROOT=\"$(git rev-parse --show-toplevel)/inference\" && \"$ROOT/node_modules/.bin/oxlint\" --type-aware",
|
|
51
|
+
"lint:fix": "ROOT=\"$(git rev-parse --show-toplevel)/inference\" && \"$ROOT/node_modules/.bin/oxlint\" --type-aware --fix",
|
|
52
52
|
"tsc": "tsc --build",
|
|
53
53
|
"test": "bun run test:unit",
|
|
54
|
-
"test:unit": "
|
|
54
|
+
"test:unit": "vitest run --config vitest.unit.config.mts",
|
|
55
55
|
"test:vitest": "vitest run --config vitest.unit.config.mts"
|
|
56
|
+
},
|
|
57
|
+
"dependencies": {
|
|
58
|
+
"react": "19.2.7"
|
|
56
59
|
}
|
|
57
60
|
}
|