Skip to content

Install nuf

nuf lives in one folder, .nuf/, inside the folder that holds your repositories. You run it by its path, .nuf/nuf. Nothing is installed globally.

  • Node.js 26 or later.
  • One package manager: npm, pnpm, Yarn or Bun.
  • Git, as the plain git program.

The project folder is any folder that holds the repositories you want nuf to serve. nuf has no default place: you choose it.

projects/ the project folder
.nuf/ the nuf folder
shop/ a repository nuf serves, with its own nuf.yaml
ui-kit/ another one
worktrees/<repo>/<name>/ made by nuf

nuf init refuses some folders as the project folder:

  • your home folder itself, or a folder above it;
  • a folder inside a Git work tree;
  • a folder inside another project folder.

A repository nuf serves may not contain a .nuf/ folder of its own. nuf refuses to serve one that does, so a folder planted in a repository can never choose your settings.

These steps use npm. pnpm and Bun work the same way, each with its own add command. For Yarn, put nodeLinker: node-modules in .nuf/.yarnrc.yml before you add the package; Yarn’s Plug’n’Play layout is not supported.

Terminal window
cd projects
mkdir .nuf && cd .nuf
npm install --save-exact @n-uf/nuf
cd ..
node .nuf/node_modules/@n-uf/nuf/dist/nuf.mjs init
.nuf/nuf where

The package has no dependencies and no install scripts. Installing it fetches nuf and nothing else.

nuf init finishes the folder:

  • the launcher, .nuf/nuf;
  • .gitignore;
  • package.json, only when there is none;
  • .yarnrc.yml;
  • config/, copied from a made-up example setup.

The Policy in that example enables only the local machine, so a new folder cannot spend money. nuf init also records that Policy as adopted, so your first commands are not held. It runs no Git and installs nothing. Add --dry-run to list the files without writing them.

.nuf/nuf is a short shell file. It finds its own folder, with links resolved, and runs node on the nuf installed beside it. No package manager runs when nuf runs, and nothing is fetched. If nuf is not installed beside the launcher, it says so and answers 2.

From inside a repository, call it by its relative path:

Terminal window
cd shop
../.nuf/nuf check types unit --set feat-fold --by builder-7

Never run nuf with npx. If the package is not installed, npx fetches whatever the public registry holds under that name.

An agent host needs the launcher’s full path. nuf where prints it as command.

Two witnesses must agree, or nuf refuses and writes nothing:

  1. The install. nuf knows its folder from where it is installed: the .nuf folder whose node_modules holds the running nuf.
  2. The current folder. It must lie inside that project folder, with no other .nuf between the two. It tells nuf which repository the call is about.

nuf reads no environment variable to find its folder. For one call, --folder <dir> names another nuf folder. Such a call counts as a test folder’s: it runs jobs only on the local machine and sends nothing out.

.nuf/
nuf the launcher in Git
package.json one dependency: @n-uf/nuf, exact version in Git
<lock file> your package manager's in Git
.gitignore in Git
config/
policy.yaml Policy in Git
machine.yaml machine defaults, a section per platform in Git
env.yaml shared job environment, no secrets in Git
local/ this machine only ignored
state/ ledger, lock, reports, cache ignored
node_modules/ the program ignored

.nuf/ can be a Git repository of its own. nuf runs no Git on it: whether and where you push it is up to you.

nuf reads config/ and writes its records only inside state/. Only nuf init writes under config/. nuf policy change edits no file: it records that you adopt the Policy the file holds. A Policy that arrives by a Git pull is held until you adopt it (Policy and holds).

One project folder has one Policy and one history, shared by every repository in it. A second project folder gets its own Policy and its own history, and nothing crosses between the two.

nuf writes nothing outside the project folder:

  • nothing on your search path (PATH);
  • no entry in a scheduler (the work that is due runs with your commands);
  • nothing in an agent host.

Its integration files, such as the agents’ skill text, stay inside the package. Your own setup places them, with the launcher’s path from nuf where.

Terminal window
.nuf/nuf --version
.nuf/nuf where

nuf where shows:

  • the project folder and the nuf folder;
  • the config, local and state folders;
  • the platform and the settings files in use;
  • the version and command.

In a folder it refuses, it prints what it found and why, and answers 2.

Next: how nuf works, or the command reference.