cli

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2026 License: MIT Imports: 23 Imported by: 0

Documentation

Overview

Package cli implements the command-line interface for ctx.

Index

Constants

This section is empty.

Variables

View Source
var (
	// Version is set at build time.
	Version = "dev"
)

Functions

func Execute

func Execute()

Execute runs the root command.

func GetConfigManager

func GetConfigManager() (*config.Manager, error)

GetConfigManager returns the config manager, initializing it if needed.

func GetShellConfigFile

func GetShellConfigFile(shellType shell.ShellType) string

GetShellConfigFile returns the path to the shell config file.

func NewCloudClient added in v0.1.3

func NewCloudClient(mgr interface {
	GetAppConfig() *config.AppConfig
	LoadCloudAPIKey() string
}) *cloud.Client

NewCloudClient creates a cloud client from the config manager. Returns nil if cloud integration is not configured or disabled.

func NewRootCmd

func NewRootCmd() *cobra.Command

NewRootCmd creates the root command.

func OpenBrowser

func OpenBrowser(cfg *config.BrowserConfig) error

OpenBrowser opens the browser with the context's configured profile (no URL).

func OpenEditor added in v0.1.9

func OpenEditor(cfg *config.EditorConfig) error

OpenEditor opens the workspace in the configured editor.

func OpenEditorFile added in v0.1.9

func OpenEditorFile(cfg *config.EditorConfig, file string) error

OpenEditorFile opens a specific file in the configured editor.

func OpenURL

func OpenURL(cfg *config.BrowserConfig, url string) error

OpenURL opens a URL in the browser configured for the context. If no browser is configured, uses the system default browser.

Types

type SecretFilesResult added in v0.1.7

type SecretFilesResult struct {
	EnvVars   map[string]string // ENV_VAR -> temp file path
	State     *config.SecretFilesState
	FileCount int
}

SecretFilesResult holds the results of resolving secret files.

type SecretsResult

type SecretsResult struct {
	Secrets                map[string]string
	BitwardenCount         int
	OnePasswordCount       int
	VaultCount             int
	AWSSecretsManagerCount int
	AWSSSMCount            int
	GCPSecretManagerCount  int
}

SecretsResult holds resolved secrets and metadata about what was loaded.

Jump to

Keyboard shortcuts

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