Debian Codegraph @

docs/index.md

raw symbols SCIP
1 <!--
2 NOTE: This first section is intentionally identical to the top-level README.md at
3 https://github.com/urfave/cli/blob/main/README.md
4 -->
5 # Welcome to urfave/cli
6
7 [![Run Tests](https://github.com/urfave/cli/actions/workflows/test.yml/badge.svg)](https://github.com/urfave/cli/actions/workflows/test.yml)
8 [![Go Reference](https://pkg.go.dev/badge/github.com/urfave/cli/v3.svg)](https://pkg.go.dev/github.com/urfave/cli/v3)
9 [![Go Report Card](https://goreportcard.com/badge/github.com/urfave/cli/v3)](https://goreportcard.com/report/github.com/urfave/cli/v3)
10 [![codecov](https://codecov.io/gh/urfave/cli/branch/main/graph/badge.svg?token=t9YGWLh05g)](https://codecov.io/gh/urfave/cli)
11
12 urfave/cli is a **declarative**, simple, fast, and fun package for building command line tools in Go featuring:
13
14 - commands and subcommands with alias and prefix match support
15 - flexible and permissive help system
16 - dynamic shell completion for `bash`, `zsh`, `fish`, and `powershell`
17 - `man` and markdown format documentation generation
18 - input flags for simple types, slices of simple types, time, duration, and others
19 - compound short flag support (`-a` `-b` `-c` :arrow_right: `-abc`)
20 - input lookup from:
21 - environment variables
22 - plain text files
23 - [structured file formats supported via the `urfave/cli-altsrc` package](https://github.com/urfave/cli-altsrc)
24
25 <!--
26 /END first section that is identical to README.md first section
27 -->
28
29 These are the guides for each major version:
30
31 - [`v3`](./v3/getting-started.md)
32 - [`v2`](./v2/getting-started.md)
33 - [`v1`](./v1/getting-started.md)
34
35 In addition to the version-specific guides, these other documents are available:
36
37 - [CONTRIBUTING](./CONTRIBUTING.md)
38 - [CODE OF CONDUCT](./CODE_OF_CONDUCT.md)
39 - [RELEASING](./RELEASING.md)
40
41 ## Installation
42
43 Using this package requires a working Go environment. [See the install instructions for Go](https://go.dev/doc/install).
44
45 Go Modules are required when using this package. [See the go blog guide on using Go Modules](https://blog.golang.org/using-go-modules).
46
47 ### Using `v3` releases
48
49 The latest `v3` release may be installed via the `/v3` suffix and is the
50 recommended version for all new development. The state of the [`main`
51 branch](https://github.com/urfave/cli/tree/main) at any given time **may**
52 correspond to a `v3` series release or pre-release. Please see the [`v3`
53 migration guide](./migrate-v2-to-v3.md) on using v3 if you are upgrading from
54 v2.
55
56 ```sh
57 go get github.com/urfave/cli/v3@latest
58 ```
59
60 ```go
61 import (
62 "github.com/urfave/cli/v3" // imports as package "cli"
63 )
64 ```
65
66 ### Using `v2` releases
67
68 :warning: The `v2` series is receiving **security and bug fixes only** via the
69 [`v2-maint` branch](https://github.com/urfave/cli/tree/v2-maint) and **should
70 not** be used in new development. Please see the [`v3` migration
71 guide](./migrate-v2-to-v3.md) and feel free to open an issue or discussion if
72 you need help with the migration to `v3`.
73
74 ```sh
75 go get github.com/urfave/cli/v2@latest
76 ```
77
78 ```go
79 import (
80 "github.com/urfave/cli/v2" // imports as package "cli"
81 )
82 ```
83
84 ### Using `v1` releases
85
86 :warning: The `v1` series is receiving **security fixes only** via the
87 [`v1-maint` branch](https://github.com/urfave/cli/tree/v1-maint) and **should
88 not** be used in new development. Please see the [`v2` migration
89 guide](./migrate-v1-to-v2.md) and feel free to open an issue or discussion if
90 you need help with the migration to `v2`.
91
92 ### Supported platforms
93
94 cli is tested against multiple versions of Go on Linux, and against the latest
95 released version of Go on OS X and Windows. This project uses GitHub Actions
96 for builds. To see our currently supported go versions and platforms, look at
97 the [github workflow
98 configuration](https://github.com/urfave/cli/blob/main/.github/workflows/test.yml).