Skip to content

Hello NPK

Build and install a development NPK with the checked-in nip CLI.

This proof uses a development package format and a dev-sha256 signature sidecar. Production Ed25519 signing and reproducible build attestations are future Forge/Bazaar work.

Run the proof

bash
cd nexus-forge/core/nip
./build.sh
NIP="$PWD/nip"

export HOME=/tmp/nexus-npk-proof-home
export XDG_DATA_HOME=/tmp/nexus-npk-proof-home/.local/share
export XDG_CONFIG_HOME=/tmp/nexus-npk-proof-home/.config
export XDG_CACHE_HOME=/tmp/nexus-npk-proof-home/.cache
rm -rf "$HOME"
mkdir -p "$HOME/work"
cd "$HOME/work"

"$NIP" init hello-npk
"$NIP" build hello-npk
"$NIP" sign hello-npk/dist/hello-npk.npk
"$NIP" install hello-npk/dist/hello-npk.npk
"$NIP" list
"$NIP" info hello-npk
"$XDG_DATA_HOME/nip/Links/Executables/hello-npk"

Expected final output:

text
hello from hello-npk

What the commands do

  • nip init hello-npk creates package.kdl and src/main.sh.
  • nip build hello-npk creates hello-npk/dist/hello-npk.npk and a BOM sidecar.
  • nip sign ... creates hello-npk.npk.sig with a dev-sha256 digest.
  • nip install ... verifies the sidecar, installs into the XDG NIP store, and registers the package in the local JSON database.