Build a rig

Package

rig pack — produce a .rig.tgz artifact ready to install or publish.

rig pack

Reads rig.toml, applies the include/exclude rules, runs safety checks, and writes dist/<name>-<version>.rig.tgz.

What's in the tarball

  • The manifest (rig.toml).
  • Every file that matches [package].include and not [package].exclude or .rigignore.
  • The agent skill files (.claude/skills/rig/**, .claude/CLAUDE.md) — kept fresh by rig init / rig pack.

What's not in:

  • .git/, node_modules/, .venv/, dist/ — default excludes.
  • .env, *.key, *.pem — default excludes.
  • Anything in [local].dirs — these are shape-only.
  • .rig/ — instance metadata is per-install, never shipped.

Flags

FlagWhat
--out <dir>Write the tarball into a specific directory (default: dist).
--previewDon't write anything; print the file list and warnings.
--plainPlain output.
--jsonMachine-readable summary (artifact path, size, sha256, file count, warnings).

Verifying

After packing, always inspect:

rig inspect ./dist/<name>-<version>.rig.tgz

Confirm:

  • The manifest is what you expect.
  • The file list contains nothing surprising (esp. nothing under private/, secrets/, etc).
  • Safety warnings are empty or expected.

Better still, install it into /tmp and run rig doctor:

rig hub use ./dist/foo-0.1.0.rig.tgz --dir /tmp/test-foo
cd /tmp/test-foo && rig install && rig doctor

This is the round-trip test.

Where the tarball goes

By default ./dist/. The dist/ directory is excluded from the package itself (no recursion).

Next