-
Install Node.js LTS from https://nodejs.org/
-
Open PowerShell.
-
Install OpenCode:
npm install -g opencode-ai- Create the OpenCode config:
New-Item -ItemType Directory -Force "$env:USERPROFILE\.config\opencode" | Out-Null
@'
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["bharatcode"]
}
'@ | Set-Content -Encoding UTF8 "$env:USERPROFILE\.config\opencode\opencode.json"- Start OpenCode:
opencode- Inside OpenCode, type:
/connect
-
Choose
Other. -
When it asks for provider id, type:
bharatcode
-
Paste your BharatCode API key.
-
Test it:
Return only the integer result of 23*19.
The answer should be:
437
- To use it in a project:
cd path\to\your\repo
opencode-
Install Node.js LTS from https://nodejs.org/
-
Install OpenCode:
npm install -g opencode-ai- Create the OpenCode config:
mkdir -p ~/.config/opencode
cat > ~/.config/opencode/opencode.json <<'JSON'
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["bharatcode"]
}
JSON- Start OpenCode:
opencode-
Inside OpenCode, run
/connect, chooseOther, enter provider idbharatcode, and paste your BharatCode API key. -
Test it:
Return only the integer result of 23*19.