Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion docs/providers/cline.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,18 @@
| Scope | Path |
|---------|------|
| Project | — |
| Global | `~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json` |
| Global | See OS-specific paths below |

Project-level config is not supported.

### OS-specific global config paths

| OS | Path |
|---------|------|
| macOS | `~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json` |
| Linux | `~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json` |
| Windows | `%APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json` |

## Format

```json
Expand Down
7 changes: 5 additions & 2 deletions internal/providers/cline.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package providers

import (
"path/filepath"

"github.com/pantheon-org/iris/internal/io"
"github.com/pantheon-org/iris/internal/types"
)
Expand All @@ -10,8 +12,9 @@ type ClineProvider struct {
}

func clineConfigPath() string {
return io.UserHomePath(
"Library", "Application Support", "Code", "User", "globalStorage",
return filepath.Join(
io.UserConfigDir(),
"Code", "User", "globalStorage",
"saoudrizwan.claude-dev", "settings", "cline_mcp_settings.json",
)
}
Expand Down
16 changes: 16 additions & 0 deletions internal/providers/cline_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,27 @@ package providers_test
import (
"os"
"path/filepath"
"strings"
"testing"

"github.com/pantheon-org/iris/internal/providers"
)

func TestClineProvider_DefaultPath_RootedAtUserConfigDir(t *testing.T) {
configDir, err := os.UserConfigDir()
if err != nil {
t.Skip("os.UserConfigDir() unavailable:", err)
}
p := providers.NewClineProvider()
got := p.ConfigFilePath("")
if !strings.HasPrefix(got, configDir) {
t.Errorf("default path %q does not start with UserConfigDir %q", got, configDir)
}
if !strings.HasSuffix(got, "cline_mcp_settings.json") {
t.Errorf("default path %q does not end with cline_mcp_settings.json", got)
}
}

func TestClineProvider_Config(t *testing.T) {
tmp := t.TempDir()
p := providers.NewClineProviderWithPath(filepath.Join(tmp, "cline_mcp_settings.json"))
Expand Down
Loading