Authentication & Setup
Install the CLI
curl -fsSL https://cli.inference.sh | sh
Login
belt login
This opens a browser for authentication. After login, credentials are stored locally.
Non-interactive login
belt login --key <api-key>
Without a TTY, belt login prints a URL; the browser then shows a claim code. Run belt login --code <code> on the same machine within 5 minutes.
Check Authentication
belt me
Shows your user info if authenticated.
Environment Variable
For CI/CD, scripts or agents, set your API key (read on every command, no login needed):
export INFERENCE_API_KEY=your-api-key
This is the same variable the SDKs and curl examples read. INFSH_API_KEY still works but is deprecated; older belt versions read only INFSH_API_KEY.
The environment variable overrides the config file.
Update CLI
belt update
Or reinstall:
curl -fsSL https://cli.inference.sh | sh
Troubleshooting
| Error | Solution |
|---|
| "not authenticated" | Run belt login |
| "command not found" | Reinstall CLI or add to PATH |
| "API key invalid" | Check INFERENCE_API_KEY or re-login |
Documentation