cmd

package
v0.19.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2025 License: Apache-2.0 Imports: 41 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(ctx context.Context) error

func InstallMCPForClient added in v0.19.1

func InstallMCPForClient(opts InstallOptions) error

InstallMCPForClient installs an MCP server configuration for the specified client. This is a generic, configurable function exported for use by external projects via pkg/mcpinstall. Required options: ServerName, Command, Args must all be provided.

Types

type ArgsLenAtDashProvider

type ArgsLenAtDashProvider interface {
	ArgsLenAtDash() int
}

ArgsLenAtDashProvider defines the interface for getting ArgsLenAtDash

type ClientInfo added in v0.19.1

type ClientInfo struct {
	// Name is the human-readable display name (e.g., "Claude Code", "Cursor")
	Name string
	// ClientName is the identifier to use in InstallOptions.ClientName (e.g., "claude-code", "cursor")
	ClientName string
}

ClientInfo contains information about a supported MCP client.

func SupportedClients added in v0.19.1

func SupportedClients() []ClientInfo

SupportedClients returns information about all supported MCP clients.

type ClientOption added in v0.4.0

type ClientOption struct {
	Name       string // Display name
	ClientName string // Client name to pass to installMCPForClient
}

ClientOption represents a client choice for interactive selection

type CreatePATRecordData

type CreatePATRecordData struct {
	CreatePATRecord PATRecordResponse `json:"createPATRecord"`
}

CreatePATRecordData represents the data from the createPATRecord mutation

type CreateRoleResult added in v0.14.0

type CreateRoleResult struct {
	RoleName         string   `json:"role_name"`
	ReadOnly         bool     `json:"read_only,omitempty"`
	StatementTimeout string   `json:"statement_timeout,omitempty"`
	FromRoles        []string `json:"from_roles,omitempty"`
}

CreateRoleResult represents the output of a create role operation

type GetAllProjectsData

type GetAllProjectsData struct {
	GetAllProjects []Project `json:"getAllProjects"`
}

GetAllProjectsData represents the data from the getAllProjects query

type GetUserData

type GetUserData struct {
	GetUser User `json:"getUser"`
}

GetUserData represents the data from the getUser query

type GraphQLClient

type GraphQLClient struct {
	URL string
}

We currently use a few GraphQL endpoints as part of the OAuth login flow, because they were already available and they accept the OAuth access token for authentication (whereas savannah-public only accepts the client credentials/API Key).

type GraphQLError

type GraphQLError struct {
	Message string `json:"message"`
}

GraphQLError represents an error returned in a GraphQL response

type GraphQLResponse

type GraphQLResponse[T any] struct {
	Data   *T             `json:"data"`
	Errors []GraphQLError `json:"errors,omitempty"`
}

GraphQLResponse represents a generic GraphQL response wrapper

type InstallOptions added in v0.19.1

type InstallOptions struct {
	// ClientName is the name of the client to configure (required)
	ClientName string
	// ServerName is the name to register the MCP server as (required)
	ServerName string
	// Command is the path to the MCP server binary (required)
	Command string
	// Args are the arguments to pass to the MCP server binary (required)
	Args []string
	// CreateBackup creates a backup of existing config files before modification
	CreateBackup bool
	// CustomConfigPath overrides the default config file location
	CustomConfigPath string
}

InstallOptions configures the MCP server installation behavior

type MCPClient added in v0.4.0

type MCPClient string

MCPClient represents our internal client types

const (
	ClaudeCode  MCPClient = "claude-code"
	Cursor      MCPClient = "cursor" // Both the IDE and the CLI
	Windsurf    MCPClient = "windsurf"
	Codex       MCPClient = "codex"
	Gemini      MCPClient = "gemini"
	VSCode      MCPClient = "vscode"
	Antigravity MCPClient = "antigravity"
	KiroCLI     MCPClient = "kiro-cli"
)

type MCPServerConfig added in v0.19.1

type MCPServerConfig struct {
	Command string   `json:"command"`
	Args    []string `json:"args"`
}

MCPServerConfig represents the MCP server configuration

type OutputService added in v0.5.0

type OutputService struct {
	api.Service
	common.ConnectionDetails
	ConnectionString string `json:"connection_string,omitempty"`
	ConsoleURL       string `json:"console_url,omitempty"`
}

OutputService represents a service with computed fields for output

type PATRecordResponse

type PATRecordResponse struct {
	ClientCredentials struct {
		AccessKey string `json:"accessKey"`
		SecretKey string `json:"secretKey"`
	} `json:"clientCredentials"`
}

PATRecordResponse represents the response from creating a PAT record

type Project

type Project struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

Project represents a project from the GraphQL API

type User

type User struct {
	ID    string `json:"id"`
	Name  string `json:"name"`
	Email string `json:"email"`
}

User represents a user from the GraphQL API

type VersionOutput added in v0.10.0

type VersionOutput struct {
	Version         string `json:"version"`
	BuildTime       string `json:"build_time"`
	GitCommit       string `json:"git_commit"`
	GoVersion       string `json:"go_version"`
	Platform        string `json:"platform"`
	LatestVersion   string `json:"latest_version,omitempty"`
	UpdateAvailable *bool  `json:"update_available,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL