jac-packaging

Builds Jac projects into PyPI wheels and npm tarballs from jac.toml metadata.

Updated Jul 26, 2026
One-click install
npx skills add https://github.com/nihalnihalani/jachacks-sf-2026 --skill jac-packaging-nihalnihalani
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: jac-packaging
Source: https://github.com/nihalnihalani/jachacks-sf-2026/tree/main/plugins/jac-codex/skills/jac-packaging
Command: npx skills add https://github.com/nihalnihalani/jachacks-sf-2026 --skill jac-packaging-nihalnihalani

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Turning a Jac project into a distributable package is error-prone: the default scaffold layout produces empty wheels, jac.toml fields have hyphen-vs-underscore traps, and there is no built-in publish command. This Skill guides packaging a Jac project as a PEP 427 wheel for PyPI or an npm tarball, with correct metadata, entry points, and extras. ## Core Features & Use Cases - Wheel and sdist builds: Configure jac.toml ([project], [dependencies], [entrypoints.scripts], [optional-dependencies]) and run jac build --as wheel, then upload with twine to TestPyPI or PyPI. - npm publishing: Run jac build --as npm to compile client modules to ES modules with package.json and .d.ts files, respecting the sv server-boundary rejection rule. - Package layout guidance: Create the required package directory matching project.name, avoid listing jaclang as a dependency, and ship precompiled .jir bytecode. - Use Case: You finished a Jac CLI tool and want teammates to run jac install greet and get a greet command on PATH. This Skill walks you through the package directory, jac.toml metadata, the build, and the twine upload. ## Quick Start Package my Jac project as a wheel and show me the exact jac.toml and build commands to publish it to PyPI.

Frequently Asked Questions about jac-packaging

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I publish a Jac project to PyPI?▼

Run `jac build --as wheel` to produce a wheel and sdist from jac.toml, then upload with `twine upload dist/*`. There is no `jac publish` command; test first with `twine upload --repository testpypi dist/*`.

How do I build an npm package from Jac code?▼

Run `jac build --as npm` to compile client modules to ES-module JavaScript with a generated package.json and .d.ts files, producing dist/<name>-<version>.tgz. Upload it with `npm publish dist/<name>-<version>.tgz --access public`.

Why is my Jac wheel empty or not importable?▼

The wheel build only collects a package directory whose name matches project.name in jac.toml; single top-level .jac files are never collected. The default scaffold's root-level main.jac is for `jac run`, so move code into a <name>/ package directory.

Should I add jaclang as a dependency in jac.toml?▼

No. jaclang is not a PyPI package; it is the host runtime supplied by the jac binary that runs your wheel. Consumers install your package with `jac install <pkg>` under the jac binary, not a bare pip install.

Why does jac build fail with a type-check error?▼

`jac build` runs a whole-program type-check gate and refuses to emit an artifact on failure. Fix the reported diagnostics, or pass `--no_typecheck` to skip the gate as a last resort.

Why can't my Jac module be published as an npm package?▼

Modules with an sv import or call cross a server boundary and cannot run from a plain npm install, so the build rejects them. Keep server-coupled code in your app and publish only pure client code as the npm library.