Quick Start

Quick Start

nFPM can be used both as a command line tool or as a Go library.

Getting Started

Install nFPM

You can choose from several instalation methods, for example:

Using Homebrew:

brew install goreleaser/tap/nfpm

Using go install:

go install github.com/goreleaser/nfpm/v2/cmd/nfpm@latest

Make sure to check the complete list and choose the best option for your case.

Initialize your project

Use nfpm init to create a sample configuration:

nfpm init

This creates a nfpm.yaml file with a commented example configuration.

Build your packages

Use nfpm package to create your packages:

# 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.

Command Line Reference

For more information about available options:

nfpm --help

See the configuration reference to customize your package definition.

Check out the command line reference 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, the nFPM command line implementation and GoReleaser’s usage.

Last updated on