To test the current local version of the Scaffolding tool:
-
Check out the Scaffolding repository and switch to the Git revision you want to test.
-
Start the Nix development environment:
nix develop
This shell includes the Scaffolding tool built from your current local repository.
-
Change to a directory where you want to create your test project, e.g.:
cd /tmp -
Scaffold a new app:
hc-scaffold web-app
-
Follow the Scaffolding tool's output instructions, but skip the
nix developstep to ensure you continue using the locally builthc-scaffoldinstead of that fromholochain/holonix. -
Run tests or launch your hApp using
nix developas needed. This shell contains ahc-scaffoldbuilt fromholochain/holonixalongside other nix packages needed for local development of your hApp such as node.js and package managers like pnpm, bun or yarn.
To test your hApp against a different version of Holochain:
-
Override the Holochain input when entering the Nix shell:
nix develop --override-input holonix/holochain github:holochain/holochain/<tag>
Replace
<tag>with the desired Holochain version, e.g.,holochain-0.4.0-dev.22. -
Proceed with scaffolding and testing as described above, skipping the
nix developstep in the Scaffolding output.
You can override other inputs like lair-keystore and hc-launch similarly:
nix develop --override-input holonix/lair-keystore github:holochain/lair/<tag>
nix develop --override-input holonix/hc-launch github:holochain/hc-launch/<tag>Ensure you're using the correct version tags. Refer to the parent flake for the latest input versions.
- Always verify the version of tools you're using with commands like
hc-scaffold --versionorholochain --version. - Multiple overrides can be combined in a single command if needed.
- These overrides are temporary and only apply to the current Nix shell session.