Go to file
2021-03-15 17:03:22 +02:00
.github Update stale.yml 2021-01-27 10:37:40 -08: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 pull request #1214 from anicoll/flag_lineage_fix 2021-01-28 23:16:40 -05:00
internal Reduce desiredMinBinarySize 2020-10-31 00:14:08 +05:30
testdata fish.go: support PathFlag.TakesFile [#1156] 2020-06-22 17:24:44 -07:00
.flake8 Allow slightly longer lines in Python scripts 2017-02-14 21:17:05 -08:00
.gitignore add diffing 2020-02-29 14:00:26 -08:00
app_test.go remove repeated comment 2021-01-29 12:10:44 -07:00
app.go Fix: typo 2020-12-27 18:30:11 +01: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 UsageText to be passed from Command to App in startApp 2021-03-15 17:03:22 +02:00
context_test.go Add test for the else path. 2021-01-28 14:35:55 -05:00
context.go Fix Context.Value. 2021-01-28 14:35:55 -05:00
docs_test.go make the man page section selectable 2021-01-28 09:39:26 +09:00
docs.go make the man page section selectable 2021-01-28 09:39:26 +09:00
errors_test.go Update docs and tests around cli.Exit 2020-03-24 20:32:39 -04:00
errors.go Update docs and tests around cli.Exit 2020-03-24 20:32:39 -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 refactor flag names - make it more explicitly 2019-12-29 08:58:12 +01:00
flag_duration.go refactor flag names - make it more explicitly 2019-12-29 08:58:12 +01:00
flag_float64_slice.go Fix possible panics in slice type assertion 2020-01-22 12:30:31 +01:00
flag_float64.go refactor flag names - make it more explicitly 2019-12-29 08:58:12 +01:00
flag_generic.go refactor flag names - make it more explicitly 2019-12-29 08:58:12 +01:00
flag_int64_slice.go fix for parent context not setting child flags 2020-12-09 11:17:21 +00:00
flag_int64.go refactor flag names - make it more explicitly 2019-12-29 08:58:12 +01:00
flag_int_slice.go fix for parent context not setting child flags 2020-12-09 11:17:21 +00:00
flag_int.go refactor flag names - make it more explicitly 2019-12-29 08:58:12 +01:00
flag_path.go refactor flag names - make it more explicitly 2019-12-29 08:58:12 +01:00
flag_string_slice.go bugfix: don't overwrite existing stringslice refence 2020-08-24 14:20:17 -07:00
flag_string.go refactor flag names - make it more explicitly 2019-12-29 08:58:12 +01:00
flag_test.go Merge pull request #1208 from Madhur1997/master 2021-01-28 23:20:42 -05:00
flag_timestamp.go Verify whether there is a Value before overriding 2020-07-11 15:54:46 -03:00
flag_uint64.go refactor flag names - make it more explicitly 2019-12-29 08:58:12 +01:00
flag_uint.go refactor flag names - make it more explicitly 2019-12-29 08:58:12 +01:00
flag.go Issue #1066: Display (accepts multiple inputs) for SliceFlags in the 2020-12-01 14:14:15 +05:00
funcs.go Fix test cases for context, docs, errors, fish, flags and funcs 2019-09-15 11:01:20 +05:30
go.mod Bump gopkg.in/yaml.v2 to v2.2.3 2020-09-18 09:16:14 -07:00
go.sum Bump gopkg.in/yaml.v2 to v2.2.3 2020-09-18 09:16:14 -07:00
help_test.go Added template functions for multi-line Description formatting. 2020-08-17 16:02:40 -04:00
help.go Merge pull request #1175 from imle/imle/add-better-multi-line-description-formatting 2020-11-01 14:29:08 +05:30
helpers_test.go remove unused code 2019-12-31 16:36:01 +01:00
LICENSE Update license text 2016-06-21 12:52:25 -04:00
parse.go revert testing change 2019-11-27 20:37:23 -08: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
template.go make the man page section selectable 2021-01-28 09:39:26 +09: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.