# README
cli
cli
(tentative name) is another command line parsing and commander for Go.
# Packages
No description provided by the author
No description provided by the author
No description provided by the author
Code generated by counterfeiter.
# Functions
Accessory provides an action which sets up an accessory flag for the current flag or argument.
ActionOf converts a value to an Action.
AddArg provides an action which adds an arg to the command or app.
AddArgs provides an action which adds the specified args to the command.
AddCommand provides an action which adds a sub-command to the command or app.
AddCommands provides an action which adds the specified commands to the command.
AddFlag provides an action which adds a flag to the command or app.
AddFlags provides an action which adds the specified flags to the command.
After revises the timing of the action so that it runs in the After pipeline.
Alias sets the given alias on the flag or command.
ApplyShellCompletion detects whether a dynamic shell completion request has been added to the environment and activates the corresponding supported response.
ArgCount gets the arg counter for the specified value.
Args provides a simple initializer for positional arguments.
ArgSetup action is used to apply set-up to a Arg.
At wraps an action and causes it to execute at the given timing.
AutodetectColor resets whether color output is used on stdout to use auto-detection.
Before revises the timing of the action so that it runs in the Before pipeline.
BigFloat creates a big float value.
BigInt creates a big integer value.
Bind invokes a function, either using the value specified or the value read from the flag or arg.
BindContext binds a value to a context value.
BindIndirect binds a value to the specified option indirectly.
Bool creates a bool value.
Bytes creates a slice of bytes.
Category sets the category of a command, flag, or expression.
CommandSetup action is used to apply set-up to a Command.
CompletionValues provides a static list of completion values.
ContextValue provides an action which updates the context with a value.
CurrentApp contains the current app.
Customize matches a flag, arg, or command and runs additional pipeline steps.
Data sets metadata for a command, flag, arg, or expression.
Description sets the description of a command, flag, or expression.
DirFS returns a file system for files rooted at the directory dir.
DisplayHelpScreen displays the help screen for the specified command.
Do invokes the actions with the given context.
Duration creates a time.Duration value.
Enum provides validation that a particular flag or arg value matches a given set of legal values.
EvaluatorOf creates an expression evaluator for a given value.
ExecuteSubcommand finds and executes a sub-command.
Exit formats an error message using the default formats for each of the arguments, except the last one, which is interpreted as the desired exit code.
FlagSetup action is used to apply set-up to a flag.
Float32 creates a float32 value.
Float64 creates a float64 value.
FromContext obtains the Context, which faciliates interactions with the application that is initializing or running.
FromEnv loads the flag or arg value from the given environment variable(s).
FromFilePath loads the value from the given file path.
HandleCommandNotFound assigns a default function to invoke when a command cannot be found.
HandleSignal provides an action that provides simple handling of a signal, usually os.Interrupt.
Hook registers a hook that runs for any context in the given timing.
HookAfter registers a hook that runs for the matching elements.
HookBefore registers a hook that runs for the matching elements.
IfMatch provides an action that only runs on a matching context.
ImplicitCommand indicates the command which is implicit when no sub-command matches.
Implicitly runs an action when there are zero occurrences (when an implicit value is set).
ImplicitValue sets the implicit value, which is a value specified for the arg or flag when it was not specified from the command line arguments.
Implies is used to set the implied value of another flag.
Initializer marks an action handler as being for the initialization phase.
Int creates an int value.
Int16 creates an int16 value.
Int32 creates an int32 value.
Int64 creates an int64 value.
Int8 creates an int8 value.
IP creates an IP value.
Join together the arguments, wrapping each in quotes if necessary.
List creates a string slice value.
ManualText sets the manual text of a command, flag, arg, or expression.
Map creates a map value.
Mutex validates that explicit values are used mutually exclusively.
NameValues creates a list of name-value pairs, optionally specifying the values to set.
NewApp creates an app initialized from the specified command.
NewBuffer creates a buffer which is a Writer that can be used to accumulate text into a buffer.
NewExprBinding creates an expression binding.
NewFS wraps the given FS for use as a CLI file system.
NewSysFS wraps the given FS with the semantics for the special file named with a dash.
NewWriter creates a new writer.
NoArgs provides an argument counter that takes no args.
OptionalArg provides an argument counter which matches zero or one argument using the specified function.
OptionalValue makes the flag's value optional, and when its value is not specified, the implied value is set to this value v.
ParseByteLength from a string.
PatternFilter parses a context pattern string and returns a filter which matches on it.
Pipeline combines various actions into a single action.
Predicate provides a simple predicate which filters values.
PrintLicense displays the license.
PrintVersion displays the version string.
ProvideValueInitializer causes an additional child context to be created which is used to initialize an arbitrary value.
Quote uses shell escaping rules if necessary to quote the string.
RawParse does low-level parsing that will parse from the given input arguments.
ReadPasswordString securely gets a password, without the trailing '\n'.
ReadString gets a line of text, without the trailing '\n'.
Recover wraps an action to recover from a panic.
Regexp creates a Regexp value.
RegisterTemplate will register the specified template by name.
RegisterTemplateFunc will register the specified function for use in template rendering.
RemoveArg provides an action which removes an arg from the command or app.
RemoveCommand provides an action which removes a Command from the command or app.
RemoveFlag provides an action which removes a flag from the command or app.
RenderTemplate provides an action that renders the specified template using the factory function that creates the data that is passed to the template.
Set will set the destination value if supported.
SetColor enables or disables color output on stdout.
SetCompletion sets completion for the command, flag, or arg.
SetContext provides an action which sets the context.
SetCurrentApp sets the current app directly so that tools, extensions, and plug-ins can discover which app to analyze.
SetData sets the value of a flag Value using the semantics of SetData(io.Reader), which is a convention that can be implemented by a value (see the summary on Value for information about conventions).
SetValue provides an action which sets the value of the flag or argument.
ShellCompleteIntegration provides an action which renders the particular shell complete integration.
Split splits the specified text using shell splitting rules.
SplitList considers escape sequences when splitting.
SplitMap considers escape sequences when splitting.
String creates a string value.
SuppressError wraps an action to ignore its error.
Timeout provides an action which adds a timeout to the context.
Transform defines how to interpret raw values passed to a flag or arg.
TransformFileReference obtains the transform for the given file system and whether the prefix @ is required.
Uint creates an uint value.
Uint16 creates an uint16 value.
Uint32 creates an uint32 value.
Uint64 creates an uint64 value.
Uint8 creates an uint8 value.
URL creates a URL value.
ValueTransform sets the transform that applies to the syntax of the value in NameValue, NameValues, or Map.
Wrap wraps the given text using a maximum line width and indentation.
# Constants
ActionTiming which occurs for the primary action.
AfterTiming which occurs after the command executes.
AllowFileReference allows a flag or argument to use the special syntax @file to mean that the value is obtained by loading the contents of a file rather than directly.
AnyArg filters the context for any arg.
AnyCommand filters the context for any command.
AnyFlag filters the context for any flag.
Anything matches any kind of target.
ArgsMustPrecedeExprs occurs in expression parsing for unexpected arguments.
BeforeTiming which occurs before the command executes.
ANSI terminal colors.
ANSI terminal styles.
ANSI terminal colors.
ANSI terminal styles.
ANSI terminal colors.
ANSI terminal colors.
ANSI terminal colors.
ANSI terminal colors.
ANSI terminal colors.
ANSI terminal colors.
CommandNotFound provides the error when the command is not found.
ANSI terminal styles.
ANSI terminal colors.
ANSI terminal colors.
ANSI terminal colors.
DirectoryCompletion generations a list of directories in the completion response.
Completion types.
DisableSplitting disable splitting on commas.
DisallowFlagsAfterArgs option when used on a Command prevents flags from being specified after args.
EachOccurrence causes the Action for a flag or arg to be called once for each occurrence rather than just once for the winning value.
EndOfArguments signals no more arguments taken by this arg counter.
Exits marks a flag that causes the app to exit.
ExpectedArgument occurs when a value must be specified to a positional argument or flag.
ExpectedRequiredOption occurs when a flag or option is required to be specified.
ANSI terminal styles.
FileCompletion generates a list of files in the completion response.
Completion types.
FileReference indicates that the flag or argument is a reference to a file which is loaded and whose contents provide the actual value of the flag.
FlagUsedAfterArgs occurs when a flag is used after a positional arg, but not allowed.
ANSI terminal colors.
ANSI terminal colors.
Hidden causes the option to be Hidden.
ImplicitValueTiming represents timing that happens when an implied value is being computed for an arg or flag.
ImpliedAction causes the Action for a flag or arg to be run if it was implicitly set.
InitialTiming which occurs during the Uses pipeline.
InvalidArgument error represents the value for a position argument or flag not being parsable.
ANSI terminal styles.
ANSI terminal colors.
Merge when set, indicates that rather than overwrite values set in list, there should be strategic merging.
MissingArgument means that the value is required for a flag.
MustExist indicates that when a File or Path value is used, it must represent a file or path that exists.
No introduces a mirror flag to a Boolean flag that provides the false value.
None represents no options.
NonPersistent marks a flag as being non-persistent.
Optional makes the flag's value optional.
PreventSetup is used to opt-out of any setup actions.
Raw flags used by the internal parser.
Raw flags used by the internal parser.
Raw flags used by the internal parser.
ANSI terminal colors.
Required marks a flag as required.
ANSI terminal styles.
RightToLeft causes arguments to bind right-to-left instead of left-to-right.
RootCommand filters the context to detect if the current command is the root command.
Seen filters the context to detect if the current flag or arg has been seen.
SkipFlagParsing when applied to a Command causes everything submitted to the command to be treated as if they are arguments.
Sorted causes flags and sub-commands to be sorted on the help screen generated for the command or app.
SortedCommands causes sub-commands to be sorted on the help screen generated for the command or app.
SortedFlags causes flags to be sorted on the help screen generated for the command or app.
ANSI terminal styles.
TakeExceptForFlags is the value to use for Arg.NArg to indicate that an argument can be interspersed with values that look like flags.
TakeRemaining is the value to use for Arg.NArg to indicate that an argument takes all the remaining tokens from the command line.
TakeUnlessFlag is the value to use for Arg.NArg to indicate that an argument takes the value unless it looks like a flag.
TakeUntilNextFlag is the value to use for Arg.NArg to indicate that an argument takes tokens from the command line until one looks like a flag.
Completion types.
ANSI terminal styles.
UnexpectedArgument provides the error when an unexpected argument is encountered.
UnknownExpr represents an expression name that was not recognized.
UnknownOption occurs when the option is not recognized.
ValidatorTiming represents timing that happens when values are being validated for an arg or flag.
ANSI terminal colors.
WorkingDirectory labels a flag or argument as specifying the process working directory.
ANSI terminal colors.
# Variables
ErrImplicitValueAlreadySet occurs when the value for a flag or arg is set multiple times within the implicit timing.
ErrTimingTooLate occurs when attempting to run an action in a pipeline when the pipeline is later than requested by the action.
ExitHandler defines how to handle exiting the process.
HelpTemplate provides the default help Go template that is rendered on the help screen.
LicenseTemplate specifies the Go template for what is printed when the license flag or command is used.
SkipCommand is used as a return value from WalkFunc to indicate that the command in the call is to be skipped.
VersionTemplate specifies the Go template for what is printed when the version flag or command is used.
# Structs
App provides the definition of an app, which is composed of commands, flags, and arguments.
Arg provides the representation of a positional argument.
Command represents a command with arguments, flags, and expressions.
CompletionContext provides information about the completion request.
CompletionItem defines an item displayed in the completion results.
Context provides the context in which the app, command, or flag is executing or initializing.
Expr represents an operator in an expression.
Expression provides the parsed result of the expression that can be evaluated with the given inputs.
File provides a value that can be used to represent a file path in flags or arguments.
FileSet provides a list of files and/or directories and whether the scope of the file set is recursive.
Flag represents a command line flag.
NameValue encapsulates a name-value pair.
ParseError provides the common representation of errors during parsing.
Prototype implements an action which sets up a flag, arg, or command.
Setup provides simple initialization, typically used in Uses pipeline.
Template provides a wrapper around text templates to support some additional configuration.
# Interfaces
Action represents the building block of the various actions to perform when an app, command, flag, or argument is being evaluated.
ArgCounter provides the behavior of counting.
Binding provides the representation of how a flag set is bound to values.
BindingLookup can lookup values or their raw bindings.
BindingState defines the state of the binding operation.
Completion is the shell auto-complete function for the flag, arg, or value.
ContextFilter is used to implement logic for filtering on matching contexts.
Evaluator provides the evaluation function for an expression operator.
ExitCoder is an error that knows how to convert to its exit code.
ExprBinding provides the relationship between an evaluator and the evaluation context.
No description provided by the author
FS provides a read-write file system.
Lookup provides type conversion from the various built-in types supported by the framework.
Middleware provides an action which controls how and whether the next action in the pipeline is executed.
ShellComplete provides the implementation of the shell-specific completion handler.
ValueReader is a flag Value that can read from an input reader.
Writer provides a terminal output writer which can provide access to color and styles.
# Type aliases
ActionFunc provides the basic function for an Action.
ActionPipeline represents an action composed of several steps.
BindingMap contains the occurrences of the values passed to each flag and arg.
ByteLength represents number of bytes.
Color of terminal output.
CommandsByName provides a slice that can sort on name.
CompletionFunc provide a function that can be used as a Completer.
CompletionType enumerates the supported kinds of completions.
ContextFilterFunc provides a predicate function which detects whether the context applies.
ContextPath provides a list of strings that name each one of the parent components in the context.
ErrorCode provides common error codes in the CLI framework.
EvaluatorFunc provides the basic function for an Evaluator.
ExprsByName is a sortable slice for exprs.
FeatureMap provides a map from a feature identifier to an action.
FilterModes enumerates common context filters.
FlagsByName is a sortable slice for flags.
Hex represents an integer that parses from the hex syntax.
LookupValues provides a Lookup backed by a map.
Octal represents an integer that parses from the octal syntax.
Option provides a built-in convenience configuration for flags, args, and commands.
RawParseFlag enumerates rules for RawParse.
StandardCompletion enumerates standard completion results.
Style of terminal output.
Timing enumerates the timing of an action.
TransformFunc implements a transformation from raw occurrences, which customizes the behavior of parsing.
ValidatorFunc defines an Action that applies a validation rule to the explicit raw occurrence values for a flag or argument.
Value provides the interface for custom handling of arg and flag values.
WalkFunc provides the callback for the Walk function.
Yielder provides the signature of the function used to yield values to the expression pipeline.