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 b42bf698a1
Add note about looming EOL of `v1`
2 years ago
.github Merge pull request #1366 from urfave/revert-1352-stalebot-config 2 years ago
altsrc Update altsrc/map_input_source.go 4 years ago
autocomplete Added manual and script for PowerShell autocomplete 4 years ago
docs Add note about looming EOL of `v1` 2 years ago
internal Pass non-empty string slice to example app `Run` (#1364) 2 years ago
testdata Bump github.com/cpuguy83/go-md2man/v2 to v2.0.1 (#1321) 3 years ago
.flake8 Allow slightly longer lines in Python scripts 8 years ago
.gitignore Add missing `"fmt"` import in example 2 years ago
CODE_OF_CONDUCT.md Adjust contribution and maintainer prose per current reality 7 years ago
LICENSE Update license text 8 years ago
README.md Switch branch references from `master` to `main` 2 years ago
app.go Switch branch references from `master` to `main` 2 years ago
app_test.go Make test case compatible with Go 1.17 (#1299) 3 years ago
args.go add is set method to flag interface - refer #294 5 years ago
category.go amend comments 5 years ago
cli.go Merge master @1.22.1 with v2 5 years ago
command.go Merge pull request #1255 from cpacifying/master 3 years ago
command_test.go added test for successfully used -v flag on command with subcommands 4 years ago
context.go fix: Nil pointer when getting context's flagSet(#1325) (#1327) 3 years ago
context_test.go fix: Nil pointer when getting context's flagSet(#1325) (#1327) 3 years ago
docs.go Remove extraneous line from generated markdown (#1311) 3 years ago
docs_test.go Fix reversed Got/Expected in expectFileContent in docs_test.go (#1320) 3 years ago
errors.go Cleanup context.go 4 years ago
errors_test.go Update docs and tests around cli.Exit 5 years ago
fish.go Revert "Refactor fishAddFileFlag for better flexibility [#1156]" 4 years ago
fish_test.go fish.go: support PathFlag.TakesFile [#1156] 4 years ago
flag.go Merge branch 'main' into remove_reflect 2 years ago
flag_bool.go Remove reflect calls for doc generation 3 years ago
flag_duration.go Remove reflect calls for doc generation 3 years ago
flag_float64.go Merge branch 'main' into remove_reflect 2 years ago
flag_float64_slice.go Merge branch 'main' into remove_reflect 2 years ago
flag_generic.go Remove reflect calls for doc generation 3 years ago
flag_int.go Remove reflect calls for doc generation 3 years ago
flag_int64.go Remove reflect calls for doc generation 3 years ago
flag_int64_slice.go Merge branch 'main' into remove_reflect 2 years ago
flag_int_slice.go Merge branch 'main' into remove_reflect 2 years ago
flag_path.go Remove reflect calls for doc generation 3 years ago
flag_string.go Merge branch 'main' into remove_reflect 2 years ago
flag_string_slice.go Remove reflect calls for doc generation 3 years ago
flag_test.go Add tests around flag stringifying for all modified types 2 years ago
flag_timestamp.go Remove reflect calls for doc generation 3 years ago
flag_uint.go Remove reflect calls for doc generation 3 years ago
flag_uint64.go Remove reflect calls for doc generation 3 years ago
funcs.go Resolved a grammatical error (#1281) 3 years ago
go.mod Update dependencies and go.mod spec 2 years ago
go.sum Update dependencies and go.mod spec 2 years ago
help.go Writing tests around changes from #1186 2 years ago
help_test.go Writing tests around changes from #1186 2 years ago
helpers_test.go Add Destination field to TimestampFlag 4 years ago
parse.go revert testing change 5 years ago
sort.go Consider case when sorting strings 7 years ago
sort_test.go Consider case when sorting strings 7 years ago
template.go Remove extraneous line from generated markdown (#1311) 3 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"
)
...

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.