Skip to content
A simple, fast, and fun package for building command line apps in Go
Go Shell
Branch: master
Clone or download

Latest commit

Latest commit 477292c May 13, 2020

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Update pull_request_template.md Mar 30, 2020
altsrc Don't assume a fixed windows drive letter in tests Apr 14, 2020
autocomplete fix(zsh_autocomplete): List files on tab with no completion options May 3, 2020
docs Document EnvVar change May 12, 2020
internal move bounds Feb 29, 2020
testdata Fix man page heading formatting Jan 15, 2020
.flake8 Allow slightly longer lines in Python scripts Feb 15, 2017
.gitignore add diffing Feb 29, 2020
CODE_OF_CONDUCT.md Merge master @1.22.1 with v2 Sep 12, 2019
LICENSE Update license text Jun 21, 2016
README.md Link to migration guide Apr 4, 2020
app.go Harmonize BeforeError handling Apr 27, 2020
app_test.go add tests Apr 1, 2020
args.go add is set method to flag interface - refer #294 Sep 15, 2019
category.go amend comments Dec 12, 2019
cli.go Merge master @1.22.1 with v2 Sep 12, 2019
command.go Harmonize BeforeError usage in Command#Run Apr 28, 2020
command_test.go reduce stdout logs in tests Dec 29, 2019
context.go revert back to correct formatting Jan 25, 2020
context_test.go test(context): Change the StringSliceFlag to a pointer May 3, 2020
docs.go Use VisibleFlags during doc generation Dec 19, 2019
docs_test.go Merge branch 'master' into github-actions-windows Jan 13, 2020
errors.go Update docs and tests around cli.Exit Mar 25, 2020
errors_test.go Update docs and tests around cli.Exit Mar 25, 2020
fish.go Fix test cases for context, docs, errors, fish, flags and funcs Sep 15, 2019
fish_test.go Merge master @1.22.1 with v2 Sep 12, 2019
flag.go Merge pull request #1083 from AkihiroSuda/hide-help-command Mar 6, 2020
flag_bool.go refactor flag names - make it more explicitly Dec 29, 2019
flag_duration.go refactor flag names - make it more explicitly Dec 29, 2019
flag_float64.go refactor flag names - make it more explicitly Dec 29, 2019
flag_float64_slice.go Fix possible panics in slice type assertion Jan 22, 2020
flag_generic.go refactor flag names - make it more explicitly Dec 29, 2019
flag_int.go refactor flag names - make it more explicitly Dec 29, 2019
flag_int64.go refactor flag names - make it more explicitly Dec 29, 2019
flag_int64_slice.go Fix possible panics in slice type assertion Jan 22, 2020
flag_int_slice.go Fix possible panics in slice type assertion Jan 22, 2020
flag_path.go refactor flag names - make it more explicitly Dec 29, 2019
flag_string.go refactor flag names - make it more explicitly Dec 29, 2019
flag_string_slice.go Allow specifying a StringSlice destination for StringSliceFlag Feb 28, 2020
flag_test.go Reset the environment variables after each test that clears them Apr 15, 2020
flag_timestamp.go refactor flag names - make it more explicitly Dec 29, 2019
flag_uint.go refactor flag names - make it more explicitly Dec 29, 2019
flag_uint64.go refactor flag names - make it more explicitly Dec 29, 2019
funcs.go Fix test cases for context, docs, errors, fish, flags and funcs Sep 15, 2019
go.mod reset to master Feb 29, 2020
go.sum reset to master Feb 29, 2020
help.go fix some golint errors show in go report card Dec 12, 2019
help_test.go Add HideHelpCommand Mar 6, 2020
helpers_test.go remove unused code Dec 31, 2019
parse.go revert testing change Nov 28, 2019
sort.go Merge master @1.22.1 with v2 Sep 12, 2019
sort_test.go Merge master @1.22.1 with v2 Sep 12, 2019
template.go fix description of subcommand more consistent Jan 28, 2020

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

You can’t perform that action at this time.