Documentation
¶
Index ¶
- Variables
- func NewArchiveCmd(deps *Deps) *cobra.Command
- func NewArchiveExportCmd(deps *Deps) *cobra.Command
- func NewArchiveImportCmd(deps *Deps) *cobra.Command
- func NewBacklinksCmd(deps *Deps) *cobra.Command
- func NewCatCmd(deps *Deps) *cobra.Command
- func NewConfigCmd(deps *Deps) *cobra.Command
- func NewConfigEditCmd(deps *Deps) *cobra.Command
- func NewCreateCmd(deps *Deps) *cobra.Command
- func NewDocsCmd(deps *Deps) *cobra.Command
- func NewDoctorCmd(deps *Deps) *cobra.Command
- func NewEditCmd(deps *Deps) *cobra.Command
- func NewFileCmd(deps *Deps) *cobra.Command
- func NewGraphCmd(deps *Deps) *cobra.Command
- func NewGrepCmd(deps *Deps) *cobra.Command
- func NewImageCmd(deps *Deps) *cobra.Command
- func NewImportCmd(deps *Deps) *cobra.Command
- func NewIndexCmd(deps *Deps) *cobra.Command
- func NewInfoCmd(deps *Deps) *cobra.Command
- func NewInitCmd(deps *Deps) *cobra.Command
- func NewLinksCmd(deps *Deps) *cobra.Command
- func NewListCmd(deps *Deps) *cobra.Command
- func NewLockCmd(deps *Deps) *cobra.Command
- func NewMcpCmd(deps *Deps) *cobra.Command
- func NewMetaCmd(deps *Deps) *cobra.Command
- func NewMoveCmd(deps *Deps) *cobra.Command
- func NewPwdCmd(deps *Deps) *cobra.Command
- func NewRemoveCmd(deps *Deps) *cobra.Command
- func NewRepoCmd(deps *Deps) *cobra.Command
- func NewRepoConfigCmd(deps *Deps) *cobra.Command
- func NewRepoConfigEditCmd(deps *Deps) *cobra.Command
- func NewRepoConfigTemplateCmd(deps *Deps) *cobra.Command
- func NewRepoKegListCmd(deps *Deps) *cobra.Command
- func NewRepoRmCmd(deps *Deps) *cobra.Command
- func NewRootCmd(deps *Deps) *cobra.Command
- func NewSiteCmd(deps *Deps) *cobra.Command
- func NewSnapshotCmd(deps *Deps) *cobra.Command
- func NewSnapshotCreateCmd(deps *Deps) *cobra.Command
- func NewSnapshotHistoryCmd(deps *Deps) *cobra.Command
- func NewSnapshotRestoreCmd(deps *Deps) *cobra.Command
- func NewStatsCmd(deps *Deps) *cobra.Command
- func NewTagsCmd(deps *Deps) *cobra.Command
- func NewVersionCmd(deps *Deps) *cobra.Command
- func Run(ctx context.Context, rt *toolkit.Runtime, args []string) (int, error)
- func RunCompletion(ctx context.Context, rt *toolkit.Runtime, args []string) (int, error)
- func RunCompletionWithProfile(ctx context.Context, rt *toolkit.Runtime, args []string, profile Profile) (int, error)
- func RunWithProfile(ctx context.Context, rt *toolkit.Runtime, args []string, profile Profile) (int, error)
- type Deps
- type Profile
- type UserMessager
Constants ¶
This section is empty.
Variables ¶
var ( Version string = "dev" LicenseText string )
Functions ¶
func NewArchiveCmd ¶ added in v0.4.0
func NewArchiveExportCmd ¶ added in v0.4.0
func NewArchiveImportCmd ¶ added in v0.4.0
func NewBacklinksCmd ¶
func NewCatCmd ¶
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 ¶
NewConfigCmd returns the `config` cobra command.
Usage examples:
tap config tap config --keg myalias tap config edit tap config edit --keg myalias
func NewConfigEditCmd ¶ added in v0.4.0
NewConfigEditCmd returns the `config edit` cobra subcommand.
Usage examples:
tap config edit tap config edit --keg myalias
func NewCreateCmd ¶
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 NewDocsCmd ¶ added in v0.5.0
func NewDoctorCmd ¶ added in v0.5.0
func NewEditCmd ¶
NewEditCmd returns the `edit` cobra command.
func NewFileCmd ¶ added in v0.2.0
func NewGraphCmd ¶ added in v0.4.0
NewGraphCmd returns the `graph` cobra command.
Usage examples:
tap graph tap graph --keg pub --output graph.html
func NewGrepCmd ¶
func NewImageCmd ¶ added in v0.2.0
func NewImportCmd ¶ added in v0.4.0
func NewIndexCmd ¶
NewIndexCmd returns the `index` cobra command group.
Usage examples:
tap index list tap index get changes.md tap index get -k work nodes.tsv tap index rebuild
func NewInfoCmd ¶
NewInfoCmd returns the `info` cobra command.
Usage examples:
tap info tap info --keg myalias
func NewInitCmd ¶
NewInitCmd returns the `tap repo init` cobra command.
Usage examples:
tap repo init --keg blog tap repo init --project tap repo init --keg blog --cwd tap repo init --keg blog --registry --repo knut --namespace me tap repo init --keg blog --path ./kegs/blog --title "Blog" --creator "me"
func NewLinksCmd ¶ added in v0.5.0
func NewListCmd ¶
func NewLockCmd ¶ added in v0.11.0
func NewMetaCmd ¶
func NewMoveCmd ¶
func NewRemoveCmd ¶
func NewRepoCmd ¶
func NewRepoConfigCmd ¶
NewRepoConfigCmd returns the `repo config` cobra command.
Usage examples:
tap repo config tap repo config --project tap repo config --user tap repo config --explain defaultKeg tap repo config --show-sources tap repo config template user tap repo config template project tap repo config edit tap repo config edit --project
func NewRepoConfigEditCmd ¶
NewRepoConfigEditCmd returns the `repo config edit` cobra subcommand.
Usage examples:
tap repo config edit tap repo config edit --project
func NewRepoConfigTemplateCmd ¶ added in v0.4.0
NewRepoConfigTemplateCmd returns the `repo config template` cobra subcommand.
func NewRepoKegListCmd ¶
func NewRepoRmCmd ¶ added in v0.4.0
func NewRootCmd ¶
func NewSiteCmd ¶ added in v0.11.0
NewSiteCmd returns the `site` parent cobra command with `build` and `serve` subcommands.
Usage examples:
tap site build tap site build --output ./public tap site build --keg dev --title "Dev KEG" --base-url https://keg.example.com tap site build --no-search tap site serve tap site serve --port 8080 tap site serve --keg dev --host 0.0.0.0
func NewSnapshotCmd ¶ added in v0.4.0
func NewSnapshotCreateCmd ¶ added in v0.4.0
func NewSnapshotHistoryCmd ¶ added in v0.4.0
func NewSnapshotRestoreCmd ¶ added in v0.4.0
func NewStatsCmd ¶
NewStatsCmd returns the `stats` cobra command.
func NewTagsCmd ¶
func NewVersionCmd ¶ added in v0.9.0
func RunCompletion ¶ added in v0.4.0
func RunCompletionWithProfile ¶ added in v0.4.0
Types ¶
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 KegProfile ¶ added in v0.8.0
func KegProfile() Profile
func KegV2Profile
deprecated
func KegV2Profile() Profile
KegV2Profile is an alias for KegProfile, kept for backward compatibility.
Deprecated: Use KegProfile instead.
func TapProfile ¶
func TapProfile() Profile
type UserMessager ¶ added in v0.13.0
UserMessager is implemented by error types that can produce a user-facing message tailored to the current CLI context (e.g. log level). New error types should implement this interface instead of adding branches to renderUserError.
Source Files
¶
- assets.go
- cli.go
- cmd_archive.go
- cmd_backlinks.go
- cmd_cat.go
- cmd_config.go
- cmd_config_edit.go
- cmd_create.go
- cmd_dir.go
- cmd_docs.go
- cmd_doctor.go
- cmd_edit.go
- cmd_file.go
- cmd_graph.go
- cmd_grep.go
- cmd_image.go
- cmd_import.go
- cmd_index.go
- cmd_info.go
- cmd_links.go
- cmd_list.go
- cmd_lock.go
- cmd_mcp.go
- cmd_meta.go
- cmd_mv.go
- cmd_repo.go
- cmd_repo_config.go
- cmd_repo_config_edit.go
- cmd_repo_config_template.go
- cmd_repo_init.go
- cmd_repo_rm.go
- cmd_rm.go
- cmd_root.go
- cmd_site.go
- cmd_snapshot.go
- cmd_stats.go
- cmd_tags.go
- cmd_version.go
- constants.go
- error_render.go
- keg_target_flags.go
- multi_handler.go
- profile.go