Documentation
¶
Index ¶
- func GetAmpCodeConfigPath() (string, error)
- func GetAmpConfigPath() (string, error)
- func GetDefaultClaudeDesktopConfigPath() (string, error)
- func GetDefaultProfilesPath() (string, error)
- func GetGlobalCursorMCPConfigPath() (string, error)
- func GetProfilesPath(configFile string) (string, error)
- func GetProjectCursorMCPConfigPath(projectDir string) string
- type AmpCodeConfig
- type AmpCodeEditor
- func (e *AmpCodeEditor) AddMCPServer(server types.CommonServer, overwrite bool) error
- func (e *AmpCodeEditor) DisableMCPServer(name string) error
- func (e *AmpCodeEditor) EnableMCPServer(name string) error
- func (e *AmpCodeEditor) GetConfigPath() string
- func (e *AmpCodeEditor) GetServer(name string) (types.CommonServer, bool, error)
- func (e *AmpCodeEditor) IsServerDisabled(name string) (bool, error)
- func (e *AmpCodeEditor) ListDisabledServers() ([]string, error)
- func (e *AmpCodeEditor) ListServers() (map[string]types.CommonServer, error)
- func (e *AmpCodeEditor) RemoveMCPServer(name string) error
- func (e *AmpCodeEditor) Save() error
- type AmpCodeMCPServer
- type ClaudeDesktopConfig
- type ClaudeDesktopEditor
- func (e *ClaudeDesktopEditor) AddMCPServer(server types.CommonServer, overwrite bool) error
- func (e *ClaudeDesktopEditor) AddMCPServerRaw(name string, command string, args []string, env map[string]string, ...) error
- func (e *ClaudeDesktopEditor) DisableMCPServer(name string) error
- func (e *ClaudeDesktopEditor) EnableMCPServer(name string) error
- func (e *ClaudeDesktopEditor) GetConfigPath() string
- func (e *ClaudeDesktopEditor) GetServer(name string) (types.CommonServer, bool, error)
- func (e *ClaudeDesktopEditor) IsServerDisabled(name string) (bool, error)
- func (e *ClaudeDesktopEditor) ListDisabledServers() ([]string, error)
- func (e *ClaudeDesktopEditor) ListServers() (map[string]types.CommonServer, error)
- func (e *ClaudeDesktopEditor) ListServersRaw() map[string]MCPServer
- func (e *ClaudeDesktopEditor) RemoveMCPServer(name string) error
- func (e *ClaudeDesktopEditor) Save() error
- type Config
- type ConfigEditor
- func (c *ConfigEditor) AddProfile(name, description string) error
- func (c *ConfigEditor) AddPromptDirectory(profile, path string, defaults map[string]interface{}) error
- func (c *ConfigEditor) AddPromptFile(profile, path string) error
- func (c *ConfigEditor) AddToolDirectory(profile, path string, defaults map[string]interface{}) error
- func (c *ConfigEditor) AddToolFile(profile, path string) error
- func (c *ConfigEditor) DeleteNode(parent *yaml.Node, key string) error
- func (c *ConfigEditor) DeleteProfile(name string) error
- func (c *ConfigEditor) DuplicateProfile(source, target, description string) error
- func (c *ConfigEditor) GetDefaultProfile() (string, error)
- func (c *ConfigEditor) GetProfile(name string) (*yaml.Node, error)
- func (c *ConfigEditor) GetProfiles() (map[string]string, error)
- func (c *ConfigEditor) Save() error
- func (c *ConfigEditor) SetDefaultProfile(profile string) error
- type CursorMCPConfig
- type CursorMCPEditor
- func (e *CursorMCPEditor) AddMCPServer(server types.CommonServer, overwrite bool) error
- func (e *CursorMCPEditor) AddMCPServerSSE(name string, url string, env map[string]string, overwrite bool) error
- func (e *CursorMCPEditor) AddMCPServerStdio(name string, command string, args []string, env map[string]string, ...) error
- func (e *CursorMCPEditor) DisableMCPServer(name string) error
- func (e *CursorMCPEditor) EnableMCPServer(name string) error
- func (e *CursorMCPEditor) GetConfigPath() string
- func (e *CursorMCPEditor) GetServer(name string) (types.CommonServer, bool, error)
- func (e *CursorMCPEditor) GetServerRaw(name string) (CursorMCPServer, error)
- func (e *CursorMCPEditor) IsServerDisabled(name string) (bool, error)
- func (e *CursorMCPEditor) ListDisabledServers() ([]string, error)
- func (e *CursorMCPEditor) ListServers() (map[string]types.CommonServer, error)
- func (e *CursorMCPEditor) ListServersRaw() map[string]CursorMCPServer
- func (e *CursorMCPEditor) RemoveMCPServer(name string) error
- func (e *CursorMCPEditor) Save() error
- type CursorMCPServer
- type LayerParameters
- type MCPServer
- type ParameterFilter
- type Profile
- type PromptSources
- type SourceConfig
- type ToolSources
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAmpCodeConfigPath ¶ added in v0.0.9
GetAmpCodeConfigPath returns the path for the Amp settings file in Cursor
func GetAmpConfigPath ¶ added in v0.0.13
GetAmpConfigPath returns the path for the standalone Amp settings file
func GetDefaultClaudeDesktopConfigPath ¶ added in v0.0.5
GetDefaultClaudeDesktopConfigPath returns the default path for the Claude desktop configuration file
func GetDefaultProfilesPath ¶ added in v0.0.4
GetDefaultProfilesPath returns the default path for the profiles configuration file
func GetGlobalCursorMCPConfigPath ¶ added in v0.0.9
GetGlobalCursorMCPConfigPath returns the path for the global Cursor MCP configuration file
func GetProfilesPath ¶ added in v0.0.4
GetProfilesPath returns the profiles path from either the provided path or the default location
func GetProjectCursorMCPConfigPath ¶ added in v0.0.9
GetProjectCursorMCPConfigPath returns the path for the project-specific Cursor MCP configuration file
Types ¶
type AmpCodeConfig ¶ added in v0.0.9
type AmpCodeConfig struct {
AmpMCPServers map[string]AmpCodeMCPServer `json:"amp.mcpServers"`
DisabledTools []string `json:"amp.tools.disable,omitempty"`
}
AmpCodeConfig represents the Amp configuration which contains MCP servers settings
type AmpCodeEditor ¶ added in v0.0.9
type AmpCodeEditor struct {
// contains filtered or unexported fields
}
AmpCodeEditor manages the Amp user settings configuration
func NewAmpCodeEditor ¶ added in v0.0.9
func NewAmpCodeEditor(path string) (*AmpCodeEditor, error)
NewAmpCodeEditor creates a new editor for the AmpCode configuration
func (*AmpCodeEditor) AddMCPServer ¶ added in v0.0.9
func (e *AmpCodeEditor) AddMCPServer(server types.CommonServer, overwrite bool) error
AddMCPServer adds or updates a server configuration using the CommonServer struct.
func (*AmpCodeEditor) DisableMCPServer ¶ added in v0.0.9
func (e *AmpCodeEditor) DisableMCPServer(name string) error
DisableMCPServer disables an MCP server without removing its configuration
func (*AmpCodeEditor) EnableMCPServer ¶ added in v0.0.9
func (e *AmpCodeEditor) EnableMCPServer(name string) error
EnableMCPServer enables a previously disabled MCP server
func (*AmpCodeEditor) GetConfigPath ¶ added in v0.0.9
func (e *AmpCodeEditor) GetConfigPath() string
GetConfigPath returns the path to the configuration file
func (*AmpCodeEditor) GetServer ¶ added in v0.0.9
func (e *AmpCodeEditor) GetServer(name string) (types.CommonServer, bool, error)
GetServer retrieves a specific server configuration by name as CommonServer
func (*AmpCodeEditor) IsServerDisabled ¶ added in v0.0.9
func (e *AmpCodeEditor) IsServerDisabled(name string) (bool, error)
IsServerDisabled checks if a server is disabled
func (*AmpCodeEditor) ListDisabledServers ¶ added in v0.0.9
func (e *AmpCodeEditor) ListDisabledServers() ([]string, error)
ListDisabledServers returns a list of disabled server names
func (*AmpCodeEditor) ListServers ¶ added in v0.0.9
func (e *AmpCodeEditor) ListServers() (map[string]types.CommonServer, error)
ListServers returns a map of all configured servers as CommonServer
func (*AmpCodeEditor) RemoveMCPServer ¶ added in v0.0.9
func (e *AmpCodeEditor) RemoveMCPServer(name string) error
RemoveMCPServer removes an MCP server configuration
func (*AmpCodeEditor) Save ¶ added in v0.0.9
func (e *AmpCodeEditor) Save() error
Save writes the configuration to disk
type AmpCodeMCPServer ¶ added in v0.0.9
type AmpCodeMCPServer struct {
Command string `json:"command,omitempty"`
Args []string `json:"args,omitempty"`
Env map[string]string `json:"env,omitempty"`
Disabled bool `json:"disabled,omitempty"`
}
AmpCodeMCPServer represents a server configuration for Amp
type ClaudeDesktopConfig ¶ added in v0.0.5
type ClaudeDesktopConfig struct {
MCPServers map[string]MCPServer `json:"mcpServers"`
DisabledServers map[string]MCPServer `json:"disabledServersConfig,omitempty"`
}
ClaudeDesktopConfig represents the configuration for the Claude desktop application
type ClaudeDesktopEditor ¶ added in v0.0.5
type ClaudeDesktopEditor struct {
// contains filtered or unexported fields
}
ClaudeDesktopEditor manages the Claude desktop configuration
func NewClaudeDesktopEditor ¶ added in v0.0.5
func NewClaudeDesktopEditor(path string) (*ClaudeDesktopEditor, error)
NewClaudeDesktopEditor creates a new editor for the Claude desktop configuration
func (*ClaudeDesktopEditor) AddMCPServer ¶ added in v0.0.5
func (e *ClaudeDesktopEditor) AddMCPServer(server types.CommonServer, overwrite bool) error
AddMCPServer adds or updates a server configuration using the CommonServer struct.
func (*ClaudeDesktopEditor) AddMCPServerRaw ¶ added in v0.0.9
func (e *ClaudeDesktopEditor) AddMCPServerRaw(name string, command string, args []string, env map[string]string, overwrite bool) error
AddMCPServer adds or updates an MCP server configuration DEPRECATED: Use AddMCPServer with CommonServer instead.
func (*ClaudeDesktopEditor) DisableMCPServer ¶ added in v0.0.5
func (e *ClaudeDesktopEditor) DisableMCPServer(name string) error
DisableMCPServer disables an MCP server without removing its configuration
func (*ClaudeDesktopEditor) EnableMCPServer ¶ added in v0.0.5
func (e *ClaudeDesktopEditor) EnableMCPServer(name string) error
EnableMCPServer enables a previously disabled MCP server
func (*ClaudeDesktopEditor) GetConfigPath ¶ added in v0.0.5
func (e *ClaudeDesktopEditor) GetConfigPath() string
GetConfigPath returns the path to the configuration file
func (*ClaudeDesktopEditor) GetServer ¶ added in v0.0.9
func (e *ClaudeDesktopEditor) GetServer(name string) (types.CommonServer, bool, error)
GetServer retrieves a specific server configuration by name as CommonServer.
func (*ClaudeDesktopEditor) IsServerDisabled ¶ added in v0.0.5
func (e *ClaudeDesktopEditor) IsServerDisabled(name string) (bool, error)
IsServerDisabled checks if a server is in the disabled list.
func (*ClaudeDesktopEditor) ListDisabledServers ¶ added in v0.0.5
func (e *ClaudeDesktopEditor) ListDisabledServers() ([]string, error)
ListDisabledServers returns a list of disabled server names
func (*ClaudeDesktopEditor) ListServers ¶ added in v0.0.5
func (e *ClaudeDesktopEditor) ListServers() (map[string]types.CommonServer, error)
ListServers returns a map of all configured servers (enabled and disabled) as CommonServer.
func (*ClaudeDesktopEditor) ListServersRaw ¶ added in v0.0.9
func (e *ClaudeDesktopEditor) ListServersRaw() map[string]MCPServer
ListServers returns a list of configured MCP servers DEPRECATED: Use the new ListServers which returns map[string]CommonServer.
func (*ClaudeDesktopEditor) RemoveMCPServer ¶ added in v0.0.5
func (e *ClaudeDesktopEditor) RemoveMCPServer(name string) error
RemoveMCPServer removes an MCP server configuration from both enabled and disabled lists.
func (*ClaudeDesktopEditor) Save ¶ added in v0.0.5
func (e *ClaudeDesktopEditor) Save() error
Save writes the configuration to disk
type Config ¶
type Config struct {
Version string `yaml:"version"`
DefaultProfile string `yaml:"defaultProfile"`
Profiles map[string]*Profile `yaml:"profiles"`
}
Config represents the root configuration
func LoadFromFile ¶
LoadFromFile loads a configuration from a YAML file
type ConfigEditor ¶ added in v0.0.4
type ConfigEditor struct {
// contains filtered or unexported fields
}
func NewConfigEditor ¶ added in v0.0.4
func NewConfigEditor(path string) (*ConfigEditor, error)
func (*ConfigEditor) AddProfile ¶ added in v0.0.4
func (c *ConfigEditor) AddProfile(name, description string) error
func (*ConfigEditor) AddPromptDirectory ¶ added in v0.0.9
func (c *ConfigEditor) AddPromptDirectory(profile, path string, defaults map[string]interface{}) error
AddPromptDirectory adds a prompt directory to a profile
func (*ConfigEditor) AddPromptFile ¶ added in v0.0.9
func (c *ConfigEditor) AddPromptFile(profile, path string) error
AddPromptFile adds a prompt file to a profile
func (*ConfigEditor) AddToolDirectory ¶ added in v0.0.4
func (c *ConfigEditor) AddToolDirectory(profile, path string, defaults map[string]interface{}) error
func (*ConfigEditor) AddToolFile ¶ added in v0.0.4
func (c *ConfigEditor) AddToolFile(profile, path string) error
func (*ConfigEditor) DeleteNode ¶ added in v0.0.9
func (c *ConfigEditor) DeleteNode(parent *yaml.Node, key string) error
DeleteNode removes a node from a mapping node by its key
func (*ConfigEditor) DeleteProfile ¶ added in v0.0.9
func (c *ConfigEditor) DeleteProfile(name string) error
DeleteProfile removes a profile from the configuration
func (*ConfigEditor) DuplicateProfile ¶ added in v0.0.4
func (c *ConfigEditor) DuplicateProfile(source, target, description string) error
func (*ConfigEditor) GetDefaultProfile ¶ added in v0.0.4
func (c *ConfigEditor) GetDefaultProfile() (string, error)
func (*ConfigEditor) GetProfile ¶ added in v0.0.4
func (c *ConfigEditor) GetProfile(name string) (*yaml.Node, error)
func (*ConfigEditor) GetProfiles ¶ added in v0.0.4
func (c *ConfigEditor) GetProfiles() (map[string]string, error)
func (*ConfigEditor) Save ¶ added in v0.0.4
func (c *ConfigEditor) Save() error
func (*ConfigEditor) SetDefaultProfile ¶ added in v0.0.4
func (c *ConfigEditor) SetDefaultProfile(profile string) error
type CursorMCPConfig ¶ added in v0.0.9
type CursorMCPConfig struct {
MCPServers map[string]CursorMCPServer `json:"mcpServers"`
DisabledServers map[string]CursorMCPServer `json:"disabledServersConfig,omitempty"`
}
CursorMCPConfig represents the configuration for Cursor MCP
type CursorMCPEditor ¶ added in v0.0.9
type CursorMCPEditor struct {
// contains filtered or unexported fields
}
CursorMCPEditor manages the Cursor MCP configuration
func NewCursorMCPEditor ¶ added in v0.0.9
func NewCursorMCPEditor(path string) (*CursorMCPEditor, error)
NewCursorMCPEditor creates a new editor for the Cursor MCP configuration
func (*CursorMCPEditor) AddMCPServer ¶ added in v0.0.9
func (e *CursorMCPEditor) AddMCPServer(server types.CommonServer, overwrite bool) error
AddMCPServer adds or updates a server configuration using the CommonServer struct.
func (*CursorMCPEditor) AddMCPServerSSE ¶ added in v0.0.9
func (e *CursorMCPEditor) AddMCPServerSSE(name string, url string, env map[string]string, overwrite bool) error
AddMCPServerSSE adds or updates an MCP server configuration (SSE format) DEPRECATED: Use AddMCPServer with CommonServer instead.
func (*CursorMCPEditor) AddMCPServerStdio ¶ added in v0.0.9
func (e *CursorMCPEditor) AddMCPServerStdio(name string, command string, args []string, env map[string]string, overwrite bool) error
AddMCPServer adds or updates an MCP server configuration (stdio format) DEPRECATED: Use AddMCPServer with CommonServer instead.
func (*CursorMCPEditor) DisableMCPServer ¶ added in v0.0.9
func (e *CursorMCPEditor) DisableMCPServer(name string) error
DisableMCPServer disables an MCP server without removing its configuration
func (*CursorMCPEditor) EnableMCPServer ¶ added in v0.0.9
func (e *CursorMCPEditor) EnableMCPServer(name string) error
EnableMCPServer enables a previously disabled MCP server
func (*CursorMCPEditor) GetConfigPath ¶ added in v0.0.9
func (e *CursorMCPEditor) GetConfigPath() string
GetConfigPath returns the path to the configuration file
func (*CursorMCPEditor) GetServer ¶ added in v0.0.9
func (e *CursorMCPEditor) GetServer(name string) (types.CommonServer, bool, error)
GetServer retrieves a specific server configuration by name as CommonServer.
func (*CursorMCPEditor) GetServerRaw ¶ added in v0.0.9
func (e *CursorMCPEditor) GetServerRaw(name string) (CursorMCPServer, error)
GetServer retrieves a server's configuration by name DEPRECATED: Use the new GetServer which returns CommonServer.
func (*CursorMCPEditor) IsServerDisabled ¶ added in v0.0.9
func (e *CursorMCPEditor) IsServerDisabled(name string) (bool, error)
IsServerDisabled checks if a server is in the disabled list.
func (*CursorMCPEditor) ListDisabledServers ¶ added in v0.0.9
func (e *CursorMCPEditor) ListDisabledServers() ([]string, error)
ListDisabledServers returns a list of disabled server names
func (*CursorMCPEditor) ListServers ¶ added in v0.0.9
func (e *CursorMCPEditor) ListServers() (map[string]types.CommonServer, error)
ListServers returns a map of all configured servers (enabled and disabled) as CommonServer.
func (*CursorMCPEditor) ListServersRaw ¶ added in v0.0.9
func (e *CursorMCPEditor) ListServersRaw() map[string]CursorMCPServer
ListServers returns a list of configured MCP servers DEPRECATED: Use the new ListServers which returns map[string]CommonServer.
func (*CursorMCPEditor) RemoveMCPServer ¶ added in v0.0.9
func (e *CursorMCPEditor) RemoveMCPServer(name string) error
RemoveMCPServer removes an MCP server configuration from both enabled and disabled lists.
func (*CursorMCPEditor) Save ¶ added in v0.0.9
func (e *CursorMCPEditor) Save() error
Save writes the configuration to disk
type CursorMCPServer ¶ added in v0.0.9
type CursorMCPServer struct {
// For stdio format
Command string `json:"command,omitempty"`
Args []string `json:"args,omitempty"`
Env map[string]string `json:"env,omitempty"`
// For SSE format
URL string `json:"url,omitempty"`
}
CursorMCPServer represents a server configuration for Cursor
type LayerParameters ¶
LayerParameters maps layer names to their parameter settings
type MCPServer ¶ added in v0.0.5
type MCPServer struct {
Command string `json:"command"`
Args []string `json:"args"`
Env map[string]string `json:"env,omitempty"`
}
MCPServer represents a server configuration
type ParameterFilter ¶
ParameterFilter maps layer names to lists of parameter names
type Profile ¶
type Profile struct {
Description string `yaml:"description"`
Tools *ToolSources `yaml:"tools"`
Prompts *PromptSources `yaml:"prompts"`
}
Profile represents a named configuration profile
type PromptSources ¶
type PromptSources struct {
Directories []SourceConfig `yaml:"directories,omitempty"`
Files []SourceConfig `yaml:"files,omitempty"`
Pinocchio *struct {
Command string `yaml:"command"`
Args []string `yaml:"args,omitempty"`
SourceConfig `yaml:",inline"`
} `yaml:"pinocchio,omitempty"`
}
PromptSources configures where prompts are loaded from
type SourceConfig ¶
type SourceConfig struct {
Path string `yaml:"path"`
Defaults LayerParameters `yaml:"defaults,omitempty"`
Overrides LayerParameters `yaml:"overrides,omitempty"`
Blacklist ParameterFilter `yaml:"blacklist,omitempty"`
Whitelist ParameterFilter `yaml:"whitelist,omitempty"`
}
Common source configuration for both tools and prompts
type ToolSources ¶
type ToolSources struct {
Directories []SourceConfig `yaml:"directories,omitempty"`
Files []SourceConfig `yaml:"files,omitempty"`
ExternalCommands []struct {
Command string `yaml:"command"`
Args []string `yaml:"args,omitempty"`
SourceConfig `yaml:",inline"`
} `yaml:"external_commands,omitempty"`
}
ToolSources configures where tools are loaded from