1
1
Fork 0
mirror of https://github.com/goreleaser/nfpm synced 2024-05-26 16:16:08 +02:00
nfpm/www/docs/usage.md

27 lines
704 B
Markdown
Raw Normal View History

# Usage
NFPM can be used both as command line tool or as a library.
## Command Line
To create a sample config file, run:
```sh
nfpm init
```
You can then customize it and package to the formats you want:
```sh
nfpm pkg --packager deb --target /tmp/
nfpm pkg --packager rpm --target /tmp/
```
You can learn about it in more detail in the [command line reference section](/cmd/nfpm/).
## Go Library
Check out the [GoDocs page](https://pkg.go.dev/github.com/goreleaser/nfpm/v2?tab=doc),
the [NFPM command line implementation](https://github.com/goreleaser/nfpm/blob/master/cmd/nfpm/main.go)
and [GoReleaser's usage](https://github.com/goreleaser/goreleaser/blob/master/internal/pipe/nfpm/nfpm.go).