Skip to content

flox run command


flox-run - run app from current project


flox [ <general-options> ] run [ <run-options> ] [ <installable> ] [ – [ <nix command args> ] – [ <command args> … ] ]


Run a flake application from the requested installable. See the nix(1) manual’s section on installables for more information.


Running applications in the current working directory

If flox run is called without any arguments, and a controlling tty is available, it will offer the user a selection of installable from the current flake. Note, in this example, it’s assumed there’s a flake.nix in the current directory path.

$ flox run
? Select a packageapp for flox run  
> flox
[↑ to move, enter to select, type to filter]

If flox run is called with an argument, it will try to run that installable instead, without asking for user input. Note, in this example, it’s assumed there’s a flake.nix in the current directory.

$ flox run flox -- -- --version

Running applications from nixpkgs

It is possible to use flox run, to run packages from nixpkgs as follows.

$ flox run 'nixpkgs#cowsay' -- 'Moo'

Passing flags

Flags can be passed to the called installable as follows.

$ flox run 'nixpkgs#cowsay' -- -- --help



[ – [ <nix command args> ] – [ <command args> … ] ]
Arguments passed to the application

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 mode. Invoke multiple times for increasing detail.

-V, --version
Print flox version.

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

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

Development Options

The following options are supported by all Development Commands:

[(-A|--attr) <package>]
Selects package (aka “attrPath”) to be used. If not provided flox will prompt for you to select from the list of known packages.

[--stability <stability>]
Selects the set of nixpkgs to be used as a basis