~/.opsh/config.json under the provider key. Only the provider named in provider.selected is used at runtime — the others retain their settings so you can switch between them without re-entering credentials.
Setting your provider interactively
The easiest way to configure a provider is through the interactive editor:- Run
opsh --initin your terminal to open the setup wizard. - Type
!configinside the Opsh REPL, then choose Provider from the menu.
~/.opsh/config.json immediately.
The provider.selected field
The provider.selected field controls which provider Opsh uses. Set it to one of:
Provider config snippets
Each provider has its own sub-object insideprovider. The tabs below show the full structure and default values for each one.
- OpenRouter
- OpenAI
- Anthropic
- Gemini
- Ollama
config.json
Default base URLs
You can change
baseUrl to point to a compatible proxy or self-hosted endpoint.
API keys are stored as plain text in
~/.opsh/config.json. Restrict access to this file so other users on the system cannot read it:
