Documentation
¶
Overview ¶
Package cli implements karactl, the Karakoram REST API command-line client. Credentials live in ~/.config/karakoram/config.yaml, never in command output. Context values are overridden by KARAKORAM_SERVER/KARAKORAM_TOKEN and then explicit flags. Resource create/set commands accept API-shaped YAML or JSON with -f; '-' reads stdin. Cluster patch files use {spec: {...}} merge patches.
SPDX-License-Identifier: Apache-2.0 Copyright 2026 The Karakoram Authors
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigPath ¶
ConfigPath returns the default credential file (independent of XDG overrides).
func NewCommand ¶
NewCommand constructs a fresh command tree. ExecuteContext controls waits and SSE.
func Run ¶
Run executes a fresh command and reports errors on stderr, including usage for command-line mistakes. A nil argument slice uses the process arguments.
func SaveConfig ¶
SaveConfig atomically saves credentials with owner-only permissions.
Types ¶
type Config ¶
type Config struct {
CurrentContext string `yaml:"currentContext"`
Contexts map[string]Context `yaml:"contexts"`
}
Config records the selected context and named connections.
func LoadConfig ¶
LoadConfig loads saved contexts; an absent file is an empty configuration.
Source Files
¶
- auth.go
- backup_drills.go
- commands.go
- commands_inventory.go
- completion.go
- config.go
- confirm.go
- connection.go
- control_plane.go
- dispatch.go
- dryrun.go
- elastic.go
- errors.go
- help.go
- maintenance.go
- mcp.go
- mcp_config.go
- mcp_data.go
- mysql.go
- namespaces.go
- neo4j.go
- notifications.go
- openbao.go
- output.go
- postgres.go
- rabbitmq.go
- resources.go
- root.go
- supabase.go
- temporal.go
- tokens.go
- version.go
- watch.go
- weaviate.go