Skip to content

Commit 4469b07

Browse files
committed
fix: OpenCode config path
1 parent 7f7d609 commit 4469b07

3 files changed

Lines changed: 11 additions & 3 deletions

File tree

src/agents.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,14 @@ describe("getAgentConfigs", () => {
5353
expect(claude).toBeDefined();
5454
expect(claude!.configPath).toBe(join(homedir(), ".claude", "settings.json"));
5555
});
56+
57+
test("opencode config path is correct", () => {
58+
const configs = getAgentConfigs();
59+
const opencode = configs.find((c) => c.name === "opencode");
60+
61+
expect(opencode).toBeDefined();
62+
expect(opencode!.configPath).toBe(join(homedir(), ".config", "opencode", "opencode.json"));
63+
});
5664
});
5765

5866
describe("getMcpServerConfig", () => {

src/agents.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ export function getAgentConfigs(): AgentConfig[] {
2626
{
2727
name: "opencode",
2828
displayName: "OpenCode",
29-
configPath: join(home, ".opencode", "mcp.json"),
29+
configPath: join(home, ".config", "opencode", "opencode.json"),
3030
projectConfigPath: join(cwd, "opencode.json"),
31-
detected: existsSync(join(home, ".opencode")),
31+
detected: existsSync(join(home, ".config", "opencode")),
3232
},
3333
{
3434
name: "windsurf",

src/commands/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export function configCommand() {
2121
`${chalk.cyan("Claude Desktop:")} ~/Library/Application Support/Claude/claude_desktop_config.json`,
2222
`${chalk.cyan("VS Code:")} ~/.vscode/mcp.json`,
2323
`${chalk.cyan("Windsurf:")} ~/.windsurf/mcp.json`,
24-
`${chalk.cyan("OpenCode:")} ~/.opencode/mcp.json`,
24+
`${chalk.cyan("OpenCode:")} ~/.config/opencode/opencode.json`,
2525
];
2626

2727
p.note(locations.join("\n"), "Config File Locations");

0 commit comments

Comments
 (0)