cli

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: Apache-2.0 Imports: 12 Imported by: 1 module, 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 (
	Version string = "dev"
)

Functions

func NewBacklinksCmd

func NewBacklinksCmd(deps *Deps) *cobra.Command

func NewCatCmd

func NewCatCmd(deps *Deps) *cobra.Command

NewCatCmd returns the `cat` cobra command.

Usage examples:

tap cat 0
tap cat 0 1 2
tap cat --tag "fire and not archived"
tap cat 0 --keg myalias

func NewConfigCmd

func NewConfigCmd(deps *Deps) *cobra.Command

NewConfigCmd returns the `config` cobra command.

Usage examples:

tap config
tap config --keg myalias
tap config --edit
tap config --edit --keg myalias

func NewCreateCmd

func NewCreateCmd(deps *Deps) *cobra.Command

NewCreateCmd constructs the `create` subcommand.

Usage examples:

Tap create --title "My note" --lead "one-line summary"
Tap create --title "Note" --tags tag1 --tags tag2 --attrs foo=bar --attrs x=1

func NewEditCmd

func NewEditCmd(deps *Deps) *cobra.Command

NewEditCmd returns the `edit` cobra command.

func NewGrepCmd

func NewGrepCmd(deps *Deps) *cobra.Command

func NewIndexCmd

func NewIndexCmd(deps *Deps) *cobra.Command

NewIndexCmd returns the `index` cobra command.

Usage examples:

Tap index
Tap index --alias myalias

func NewInfoCmd

func NewInfoCmd(deps *Deps) *cobra.Command

NewInfoCmd returns the `info` cobra command.

Usage examples:

tap info
tap info --keg myalias

func NewInitCmd

func NewInitCmd(deps *Deps) *cobra.Command

NewInitCmd returns the `tap repo init` cobra command.

Usage examples:

tap repo init NAME
tap repo init . --project
tap repo init blog --registry --repo knut --namespace me
tap repo init blog --project --path ./docs --title "Blog" --creator "me"

func NewListCmd

func NewListCmd(deps *Deps) *cobra.Command

func NewMetaCmd

func NewMetaCmd(deps *Deps) *cobra.Command

func NewMoveCmd

func NewMoveCmd(deps *Deps) *cobra.Command

func NewPwdCmd

func NewPwdCmd(deps *Deps) *cobra.Command

func NewRemoveCmd

func NewRemoveCmd(deps *Deps) *cobra.Command

func NewRepoCmd

func NewRepoCmd(deps *Deps) *cobra.Command

func NewRepoConfigCmd

func NewRepoConfigCmd(deps *Deps) *cobra.Command

NewRepoConfigCmd returns the `repo config` cobra command.

Usage examples:

tap repo config
tap repo config --project
tap repo config --user
tap repo config edit
tap repo config edit --project

func NewRepoConfigEditCmd

func NewRepoConfigEditCmd(deps *Deps) *cobra.Command

NewRepoConfigEditCmd returns the `repo config edit` cobra subcommand.

Usage examples:

tap repo config edit
tap repo config edit --project

func NewRepoKegListCmd

func NewRepoKegListCmd(deps *Deps) *cobra.Command

func NewRootCmd

func NewRootCmd(deps *Deps) *cobra.Command

func NewStatsCmd

func NewStatsCmd(deps *Deps) *cobra.Command

NewStatsCmd returns the `stats` cobra command.

func NewTagsCmd

func NewTagsCmd(deps *Deps) *cobra.Command

func Run

func Run(ctx context.Context, rt *toolkit.Runtime, args []string) (int, error)

func RunWithProfile

func RunWithProfile(ctx context.Context, rt *toolkit.Runtime, args []string, profile Profile) (int, error)

Types

type Deps

type Deps struct {
	Root     string
	Shutdown func()
	Runtime  *toolkit.Runtime
	Profile  Profile

	ConfigPath string
	LogFile    string
	LogLevel   string
	LogJSON    bool

	Tap *tapper.Tap
	Err error
}

type Profile

type Profile struct {
	// Use is the root command name shown in help.
	Use string

	// ForceProjectResolution makes node operations resolve only against
	// project-local kegs.
	ForceProjectResolution bool

	// AllowKegAliasFlags enables alias-based selection flags such as --keg.
	AllowKegAliasFlags bool

	// IncludeConfigCommand enables the config command tree.
	IncludeConfigCommand bool

	// IncludeRepoCommand enables the repo command tree.
	IncludeRepoCommand bool
}

Profile configures CLI behavior for a specific binary.

func KegV2Profile

func KegV2Profile() Profile

func TapProfile

func TapProfile() Profile

Jump to

Keyboard shortcuts

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