cmd

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2025 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExitSuccess             = 0 // Success
	ExitGeneralError        = 1 // General error
	ExitTimeout             = 2 // Operation timeout (wait-timeout exceeded) or connection timeout
	ExitInvalidParameters   = 3 // Invalid parameters
	ExitAuthenticationError = 4 // Authentication error
	ExitPermissionDenied    = 5 // Permission denied
	ExitServiceNotFound     = 6 // Service not found
	ExitUpdateAvailable     = 7 // Update available
)

Exit codes as defined in the CLI specification

Variables

This section is empty.

Functions

func Execute

func Execute(ctx context.Context) error

Types

type ArgsLenAtDashProvider

type ArgsLenAtDashProvider interface {
	ArgsLenAtDash() int
}

ArgsLenAtDashProvider defines the interface for getting ArgsLenAtDash

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" yaml:"role_name"`
	ReadOnly         bool     `json:"read_only,omitempty" yaml:"read_only,omitempty"`
	StatementTimeout string   `json:"statement_timeout,omitempty" yaml:"statement_timeout,omitempty"`
	FromRoles        []string `json:"from_roles,omitempty" yaml:"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 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"
)

type OutputService added in v0.5.0

type OutputService struct {
	api.Service
	password.ConnectionDetails
	ConnectionString string `json:"connection_string,omitempty" yaml:"connection_string,omitempty"`
	ConsoleURL       string `json:"console_url,omitempty" yaml:"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 Spinner added in v0.10.1

type Spinner interface {
	// Update changes the spinner's displayed message.
	Update(message string, args ...any)

	// Stop terminates the spinner program and waits for it to finish.
	Stop()
}

func NewSpinner added in v0.10.1

func NewSpinner(output io.Writer, message string, args ...any) Spinner

NewSpinner creates and returns a new Spinner for displaying animated status messages. If output is a terminal, it uses bubbletea to dynamically update the spinner and message in place. If output is not a terminal, it prints each message on a new line without animation. The message parameter supports fmt.Sprintf-style formatting with optional args.

type TigerMCPServer added in v0.4.0

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

TigerMCPServer represents the Tiger MCP server configuration

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" yaml:"version"`
	BuildTime       string `json:"build_time" yaml:"build_time"`
	GitCommit       string `json:"git_commit" yaml:"git_commit"`
	GoVersion       string `json:"go_version" yaml:"go_version"`
	Platform        string `json:"platform" yaml:"platform"`
	LatestVersion   string `json:"latest_version,omitempty" yaml:"latest_version,omitempty"`
	UpdateAvailable *bool  `json:"update_available,omitempty" yaml:"update_available,omitempty"`
}

Jump to

Keyboard shortcuts

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