Skip to content

flox init command

NAME

flox-init - initialize flox expressions for current project.

SYNOPSIS

flox [ <general-options> ] init [ <options> ] # DESCRIPTION

Add a new package using a template.

Given a <template> creates a new package definition in PROJECT_ROOT/<name>.

An existing package called <name> will raise an error.

If <template> or <name> are unspecified and a controlling TTY is present, flox will query them using interactive dialogs.

In non interactive shells the command will fail without a <name> and default to a generic builder for <template>.

OPTIONS

General Options

Many flox commands wrap Nix commands of the same name, and will correspondingly pass on options and arguments directly to the underlying nix invocation. For more information on the options supported by specific Nix commands please invoke flox nix <command> help.

The following options are used specifically by flox and must be specified before the <command> argument.

-v, --verbose
Verbose mode. Invoke multiple times for increasing detail.

--debug
Debug mode. Invoke multiple times for increasing detail.

-V, --version
Print flox version.

--prefix
Print flox installation prefix / Nix store path. (flox internal use only.)

--bash-passthru
Force execution in flox-bash (flox internal use only.)

Init Options

[ --name <name> | -n <name> ]
Name of the package to be created. Queried interactively if controlling TTY is attached

[ --template <template> | -t <template> ]
Template to create new package definition from.