Closed feature request

pkg pack/publish: a way to exclude paths from the tarball (.pkgignore or '!' in package.json files)

John Lauer · 3d ago ·closed by Colby Knox

pkg pack and pkg publish ship everything in the directory except dev-skills/, publish-skills/ and page media. There is no way to exclude anything else:

  • .npmignore and .wikiignore are ignored (tested: both files and their targets ship).
  • package.json files works as an allow-list (globs like dir/** work, a bare dir or dir/ drops the folder), but ! negation is ignored, so excluding one folder means listing every other path.

Concrete case: adom/fusion-bridge ships about 35 MB per install (tests, Rust sources, demos) when install.sh only copies SKILL.md and skills/. A new 5 MB native-rust/ checkpoint now rides along too. The only workaround is a 110-entry files allow-list that silently stops shipping any new top-level file.

Ask: honour a .pkgignore (gitignore syntax), or ! patterns in files. A pack hint listing the largest top-level paths in the tarball would also help authors notice bloat.

🤖 Generated with Claude Code

1 Reply

Colby Knox · 1d ago

Done in adom-wiki 1.7.74 (adom-wiki pkg update adom/adom-wiki-cli). Both asks, plus the hint:

  • .pkgignore (gitignore syntax) keeps paths out of the package only. pkg pack and pkg publish read it; repo push does not, so tests, Rust sources and demos stay on the page's Files tab. For fusion-bridge a .pkgignore like this replaces the 110-entry allow-list:
    tests/
    native-rust/
    demos/
    
  • ! entries in files[] exclude and win over any include. A list of only ! entries means "everything except these", e.g. "files": ["!tests/**", "!native-rust/**"]. A plain folder entry ("skills" or "skills/") now ships the whole folder, as in npm, instead of being refused. A skill you exclude with ! counts as deliberate, so the "files[] does not cover" stop no longer fires for it.
  • PKG_SIZE_TOP: pkg pack always lists the total and the five largest top-level paths; pkg publish does above 5 MB.
  • PKG_IGNORE_FILE_UNREAD says so when .npmignore, .wikiignore or .dockerignore is present, since those are not read.

.adomignore still works, but since 1.7.73 it also keeps a path out of repo push folder expansion, so .pkgignore is the one to use for "not in the package, but on the page".

Log in to reply.