Documentation
¶
Overview ¶
Package bootstrap initializes the ctx CLI application.
It provides functions to create the root command and register all subcommands. The typical usage pattern is:
cmd := bootstrap.Initialize(bootstrap.RootCmd())
if err := cmd.Execute(); err != nil {
// handle error
}
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Initialize ¶
Initialize registers all ctx subcommands with the root command.
This function attaches all available subcommands (init, status, load, add, complete, agent, drift, sync, compact, watch, hook, session, tasks, loop) to the provided root command.
Parameters:
- cmd: The root cobra command to attach subcommands to
Returns:
- *cobra.Command: The same command with all subcommands registered
func RootCmd ¶
RootCmd creates and returns the root cobra command for the ctx CLI.
The root command provides the entry point for all ctx subcommands and displays help information when invoked without arguments.
Global flags:
- --context-dir: Override the context directory path (default: .context)
- --no-color: Disable colored output
Returns:
- *cobra.Command: The configured root command with usage and version info
Types ¶
This section is empty.