bootstrap

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

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

func Initialize(cmd *cobra.Command) *cobra.Command

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

func RootCmd() *cobra.Command

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.

Returns:

  • *cobra.Command: The configured root command with usage and version info

Types

This section is empty.

Jump to

Keyboard shortcuts

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