@inference/cli
Command-line interface for Inference.net -- manage evals, datasets, and inferences from your terminal.
Installation
Global install (npm, Bun, pnpm, or Yarn Classic):
npm install --global @inference/cli
bun install --global @inference/cli
pnpm add --global @inference/cli
yarn global add @inference/cli
Run inf update to update a supported global installation through the package manager that installed it (npm, Bun, pnpm, or Yarn Classic v1 — Yarn Berry v2+ is not supported because it removed yarn global). It prints the version it replaced; run inf --version afterward to confirm the new version. Project-local installs should be updated through that project's package manager. npx and bunx fetch a current release when you run them, so rerun the command instead of using inf update. Windows global installs are not yet supported by inf update — rerun your package manager's install command to update.
Via npx (no install):
npx @inference/cli --help
Via Bun:
bunx @inference/cli --help
Supported Platforms
| Platform |
Architecture |
Package |
| macOS |
Apple Silicon (arm64) |
@inference/cli-darwin-arm64 |
| macOS |
Intel (x64) |
@inference/cli-darwin-x64 |
| Linux |
x64 |
@inference/cli-linux-x64 |
| Linux |
arm64 |
@inference/cli-linux-arm64 |
The correct binary is installed automatically based on your platform.
Quick Start
# Sign in via browser
inf auth login
# List your projects
inf project list
# Select a project
inf project switch
# Instrument a codebase with observability (run from your project directory)
inf instrument
# Launch interactive dashboard
inf dashboard
Commands
REST-backed subcommands. Several resource groups below (e.g. project,
api-key, dataset, deployment, eval, models, signal, team) carry
additional subcommands generated from the platform's REST API, alongside the
hand-written ones documented here. Run inf <group> --help to see the full,
current list for a group — a hand-written command always takes precedence over
a generated one of the same name. The same operations are available as a REST
API (/api/rest, with Swagger docs at /api/rest/docs) and as MCP tools.
Authentication
inf auth login # Sign in via browser (device authorization flow)
inf auth logout # Sign out and clear stored credentials
inf auth status # Show current authentication status
inf auth whoami # Show which user and team the CLI is currently authenticated as
inf auth set-key <key> # Set an API key for CI/headless use
Projects
inf project list # List all projects
inf project switch [id] # Set the active project, or choose one interactively
inf project current # Show the currently active project
Team Management
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.
inf team list # List teams you belong to (marks the active one)
inf team current # Show the currently active team
inf team switch [id-or-slug] # Set the active team, or choose one interactively
inf team create <name> # Create a team (and default project); both become active
inf team invite <email> # Invite a member to the active team
inf team invite <email> --role admin # Invite as admin (default role: member)
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.
API Key Management
inf api-key create <name> --project <id> # Create a project-scoped key (defaults: active project, read+write)
inf api-key create <name> --project <id> --permissions read # Read-only key
inf api-key create <name> --project <id> --team <id> # Create under a specific team
inf api-key list # List keys for the active team
inf api-key list --team <id> # List keys for a specific team
inf api-key revoke <id> # Revoke a key
inf api-key revoke <id> --team <id> # Revoke under a specific team
The raw key value is shown only once, at creation — save it immediately.
Instrument (Automated Observability Setup)
inf instrument # Instrument your codebase with Catalyst observability
inf instrument --dry-run # Preview changes without modifying files
Automatically instruments your codebase to route LLM API calls through the Inference.net observability proxy. The command:
- Confirms your active project and API key
- Detects available AI coding agents (Claude Code, OpenCode, or Codex)
- Fetches the latest instrumentation skill from inference.net
- Launches the selected agent to scan and modify your code
Run this from the root of the project you want to instrument.
Evals
inf eval list # List eval run groups
inf eval get <id> # Get eval run group details
inf eval rubrics # List rubrics
inf eval datasets # List eval datasets
Datasets
inf dataset list # List filtered datasets
inf dataset get <id> # Get dataset details
inf dataset download <id> # Download a dataset (-o output path)
Inferences
inf inference list # List and filter inferences
inf inference facets # Probe valid filter values + full filter reference
inf inference get <id> # Get the full stored request + response (method, path, headers, bodies)
# Search / sort (no need to hardcode filter values — discover them with `facets`):
inf inference list --sort input_tokens --order desc --limit 50 # largest prompts first
inf inference list --filter inputTokens>39000 # numeric filter
inf inference list --model my-model --status 200 --range 7d # array + time filters
inf inference list --metadata user_id=abc123 # metadata filter
# Paginate from a script — JSON output includes nextCursor:
cursor=$(inf --json inference list --sort input_tokens --order desc | jq -r '.nextCursor')
inf --json inference list --sort input_tokens --order desc --cursor "$cursor"
# Fetch the complete bodies for scripting / archiving:
inf --json inference get <id> # Full payload as clean JSON (pipe to jq)
inf --json inference get <id> | jq '.response.body' # Just the response body
inf inference get <id> --response --body # Raw response body (no decoration)
inf inference get <id> --request --body -o req.json # Dump the raw request body to a file
inf --json inference get <id> -o dump.json # Save the full {request,response} payload
The full bodies are returned only when payload storage was enabled for the
request — otherwise request/response come back null.
Traces
inf trace list # List trace summaries
inf trace get <trace-id> # Get trace summary + tree
inf trace get <trace-id> --view tree # Render the span tree
inf trace get <trace-id> --view timeline # Render a text waterfall
inf trace get <trace-id> --view thread # Render captured conversation messages
inf trace facets # Inspect filter facets and counts
inf trace export create --range 1d --kind LLM # Queue a JSONL trace export
inf trace export list # List trace export jobs
inf trace export status <job-id> # Inspect a trace export job
inf trace export download <job-id> # Download a ready export
Trace list and facet commands support the same dashboard filter vocabulary:
--range, --from, --to, --kind, --provider, --model, --service,
--environment, --user, --session, --agent, --status, --filter,
--metadata, and --resource.
Spans
inf span list # List spans
inf span list --scope entrypoint # List entrypoint spans
inf span list --trace-id <trace-id> --text foo # Search spans in a trace
inf span get <trace-id> <span-id> # Get span summary
inf span get <trace-id> <span-id> --view io # Print captured input/output
inf span get <trace-id> <span-id> --view attributes
inf span facets # Inspect span filter facets
Span list and facet commands support trace filters plus --trace-id, --text,
and --scope all|root|entrypoint.
Deployments and Endpoints
inf deployment describe <id> # Everything about a deployment: engine config (per-flag source), routing vs. siblings, instances, endpoint, pricing
inf deployment history <id> --since 7d # Config eras, deployment + endpoint event timeline, instances that ran
inf deployment history <id> --at 2026-10-01T14:05:00Z # Config, settings and routing as they were at that moment
inf deployment history <id> --instance-configs # The exact engine config each instance ran
inf deployment config <id> # Effective engine flags and env, and which layer set each
inf endpoint list # Endpoints with their deployments, ranks and routing rules
inf endpoint describe <endpoint-id> # Shared settings, list price, every deployment in routing order
inf endpoint instances <endpoint-id> # Every deployment's instances grouped by exact engine flags, launch argv, diff vs default
inf endpoint history <endpoint-id> # Routing eras, each deployment's config eras, merged timeline
inf endpoint pricing <endpoint-id> --since 30d --at <time> # List price, rules, what each team pays, changes, prices at a moment
Filters: --since / --until / --at take an ISO time or an age (90m, 24h, 7d, 2w); --status, --instance-status, --type take comma-separated values; --for-team, --instance, --actor and --model narrow further.
Every command takes --json for a single machine-readable document. Run
inf deployment describe --help or inf deployment history --help for a
glossary of every field.
Batch API
Run offline jobs through the OpenAI-compatible Batch API (batch.inference.net/v1; batch.inference.cool on staging).
inf batch template prompts.txt --model glm-5.3-flash -o input.jsonl # one prompt per line → batch JSONL
inf batch create input.jsonl # validate locally, upload, create; prints the batch ID
inf batch create input.jsonl --wait -o ./out # ...then show live progress and download results
inf batch list [--limit 50] [--status completed]
inf batch get <id> # counts, timestamps, durations, file IDs
inf batch wait <id> [--interval 10] [--timeout 3600] # exits 1 if the batch failed or expired
inf batch cancel <id>
inf batch results <id> [-o ./out] [--errors] [--format table]
inf batch files upload|list|get|download|delete
create checks every line first (valid JSON, unique custom_id, method: "POST", url matching --endpoint, body.model) and lists problems with line numbers without uploading. Files over 10 MB upload in chunks with per-part retries (max 1 GB).
The Batch API takes a project API key, resolved in this order: --api-key, INF_API_KEY / inf auth set-key, then — when signed in with inf auth login — a key named inf-cli-batch that the CLI mints once for the active project and caches in ~/.inf/config.json. --base-url overrides the environment-derived URL.
Dashboard
inf dashboard # Launch interactive TUI dashboard
The dashboard provides a tabbed interface for browsing evals, datasets, and inferences. Use 1-3 to switch tabs, j/k to navigate, Enter to drill down, r to refresh, and q to quit.
Global Options
| Flag |
Description |
--json |
Output results as JSON (useful for scripting) |
-v, --verbose |
Enable verbose debug output |
-p, --project <id> |
Override the active project for this command |
-t, --team <id> |
Override the active team for this command (team ID) |
--version |
Show the CLI version |
--help |
Show help |
Configuration
Config File
Stored at ~/.inf/config.json. Managed automatically by inf auth commands.
Environment Variables
| Variable |
Description |
Default |
INF_API_URL |
LLM Ops API base URL |
https://relay.inference.net |
INF_AUTH_URL |
Auth server base URL |
Derived from API URL |
INF_UI_URL |
Web app URL (for device auth) |
Derived from API URL |
INF_API_KEY |
Scoped platform key for headless/CI auth |
|
INF_PROJECT_ID |
Override the selected project when a key can access multiple projects |
|
INF_TEAM_ID |
Override the active team (team ID; use inf team switch <id-or-slug> to resolve a slug/name once) |
|
INF_CONFIG_DIR |
Override where ~/.inf/config.json is stored (primarily for test isolation) |
~/.inf |
Priority Order
Authentication resolves in this order:
INF_API_KEY environment variable
- API key in config file (
inf auth set-key)
- Session token in config file (
inf auth login)
API URL resolves in this order:
INF_API_URL environment variable
apiUrl in config file
- Default:
https://relay.inference.net
CI / Headless Usage
For CI pipelines and automated environments where browser-based login is not possible:
# Set your API key (obtain from Inference.net dashboard under project settings)
# New keys use the sk-inference-* prefix. Existing sk-observability-* keys still work.
export INF_API_KEY=sk-inference-...
# Or persist it in the config file
inf auth set-key sk-inference-...
# Set the project when the key is scoped to multiple projects.
# Single-project keys or keys with a default project can omit this.
export INF_PROJECT_ID=your-project-id
# Now all commands work without interactive login
inf eval list --json
Release Workflow
INF-CLI is published to npm entirely through GitHub Actions.
- Workflow:
.github/workflows/inference--inf-cli-release.yml
- Packages published together:
@inference/cli
@inference/cli-darwin-arm64
@inference/cli-darwin-x64
@inference/cli-linux-x64
@inference/cli-linux-arm64
- Version source of truth:
inference/apps/inf-cli/package.json
- The checked-in version must always be a stable semver like
0.0.9
- Do not commit prerelease versions like
0.0.9-beta.3 to git
Branch Mapping