Packages

Add source packages to a project, lock their versions, and restore them on any machine.

Add a package

Package commands are built into wax. Start with a project created by wax new:

wax new my-app --runtime oneshot --yes
cd my-app
wax add Easing @wax/easing "^1.0.3"
wax list
wax check

add records the dependency in wax.json, chooses compatible versions, writes them to wax.lock, and installs the source under Packages/. Import the package through the local name you chose:

import Easing from Easing;

float eased = Easing.CubicInOut(progress);

After add creates the lockfile, commit wax.json and wax.lock. Treat Packages/ as generated output: do not edit or commit it.

Pick the right command

  • install restores the locked versions. With a valid lockfile it does not look for newer versions.
  • outdated reports available versions without changing the project.
  • update resolves the manifest again, replaces the lockfile, and installs the new versions.
  • add and remove change direct dependencies, resolve, and install as one transaction.
  • list and the default doctor checks are local and read only.
  • pack validates a package and writes an archive. publish validates, packs, and uploads a version that cannot be replaced.

Package guides

Add a dependency

Add and import a dependency, restore a checkout, inspect updates, and remove it.

Project files

Learn what belongs in wax.json, wax.lock, Src/, and Packages/.

Versions and lockfiles

Choose version ranges, restore packages offline, and control when versions change.

Create a package

Prepare a reusable library and check its contents before publishing.

Publish a package

Log in and publish a version.

Package safety

See how Wax checks downloads, protects project files, and supports repeatable builds.

Fix package problems

Fix stale lockfiles, version conflicts, cache misses, interrupted installs, and registry errors.

Inspect without changing the project

wax list
wax outdated
wax doctor

These commands accept --json for automation. outdated contacts the selected registry; list and doctor do not unless you add doctor --online or doctor --auth.

For exact syntax, run wax <command> --help. Every package command accepts --json and preserves meaningful exit status for scripts.