oi’s local config file. Profiles let you switch between different OpenIndex environments — such as development and production instances — without re-entering credentials each time.
Config file location
oi resolves its config file in this order:
OPENINDEX_CONFIG— explicit path to a config fileOPENINDEX_CONFIG_DIR/config.json— if the directory env var is set<os-user-config-dir>/openindex-agent/config.json— OS default
Profile commands
list— show all saved profilesshow— display the active profile (or a named profile)set— create or update a profileuse— switch the active profile
Configuring a profile
Pass any combination of flags toprofile set:
--api-url is intentionally unsupported. Set --app-url and let oi derive the backend endpoint automatically.Resolved API URL
After runningprofile set, the output includes:
resolvedApiUrl— the backend API URL thatoiwill useapiResolutionSource— which resolution step produced that URL
oi attempts discovery from:
/.well-known/openindex.json/api/openindex/config/api/runtime-config
Profile selection order
When a command runs,oi selects the active profile in this order:
--profileflag on the commandOPENINDEX_PROFILEenvironment variablecurrent_profilein the config filedefaultprofile
API URL resolution order
oi resolves the backend API URL from these sources in order:
OPENINDEX_API_URL— temporary shell override, useful for one-off troubleshooting- App URL from
OPENINDEX_APP_URL→OPENINDEX_FRONTEND_URL→ profileapp_url http://localhost:3210— local default