Build a rig
Package
rig pack — produce a .rig.tgz artifact ready to install or publish.
rig packReads 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].includeand not[package].excludeor.rigignore. - The agent skill files (
.claude/skills/rig/**,.claude/CLAUDE.md) — kept fresh byrig 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
| Flag | What |
|---|---|
--out <dir> | Write the tarball into a specific directory (default: dist). |
--preview | Don't write anything; print the file list and warnings. |
--plain | Plain output. |
--json | Machine-readable summary (artifact path, size, sha256, file count, warnings). |
Verifying
After packing, always inspect:
rig inspect ./dist/<name>-<version>.rig.tgzConfirm:
- 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 doctorThis is the round-trip test.
Where the tarball goes
By default ./dist/. The dist/ directory is excluded from the package itself
(no recursion).