cmd

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2026 License: MIT Imports: 17 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{
	Use:   "runx",
	Short: "A language-agnostic, documented command catalog and local CLI executor",
	Long: `RunX is an open-source, schema-backed CLI task runner and command catalog
executor that operates over runx.yaml manifest files.`,
	PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
		if helpTree {
			RenderHelpTree(cmd.OutOrStdout(), helpTreeDepth)
			if exitOnHelpTree {
				os.Exit(0)
			}
			return nil
		}
		if helpDocs {
			RenderHelpDocs(cmd.OutOrStdout(), cmd)
			if exitOnHelpTree {
				os.Exit(0)
			}
			return nil
		}
		return nil
	},
	Run: func(cmd *cobra.Command, args []string) {
		renderWelcome()
	},
}

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.

func RenderHelpDocs

func RenderHelpDocs(w io.Writer, cmd *cobra.Command)

RenderHelpDocs writes Markdown documentation for a Cobra command to w.

func RenderHelpTree

func RenderHelpTree(w io.Writer, maxDepth int)

RenderHelpTree writes the formatted command tree to w.

Types

type FlagNode

type FlagNode struct {
	Flag        string
	Description string
}

type PromptInfo

type PromptInfo struct {
	ID          string `json:"id"`
	Description string `json:"description"`
}

type SkillDetails

type SkillDetails struct {
	ID          string        `json:"id"`
	Path        string        `json:"path"`
	Description string        `json:"description"`
	Metadata    SkillMetadata `json:"metadata"`
}

type SkillInfo

type SkillInfo struct {
	ID          string `json:"id"`
	Description string `json:"description"`
}

type SkillMetadata

type SkillMetadata struct {
	Version string `json:"version"`
	Package string `json:"package"`
}

type TreeNode

type TreeNode struct {
	Name        string
	Description string
	Flags       []FlagNode
	Children    []*TreeNode
}

func BuildCanonicalTree

func BuildCanonicalTree() *TreeNode

BuildCanonicalTree returns the exact tree node structure matching Section 4 of the RFC.

type UninstallResult

type UninstallResult struct {
	Target      string `json:"target"`
	DryRun      bool   `json:"dry_run"`
	Uninstalled bool   `json:"uninstalled"`
}

type UpdateCheckResult

type UpdateCheckResult struct {
	CurrentVersion  string `json:"currentVersion"`
	LatestVersion   string `json:"latestVersion"`
	UpdateAvailable bool   `json:"updateAvailable"`
	URL             string `json:"url,omitempty"`
}

Jump to

Keyboard shortcuts

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