~/.config/opencode/opencode.json and then authenticating with your NagaAI API key inside OpenCode.
Setup
Install OpenCode
Follow the official installation docs at https://opencode.ai/docs.You can install it with the official install script:Or install it with npm:
Create a NagaAI API key
Create an API key in the dashboard: https://naga.ac/dashboard.
If you’re new to NagaAI, follow the Quickstart first.
Add NagaAI as a custom provider
Open
~/.config/opencode/opencode.json and configure a custom provider named naga-ai:This example registers
gpt-5.4, but you can add other NagaAI models too. For agentic coding, prefer models with tools support.Connect your API key in OpenCode
Start OpenCode in your project directory:Then run:In the provider list:
- Select NagaAI
- Paste your NagaAI API key
- Save the credential
Notes
- Config file:
~/.config/opencode/opencode.json - Base URL:
https://api.naga.ac/v1 - Provider name in config:
naga-ai - Display name in OpenCode:
NagaAI - Recommended starter model:
gpt-5.4
Try it
- “Summarize this repository: structure, build system, and entry points.”
- “Find where feature X is implemented and list the relevant files.”
- “Run tests and fix the first failing test.”
- “Refactor module Y and update all call sites.”