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 3f8c3bc Jan 27, 2020
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github simplify GOFMT Check Jan 26, 2020
altsrc Merge branch 'master' into github-actions-windows Jan 13, 2020
autocomplete fix zsh autocomplete Oct 6, 2019
docs Merge remote-tracking branch 'origin' into uncomment Dec 25, 2019
testdata Fix man page heading formatting Jan 15, 2020
.flake8 Allow slightly longer lines in Python scripts Feb 15, 2017
.gitignore reduce diff Dec 24, 2019
CODE_OF_CONDUCT.md Merge master @1.22.1 with v2 Sep 12, 2019
LICENSE Update license text Jun 21, 2016
README.md Update README.md Jan 18, 2020
app.go remove unused code Dec 31, 2019
app_test.go Merge branch 'master' into refactor-tests-drop-buffer-writer Dec 30, 2019
args.go add is set method to flag interface - refer #294 Sep 15, 2019
build.go try install markdown-toc globally Jan 13, 2020
category.go amend comments Dec 12, 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 reduce stdout logs in tests Dec 29, 2019
context.go revert back to correct formatting Jan 25, 2020
context_test.go add a fix Dec 24, 2019
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 amend comments Dec 12, 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 refactor flag names - make it more explicitly Dec 29, 2019
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 Fix possible panics in slice type assertion Jan 22, 2020
flag_test.go goimports - fix code format Dec 30, 2019
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 fix tests Dec 16, 2019
go.sum fix tests Dec 16, 2019
help.go fix some golint errors show in go report card Dec 12, 2019
help_test.go Merge branch 'clean-help-printer' into help-printer-v2 Oct 21, 2019
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 man page heading formatting Jan 15, 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.

Installation

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

Go Modules are strongly recommended 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. For more build info, please look at the ./.github/workflows/cli.yml.

You can’t perform that action at this time.