Holonix
Holonix is a Nix flake that provides a reproducible development environment for building Holochain applications. It installs the correct versions of Holochain, Rust, and all required tooling into a consistent shell, eliminating “works on my machine” problems.
What Holonix Provides
- The correct version of the Holochain binary
- Rust toolchain with the required WASM target
hc(Holochain CLI) for managing sandboxes and running testshc-scaffold(scaffolding tool) for generating project boilerplate- WASM-related build tools
lair-keystorefor key management
Installation and Usage
Holonix requires Nix with flakes enabled.
Enter the development shell
nix develop github:holochain/holonixThis downloads and activates the Holonix environment. All Holochain tools are available for the duration of the shell session.
Using a specific Holochain version
nix develop github:holochain/holonix/main-0.4Check the Holonix repository for available branches corresponding to Holochain releases.
Adding Holonix to your project
Add a flake.nix at the root of your project:
{
description = "My Holochain app";
inputs = {
holonix.url = "github:holochain/holonix/main-0.4";
nixpkgs.follows = "holonix/nixpkgs";
flake-parts.follows = "holonix/flake-parts";
};
outputs = inputs:
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
systems = builtins.attrNames inputs.holonix.devShells;
perSystem = { inputs', ... }: {
devShells.default = inputs'.holonix.devShells.holonix;
};
};
}Then enter the environment:
nix developRunning the Scaffolding Tool
With Holonix active, generate a new hApp:
hc scaffold happGenerate a new DNA inside an existing hApp:
hc scaffold dnaGenerate a new zome:
hc scaffold zomeBenefits of Holonix
- Reproducible: Everyone on the team uses identical tooling
- Version-pinned: Holonix pins exact Holochain and Rust versions
- No global installs: Tools are scoped to the shell, no system pollution
- CI-ready: Same environment in local dev and CI pipelines
Related
- Holochain Scaffolding Tool - The scaffolding CLI provided through Holonix
- Lair Keystore - Key management tool bundled in Holonix
- Holochain Development Guide - Getting started guide