@inferhub/helper
v0.2.9
Published
Point coding agents and IDEs at InferHub — Claude Code, Codex, OpenCode, Hermes, OpenClaw, and more. Optionally install usage statusline plugins.
Maintainers
Readme
@inferhub/helper
Point coding agents and IDEs at InferHub with one command.
You only enter your InferHub API key. The helper validates it againstGET https://api.inferhub.dev/v1/models, then writes the right config files for each agent.
Works on Windows, macOS, and Linux (Node.js ≥ 18).
Install
# one-shot
npx @inferhub/helper
# or global
npm install -g @inferhub/helper
inferhub-helperAlso available as ih-helper.
Quick start
inferhub-helperInteractive wizard (default):
- API key — masked input, validated against
GET /v1/models(retry on failure) - Agents / IDEs — multi-select checklist (space to toggle, enter to confirm)
- Models — type-to-search picker (filters the live model list)
- Confirm — summary, then write configs
Non-interactive:
inferhub-helper apply \
--key sk-airo-… \
--model grok-4.5 \
--agents claude,opencode \
--yesCommands
| Command | Description |
|---|---|
| inferhub-helper / setup | Interactive wizard (default) |
| apply | Non-interactive apply (--key + --model) |
| status | Show which agents are installed / configured |
| reset | Remove InferHub settings only |
| validate --key … | Call /v1/models and print models |
| list | Supported agents |
| plugins | Install usage plugins (Claude statusline, OpenCode plugin) |
Flags
| Flag | Meaning |
|---|---|
| --key, -k | InferHub API key (INFERHUB_API_KEY env also works) |
| --base-url | Default https://api.inferhub.dev/v1 |
| --model, -m | Primary model id |
| --subagent-model | Codex / OpenCode subagent model |
| --models | Extra model ids (OpenCode, OpenClaw) |
| --agents | installed (default), all, or claude,codex,… |
| --dry-run | Don’t write files |
| --yes, -y | Skip prompts |
| --json | Machine-readable output |
| --plugins | Install usage plugins (all or claude,opencode) |
| --no-plugins | Skip usage-plugin install during apply/wizard |
Usage plugins
# install statusline / hooks for Claude, Codex, OpenCode
inferhub-helper plugins --plugins all
# or as part of apply
inferhub-helper apply -k sk-airo-… -m free/grok/grok-4.5 --agents claude,opencode -y --plugins allRequires live GET https://api.inferhub.dev/v1/me/usage. Publishes bins from
@inferhub/usage-client:
inferhub-statusline— Claude CodestatusLine.commandinferhub-usage— printable report / Codex hooks
Supported agents
| Id | Tool | Config written |
|---|---|---|
| claude | Claude Code | ~/.claude/settings.json → env.ANTHROPIC_BASE_URL + ANTHROPIC_AUTH_TOKEN |
| codex | OpenAI Codex CLI | ~/.codex/config.toml provider inferhub (wire_api = "responses") + auth.json |
| opencode | OpenCode | ~/.config/opencode/opencode.json provider inferhub (@ai-sdk/openai-compatible) |
| hermes | Hermes Agent | ~/.hermes/config.yaml model.provider: custom + .env OPENAI_API_KEY |
| openclaw | OpenClaw | ~/.openclaw/openclaw.json models.providers.inferhub |
| cline | Cline | ~/.cline/data/globalState.json + secrets.json (OpenAI-compatible) |
Existing settings are merged, not replaced. A .inferhub-backup copy is written next to each modified file.
Programmatic API
import {
validateApiKey,
applyToAgents,
statusAll,
DEFAULT_BASE_URL,
} from "@inferhub/helper";
const v = await validateApiKey({ apiKey: process.env.INFERHUB_API_KEY! });
if (!v.ok) throw new Error(v.error);
await applyToAgents("installed", {
apiKey: process.env.INFERHUB_API_KEY!,
model: v.models[0]!.id,
baseUrl: DEFAULT_BASE_URL,
});
console.log(await statusAll());Endpoint
InferHub public API:
- OpenAI-compatible:
https://api.inferhub.dev/v1/chat/completions,/v1/responses,/v1/models - Anthropic-compatible:
https://api.inferhub.dev/v1/messages
Create a key at inferhub.dev → Dashboard → API Keys.
License
MIT
