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 42b931b Dec 8, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Merge branch 'master' into lynncyrin-patch-1 Dec 8, 2019
altsrc Merge branch 'master' into v2-master-merge Sep 16, 2019
autocomplete fix zsh autocomplete Oct 6, 2019
docs Update Manual Nov 28, 2019
testdata Improve docs generation for cli.Authors Nov 9, 2019
.flake8 Allow slightly longer lines in Python scripts Feb 15, 2017
.gitignore add env and fix url for golang.org Dec 1, 2019
CODE_OF_CONDUCT.md Merge master @1.22.1 with v2 Sep 12, 2019
LICENSE Update license text Jun 21, 2016
README.md Merge branch 'master' into remove-beta-warning Nov 29, 2019
app.go RunWithContext -> RunContext Dec 6, 2019
app_test.go replace log.Print with t.Log Dec 7, 2019
appveyor.yml restore appveyor Dec 1, 2019
args.go add is set method to flag interface - refer #294 Sep 15, 2019
build.go Close file' Nov 18, 2019
category.go remove redundant conversion Oct 21, 2019
cli.go Merge master @1.22.1 with v2 Sep 12, 2019
command.go Check for parsing errors within parse.go:parseIter Nov 27, 2019
command_test.go Prevent panic on flagSet access from custom BashComplete Nov 25, 2019
context.go add RunWithContext + remove signal cancellation Dec 4, 2019
context_test.go Rebased upstream - Fixed NPE Nov 18, 2019
docs.go Merge branch 'master' into v2-master-merge Sep 16, 2019
docs_test.go Improve docs generation for cli.Authors Nov 9, 2019
errors.go Fix README.md Sep 15, 2019
errors_test.go Back out the testify/assert addition 😅 Aug 4, 2017
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 branch 'master' into v2-master-merge Oct 2, 2019
flag_bool.go add is set method to flag interface - refer #294 Sep 15, 2019
flag_duration.go add is set method to flag interface - refer #294 Sep 15, 2019
flag_float64.go add is set method to flag interface - refer #294 Sep 15, 2019
flag_float64_slice.go add is set method to flag interface - refer #294 Sep 15, 2019
flag_generic.go add is set method to flag interface - refer #294 Sep 15, 2019
flag_int.go add is set method to flag interface - refer #294 Sep 15, 2019
flag_int64.go Merge latest master into v2-merge-master Sep 16, 2019
flag_int64_slice.go Remove global method from Int64Slice Flag Sep 16, 2019
flag_int_slice.go Merge latest master into v2-merge-master Sep 16, 2019
flag_path.go add is set method to flag interface - refer #294 Sep 15, 2019
flag_string.go add is set method to flag interface - refer #294 Sep 15, 2019
flag_string_slice.go Merge branch 'master' into v2-master-merge Sep 16, 2019
flag_test.go Exposed the `value` accessor in `Context` Nov 18, 2019
flag_uint.go add is set method to flag interface - refer #294 Sep 15, 2019
flag_uint64.go add is set method to flag interface - refer #294 Sep 15, 2019
funcs.go Fix test cases for context, docs, errors, fish, flags and funcs Sep 15, 2019
go.mod Merge master @1.22.1 with v2 Sep 12, 2019
go.sum Merge master @1.22.1 with v2 Sep 12, 2019
help.go Merge branch 'clean-help-printer' into help-printer-v2 Oct 21, 2019
help_test.go Merge branch 'clean-help-printer' into help-printer-v2 Oct 21, 2019
helpers_test.go Fix all tests Sep 15, 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 Improve docs generation for cli.Authors Nov 9, 2019

README.md

cli

Build Status Windows Build Status

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.

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

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

Installation

Make sure you have a working Go environment. Go version 1.10+ is supported. See the install instructions for Go.

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. For full details, see ./.travis.yml and ./appveyor.yml.

You can’t perform that action at this time.