HaloForge Provider Router is a public HaloForge plugin for fast local AI tool configuration. It provides a small, safe configuration layer for Claude Code, Codex, and MCP installs, while leaving room for broader client support later.
It can apply one provider endpoint to:
- Claude Code:
~/.claude/settings.json - Codex:
~/.codex/auth.jsonand~/.codex/config.toml - MCP: Claude Code
~/.claude.jsonand Codex[mcp_servers]
The first release focuses on safe local writes: every apply/install operation creates a backup in the plugin data directory before touching live config files.
- HaloForge Level 0 module plugin
- Rust backend built with
haloforge-plugin-api0.2.13 - React frontend built with
@haloforge/plugin-sdk0.2.13 - Claude Code provider writes with
ANTHROPIC_BASE_URL, token, and model env vars - Optional Claude
primaryApiKeyand onboarding flags used by switch workflows - Codex provider writes that preserve existing
config.tomlsections such as[mcp_servers]and legacy[profiles] - Official Codex
model_provider = "openai"by default withopenai_base_url, matching current Codex config guidance for routing the built-in provider through a proxy or gateway - Codex auth modes for
auth.jsonAPI keys, provider-scoped bearer tokens, and providerenv_keyentries - Lightweight provider presets for official OpenAI/Anthropic and common OpenAI-compatible Codex endpoints
- Codex session visibility audit for provider/account switches, including rollout JSONL provider buckets,
session_index.jsonl, and Desktopstate_*.sqlitethread metadata - Backup-first Codex session repair that retags hidden active sessions, rebuilds the Desktop session index, and upserts missing Desktop thread rows to the current provider
- Structure-preserving Codex
config.tomlupdates viatoml_edit; malformed or duplicate-key TOML fails closed before any live file is rewritten - Optional model discovery from an OpenAI-compatible
/modelspath - MCP install for
stdio,http, andssespecs - Codex MCP header alias handling:
headersandhttp_headers - Cleanup for legacy Codex
[mcp.servers]when installing into[mcp_servers] - Cleanup for the old Codex provider entry when applying the current default provider id
- Backups and restore for every changed config file, including a safety backup before a restore operation overwrites current files
- Windows MCP stdio wrapper for
npx,npm,yarn,pnpm,node,bun, anddeno - Manifest
windowpolicy for reusing the existing Provider Router module when import deep links arrive
The plugin uses the standard user home directory on each platform. On macOS and Windows this resolves to the user's home profile and then writes the same tool-owned paths:
- Claude Code:
.claude/settings.json,.claude/config.json, and.claude.json - Codex:
.codex/auth.jsonand.codex/config.toml
The source keeps platform-aware paths for macOS and Windows, but the current GitHub Actions release/CI path builds and packages Windows x64 only, matching the current official plugin publishing flow. macOS entries remain in manifest.json for local development and future packaging.
The implementation covers Claude Code env config, Codex provider/auth files, MCP config paths, Windows stdio command wrapping, backup-first writes, Codex session visibility/index repair, and OpenAI-compatible provider fields.
The following are intentionally not in the first release:
- Local proxy daemon, failover, usage tracking, quota display, and provider health checks
- Managed OAuth or account flows such as GitHub Copilot auth
- Built-in provider marketplace/database sync
- Additional client targets such as Gemini, OpenCode, OpenClaw, Hermes, and Claude Desktop
- Custom config directory overrides
- Prompt and skill installers
- Direct SQLite log write blocking; recent Codex builds have retention/checkpoint behavior, so Switchboard no longer mutates Codex log databases
Build the backend:
cd backend
cargo test
cargo build --releaseBuild the frontend:
cd frontend
npm install
npm run buildValidate with the public packer:
npx --yes @haloforge/plugin-pack@0.2.13 check .Package:
npx --yes @haloforge/plugin-pack@0.2.13 pack . --releaseInstall the packaged plugin into a local HaloForge workspace with the hf CLI:
cd /path/to/HaloForge
npm run hf -- plugin install local /path/to/hf-plugin-switchboard/dist/package/dev.haloforge.switchboard-0.1.14.hfpkg --json
npm run hf -- plugin list --jsonnpm run hf -- ... is the source-checkout form. Windows installed builds add hf to PATH, so a new terminal can use hf plugin ... directly. macOS automatic PATH linking is not implemented yet; run command -v hf before assuming the global command exists.