Documentation
¶
Overview ¶
Package config provides configuration loading for g. This file was modified from the original Gemini CLI. Copyright 2025 Google LLC Copyright 2025 Tomohiro Owada SPDX-License-Identifier: Apache-2.0
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SaveCachedState ¶
func SaveCachedState(state *CachedState) error
SaveCachedState saves the cached state to gmn_state.json
Types ¶
type AuthConfig ¶
type AuthConfig struct {
SelectedType string `json:"selectedType"`
}
AuthConfig holds authentication settings
type CachedState ¶
type CachedState struct {
ProjectID string `json:"projectId,omitempty"`
UserTier string `json:"userTier,omitempty"`
}
CachedState represents cached state for geminimini
func LoadCachedState ¶
func LoadCachedState() (*CachedState, error)
LoadCachedState loads the cached state from gmn_state.json
type Config ¶
type Config struct {
Security SecurityConfig `json:"security"`
MCPServers map[string]MCPServerConfig `json:"mcpServers"`
General GeneralConfig `json:"general"`
Output OutputConfig `json:"output"`
}
Config is the main configuration structure
type GeneralConfig ¶
type GeneralConfig struct {
PreviewFeatures bool `json:"previewFeatures"`
}
GeneralConfig holds general settings
type MCPServerConfig ¶
type MCPServerConfig struct {
// Stdio transport
Command string `json:"command,omitempty"`
Args []string `json:"args,omitempty"`
Env map[string]string `json:"env,omitempty"`
CWD string `json:"cwd,omitempty"`
// HTTP/SSE transport
URL string `json:"url,omitempty"`
Type string `json:"type,omitempty"` // "sse" | "http"
Headers map[string]string `json:"headers,omitempty"`
// Common
Timeout int `json:"timeout,omitempty"`
Trust bool `json:"trust,omitempty"`
IncludeTools []string `json:"includeTools,omitempty"`
ExcludeTools []string `json:"excludeTools,omitempty"`
}
MCPServerConfig holds MCP server configuration
type OutputConfig ¶
type OutputConfig struct {
Format string `json:"format"`
}
OutputConfig holds output settings
type SecurityConfig ¶
type SecurityConfig struct {
Auth AuthConfig `json:"auth"`
}
SecurityConfig holds security-related settings
Click to show internal directories.
Click to hide internal directories.