Documentation
¶
Overview ¶
Package cmd implements the vortex command-line interface (build plan M1.3), built on spf13/cobra. The root command owns the global persistent flags (--config, --log-level, --json) and initialises the structured logger in its PersistentPreRunE so every subcommand has a ready logger before it runs.
Subcommands (start, stop, status, reload, version) are added one at a time in their own files. With no subcommand, the root command boots VORTEX: it loads and validates the config, starts the management API, wires SIGHUP hot-reload, and blocks until a shutdown signal.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Execute ¶
func Execute()
Execute runs the root command and exits the process with an appropriate code.
func NewRootCommand ¶
NewRootCommand constructs the root cobra command with global flags wired up. It is exported so tests can build an isolated command tree.
Types ¶
type AIProviderConfig ¶ added in v0.2.0
type AIProviderConfig struct {
Provider string `json:"provider"`
APIKeyEnc string `json:"api_key"` // base64(nonce || chacha20(key))
Model string `json:"model"`
Endpoint string `json:"endpoint"`
ConfiguredAt string `json:"configured_at"`
// Optional messaging (Telegram) set up during the wizard.
TelegramToken string `json:"telegram_token,omitempty"`
TelegramChatID string `json:"telegram_chat_id,omitempty"`
// EditorMode selects the TUI editor: "standard" (default) or "vim" (M20).
EditorMode string `json:"editor_mode,omitempty"`
}
AIProviderConfig is the persisted first-run AI provider selection. The API key is stored encrypted (see encryptKey/decryptKey).