You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Dan Buch 70e1ed4c9d
Attempt to work around materialx yaml loader boom
2 years ago
.github Attempt to work around materialx yaml loader boom 2 years ago
altsrc Drop extra if condition 2 years ago
autocomplete Added manual and script for PowerShell autocomplete 4 years ago
docs Merge remote-tracking branch 'origin/main' into saschagrunert-suggestions 2 years ago
internal Generate RequiredFlag and VisibleFlag implementations 2 years ago
testdata A few follow-up conflict resolutions 2 years ago
.flake8 Allow slightly longer lines in Python scripts 7 years ago
.gitignore Touching up more mkdocs details 2 years ago
CODE_OF_CONDUCT.md Merge master @1.22.1 with v2 5 years ago
LICENSE Cleaning up some release-related metadata 2 years ago
Makefile Backing out build tag for suggestions per recommendation 2 years ago
README.md Backing out build tag for suggestions per recommendation 2 years ago
app.go A few follow-up conflict resolutions 2 years ago
app_test.go Merge branch 'ally_fix_multi_val' of ssh://github.com/vipally/cli into vipally-ally_fix_multi_val 2 years ago
args.go add is set method to flag interface - refer #294 5 years ago
category.go amend comments 4 years ago
cli.go Generate flag types (again?) 2 years ago
command.go A few follow-up conflict resolutions 2 years ago
command_test.go Unshadow `context` package 2 years ago
context.go Unshadow `context` package 2 years ago
context_test.go fix: Nil pointer when getting context's flagSet(#1325) (#1327) 2 years ago
docs.go Backing out build tag for suggestions per recommendation 2 years ago
docs_test.go Backing out build tag for suggestions per recommendation 2 years ago
errors.go Cleanup context.go 3 years ago
errors_test.go Update docs and tests around cli.Exit 4 years ago
fish.go Exclude hidden sub-command flags from docs 2 years ago
fish_test.go Move some test helpers from docs_test to fish_test 2 years ago
flag-spec.yaml Generate flag types (again?) 2 years ago
flag.go Generate flag types (again?) 2 years ago
flag_bool.go Generate RequiredFlag and VisibleFlag implementations 2 years ago
flag_duration.go Generate RequiredFlag and VisibleFlag implementations 2 years ago
flag_float64.go Generate RequiredFlag and VisibleFlag implementations 2 years ago
flag_float64_slice.go Generate RequiredFlag and VisibleFlag implementations 2 years ago
flag_generic.go Generate RequiredFlag and VisibleFlag implementations 2 years ago
flag_int.go Generate RequiredFlag and VisibleFlag implementations 2 years ago
flag_int64.go Generate RequiredFlag and VisibleFlag implementations 2 years ago
flag_int64_slice.go Generate RequiredFlag and VisibleFlag implementations 2 years ago
flag_int_slice.go Generate RequiredFlag and VisibleFlag implementations 2 years ago
flag_path.go Generate RequiredFlag and VisibleFlag implementations 2 years ago
flag_string.go Generate RequiredFlag and VisibleFlag implementations 2 years ago
flag_string_slice.go Generate RequiredFlag and VisibleFlag implementations 2 years ago
flag_test.go Merge branch 'main' into feature/1316-simplified_flag_value_access 2 years ago
flag_timestamp.go Generate RequiredFlag and VisibleFlag implementations 2 years ago
flag_uint.go Generate RequiredFlag and VisibleFlag implementations 2 years ago
flag_uint64.go Generate RequiredFlag and VisibleFlag implementations 2 years ago
funcs.go Unshadow `context` package 2 years ago
go.mod Guard suggestion capability (+ dependency) with build tag 2 years ago
go.sum Guard suggestion capability (+ dependency) with build tag 2 years ago
godoc-current.txt A few follow-up conflict resolutions 2 years ago
help.go Merge branch 'suggestions' of ssh://github.com/saschagrunert/cli into saschagrunert-suggestions 2 years ago
help_test.go Writing tests around changes from #1186 2 years ago
helpers_test.go Add Destination field to TimestampFlag 3 years ago
mkdocs-requirements.txt Attempt to work around materialx yaml loader boom 2 years ago
mkdocs.yml Use correctly spelled repo name in mkdocs config 2 years ago
parse.go Rebase from master 2 years ago
sort.go Merge master @1.22.1 with v2 5 years ago
sort_test.go Merge master @1.22.1 with v2 5 years ago
suggestions.go Backing out build tag for suggestions per recommendation 2 years ago
suggestions_test.go Backing out build tag for suggestions per recommendation 2 years ago
template.go Remove extraneous line from generated markdown (#1311) 3 years ago
zz_generated.flags.go Generate RequiredFlag and VisibleFlag implementations 2 years ago
zz_generated.flags_test.go Generate RequiredFlag and VisibleFlag implementations 2 years ago

README.md

cli

GoDoc codebeat Go Report Card codecov

cli is a simple, fast, and fun package for building command line apps in Go. The goal is to enable developers to write fast and distributable command line applications in an expressive way.

Usage Documentation

Usage documentation exists for each major version. Don't know what version you're on? You're probably using the version from the main branch, which is currently v2.

Guides for migrating to newer versions:

Installation

Using this package requires a working Go environment. See the install instructions for Go.

Go Modules are required when using this package. See the go blog guide on using Go Modules.

Using v2 releases

$ go get github.com/urfave/cli/v2
...
import (
  "github.com/urfave/cli/v2" // imports as package "cli"
)
...

Using v1 releases

$ go get github.com/urfave/cli
...
import (
  "github.com/urfave/cli"
)
...

Build tags

You can use the following build tags:

urfave_cli_no_docs

When set, this removes ToMarkdown and ToMan methods, so your application won't be able to call those. This reduces the resulting binary size by about 300-400 KB (measured using Go 1.18.1 on Linux/amd64), due to fewer dependencies.

GOPATH

Make sure your PATH includes the $GOPATH/bin directory so your commands can be easily used:

export PATH=$PATH:$GOPATH/bin

Supported platforms

cli is tested against multiple versions of Go on Linux, and against the latest released version of Go on OS X and Windows. This project uses Github Actions for builds. To see our currently supported go versions and platforms, look at the ./.github/workflows/cli.yml.

License

See LICENSE