1
1
mirror of https://github.com/goreleaser/nfpm synced 2025-12-30 09:31:40 +01:00
nfpm/www/content/docs/quick-start.md
Carlos Alexandro Becker 21d6ae01e3
docs: migrate to hugo and hextra (#970)
* docs: migrate to hugo and hextra

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* chore: cleanup

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* fix: htmltest

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* ci: update

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* chore: eof

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* docs: udpate

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* wip

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* docs: improvements

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* ci: fix

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* better icons

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* wip

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* wip

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* fix: updates

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* wip

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-11-16 21:34:58 -03:00

75 lines
1.6 KiB
Markdown

---
title: Quick Start
weight: 1
---
nFPM can be used both as a command line tool or as a Go library.
## Getting Started
{{% steps %}}
### Install nFPM
You can choose from [several instalation methods](/docs/install), for example:
**Using Homebrew:**
```sh
brew install goreleaser/tap/nfpm
```
**Using go install:**
```sh
go install github.com/goreleaser/nfpm/v2/cmd/nfpm@latest
```
Make sure to [check the complete list](/docs/install) and choose the best option
for your case.
### Initialize your project
Use [`nfpm init`](/docs/cmd/nfpm_init) to create a sample configuration:
```sh
nfpm init
```
This creates a `nfpm.yaml` file with a commented example configuration.
### Build your packages
Use [`nfpm package`](/docs/cmd/nfpm_package) to create your packages:
```sh
# Build specific formats
nfpm pkg --packager deb --target /tmp/
nfpm pkg --packager rpm --target /tmp/
nfpm pkg --packager apk --target /tmp/
```
You can also use `ipk` and `archlinux` as packagers.
{{% /steps %}}
## Command Line Reference
For more information about available options:
```sh
nfpm --help
```
See the [configuration reference](/docs/configuration) to customize your package definition.
Check out the [command line reference](/docs/cmd) for detailed documentation of all commands.
## Using as a Go library
You can also use nFPM as a library in your Go project.
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/main/cmd/nfpm/main.go)
and [GoReleaser's usage](https://github.com/goreleaser/goreleaser/blob/main/internal/pipe/nfpm/nfpm.go).