cli

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{
	Use:     "bbkt",
	Version: version.Version,
	Short:   "A unified CLI and MCP server for Bitbucket Cloud",
	Long: `bbkt is a complete command-line interface and Model Context Protocol
server for Bitbucket Cloud.

It allows you to manage workspaces, repositories, pull requests,
pipelines, and more directly from your terminal, or expose these
capabilities to your AI agents via the MCP protocol.

Try running 'bbkt auth' to get started!`,
	PersistentPreRun: func(cmd *cobra.Command, args []string) {
		if profile, _ := cmd.Flags().GetString("profile"); profile != "" {
			os.Setenv("BBKT_PROFILE", profile)
		}
	},
}

RootCmd represents the base command when called without any subcommands

Functions

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func ParseArgs

func ParseArgs(args []string, trailingArgsCount int) (workspace, repoSlug string, trailing []string, err error)

ParseArgs resolves workspace and repoSlug from the command line arguments, and returns any remaining trailing arguments. It expects either: - exact trailingArgsCount arguments (infers workspace and repoSlug from git) - trailingArgsCount + 2 arguments (explicit workspace and repoSlug provided first)

func PrintJSON

func PrintJSON(data any)

PrintJSON formats any Go struct as pretty JSON and prints to stdout.

Types

This section is empty.

Jump to

Keyboard shortcuts

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