Go to file
2022-04-19 16:45:20 -04:00
.github Bump Go version range in CI to 1.15-1.17 (#1323) 2022-01-24 08:59:04 +01:00
altsrc Update altsrc/map_input_source.go 2020-10-22 10:00:45 +03:00
autocomplete Added manual and script for PowerShell autocomplete 2020-05-18 11:19:00 +08:00
docs Merge branch 'master' into suggestions 2022-04-19 16:45:20 -04:00
internal Bump yaml.v2 version to 2.2.8 (#1326) 2022-01-24 23:51:18 -05:00
testdata Bump github.com/cpuguy83/go-md2man/v2 to v2.0.1 (#1321) 2022-01-03 22:46:55 -05:00
.flake8 Allow slightly longer lines in Python scripts 2017-02-14 21:17:32 -08:00
.gitignore bug fix #1235 : default value changes with parsed values on slice flags 2021-02-05 15:16:50 +08:00
app_test.go Make test case compatible with Go 1.17 (#1299) 2021-12-05 14:56:34 -05:00
app.go Merge branch 'master' into suggestions 2022-04-19 16:45:20 -04:00
args.go add is set method to flag interface - refer #294 2019-09-15 18:46:52 +05:30
category.go amend comments 2019-12-12 21:29:09 +00:00
cli.go Merge master @1.22.1 with v2 2019-09-13 05:17:24 +05:30
CODE_OF_CONDUCT.md Merge master @1.22.1 with v2 2019-09-13 05:17:24 +05:30
command_test.go added test for successfully used -v flag on command with subcommands 2020-06-18 09:34:54 +03:00
command.go Merge branch 'master' into suggestions 2022-04-19 16:45:20 -04:00
context_test.go fix: Nil pointer when getting context's flagSet(#1325) (#1327) 2022-01-16 19:22:57 -05:00
context.go fix: Nil pointer when getting context's flagSet(#1325) (#1327) 2022-01-16 19:22:57 -05:00
docs_test.go Fix reversed Got/Expected in expectFileContent in docs_test.go (#1320) 2022-01-03 18:20:18 -05:00
docs.go Remove extraneous line from generated markdown (#1311) 2021-11-06 07:37:42 -04:00
errors_test.go Update docs and tests around cli.Exit 2020-03-24 20:32:39 -04:00
errors.go Cleanup context.go 2021-04-05 07:57:41 -04:00
fish_test.go fish.go: support PathFlag.TakesFile [#1156] 2020-06-22 17:24:44 -07:00
fish.go Revert "Refactor fishAddFileFlag for better flexibility [#1156]" 2020-10-22 14:22:01 -07:00
flag_bool.go Merge pull request #1258 from dearchap/visible_interface 2021-04-24 13:10:52 -04:00
flag_duration.go Merge pull request #1258 from dearchap/visible_interface 2021-04-24 13:10:52 -04:00
flag_float64_slice.go fix #1239: slice flag value don't append to default values from ENV or file (#1240) 2021-07-06 20:33:01 -04:00
flag_float64.go Fix strconv.ParseFloat usage (#1335) 2022-02-16 21:29:15 -05:00
flag_generic.go Merge pull request #1258 from dearchap/visible_interface 2021-04-24 13:10:52 -04:00
flag_int64_slice.go fix #1239: slice flag value don't append to default values from ENV or file (#1240) 2021-07-06 20:33:01 -04:00
flag_int64.go Merge pull request #1258 from dearchap/visible_interface 2021-04-24 13:10:52 -04:00
flag_int_slice.go fix #1239: slice flag value don't append to default values from ENV or file (#1240) 2021-07-06 20:33:01 -04:00
flag_int.go Merge pull request #1258 from dearchap/visible_interface 2021-04-24 13:10:52 -04:00
flag_path.go Merge pull request #1258 from dearchap/visible_interface 2021-04-24 13:10:52 -04:00
flag_string_slice.go Merge pull request #1258 from dearchap/visible_interface 2021-04-24 13:10:52 -04:00
flag_string.go remove useless variable declarations (#1330) 2022-02-04 02:21:50 -05:00
flag_test.go fix #1239: slice flag value don't append to default values from ENV or file (#1240) 2021-07-06 20:33:01 -04:00
flag_timestamp.go Merge pull request #1258 from dearchap/visible_interface 2021-04-24 13:10:52 -04:00
flag_uint64.go Merge pull request #1258 from dearchap/visible_interface 2021-04-24 13:10:52 -04:00
flag_uint.go Merge pull request #1258 from dearchap/visible_interface 2021-04-24 13:10:52 -04:00
flag.go Don't call open("") (#1336) 2022-02-15 08:28:44 -05:00
funcs.go Resolved a grammatical error (#1281) 2021-06-13 09:36:57 -04:00
go.mod Merge branch 'master' into suggestions 2022-04-19 16:45:20 -04:00
go.sum Merge branch 'master' into suggestions 2022-04-19 16:45:20 -04:00
help_test.go fix(UsageText): consistent indent for help UsageText output (#1279) 2021-06-03 19:19:19 -04:00
help.go Merge branch 'master' into suggestions 2022-04-19 16:45:20 -04:00
helpers_test.go Add Destination field to TimestampFlag 2021-03-07 03:36:56 +00:00
LICENSE Update license text 2016-06-21 12:52:25 -04:00
parse.go Add suggestions support 2020-03-03 13:06:34 +01:00
README.md Link directly to pkg.go.dev 2021-01-27 16:10:42 -08:00
sort_test.go Merge master @1.22.1 with v2 2019-09-13 05:17:24 +05:30
sort.go Merge master @1.22.1 with v2 2019-09-13 05:17:24 +05:30
suggestions_test.go Add suggestions support 2020-03-03 13:06:34 +01:00
suggestions.go Add suggestions support 2020-03-03 13:06:34 +01:00
template.go Remove extraneous line from generated markdown (#1311) 2021-11-06 07:37:42 -04:00

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 master 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

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

Using v1 releases

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

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.