Skip to content

silky/flox

 
 

Repository files navigation

flox logo

license PRs beta

flox (beta)

The flox CLI is a multi-platform environment manager built on Nix.

flox flywheel

With flox you can:

  1. Install and run software anywhere
  2. Share collections of software that others can use
  3. Build software the same way in any environment
  4. Publish software for re-use

Installation

You can download the flox CLI via one of our native installers for Mac, Linux, or Windows WSL here.

Usage

See the docs for more detail on usage.

Search through available packages:

$ flox search ripgrep
ripgrep - A utility that combines the usability of The Silver Searcher with the raw speed of grep
  [email protected]
  [email protected]
  [email protected]
  [email protected]

Install a package:

$ flox install ripgrep
created generation 1

Create a new environment:

$ flox create
created environment default (aarch64-linux)

Activate an environment¶

$ flox install cowsay
created generation 2
$ flox activate
flox [default] $ cowsay '¡Hola!'
 ________
< !Hola! >
 --------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||
flox [default] $ exit

Use another's environment:

$ flox pull -e flox-examples/demo
Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
To /home/USER/.cache/flox/meta/flox-examples
 * [new branch]      aarch64-linux.demo -> aarch64-linux.demo
$ flox activate -e flox-examples/demo
flox [flox-examples/demo default] $ fortune | cowsay
 _____________________________________
/ Spock: We suffered 23 casualties in \
\ that attack, Captain.               /
 -------------------------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||
flox [flox-examples/demo default] $ exit

nixpkgs-flox

The flox CLI gets its packages from the nixpkgs-flox channel, which is created using Nixpkgs. Using packages from a flox channel adds a few features as compared to using Nixpkgs directly: semantic versioning, stabilities, and guaranteed cache hits. See the docs for more.

Contributing

We welcome contributions to this project. Please read the Contributor guide first.

Building from source

The flox CLI is written in Rust. Building flox requires a running Nix daemon.

The simplest way to build flox is via flox!

  • Download flox and run flox build in the project directory.

If you're a Nix user, you can run the following: nix build .#flox --extra-experimental-features "nix-command flakes".

See the contributor guide for more information.

License

The flox CLI is licensed under the GPLv2. See LICENSE.

Community

Find us on Twitter and Discourse.

For updates to the flox CLI, follow this repo on GitHub!

About

Harness the power of Nix

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 94.1%
  • Nix 4.3%
  • Lua 1.2%
  • Other 0.4%