a4kit
v0.1.2
Published
CLI for A4Kit - document generation infrastructure for developers
Maintainers
Readme
a4kit
CLI for A4Kit - document generation infrastructure for developers. Author document templates as code (HTML + Liquid, Tailwind CSS, YAML config), preview them locally with HMR, and deploy them to the A4Kit rendering API.
Install
npm install -g a4kitnpx a4kit@latest init also works as a zero-install first touch, but every other
command below assumes the global install.
Quickstart
a4kit init # scaffold a new template project in the current directory
a4kit dev # local preview server with HMR at localhost:4444
a4kit deploy # sync local templates to the A4Kit API registryCommands
| Command | Description |
| --- | --- |
| a4kit init | Scaffold a new A4Kit document project in the current directory |
| a4kit dev | Start a local dev server with HMR at localhost:4444 |
| a4kit deploy | Sync local templates to the A4Kit API registry |
| a4kit login | Save your API token locally so a4kit deploy works without flags |
| a4kit preview --production | Preview the deploy-time flattened, self-contained output |
| a4kit postman | Generate a Postman Collection v2.1 from local templates |
| a4kit migrate | Migrate a4kit.yaml files from deprecated size/orientation to width/height (mm) |
Run a4kit <command> --help for command-specific options.
Optional: local PDF preview
a4kit dev's in-browser PDF preview renders with a headless Chromium via
Playwright, which is not installed by default (it's a large,
optional dependency). To use it:
npm install -g playwright
npx playwright install chromiumWithout it, everything else (HTML preview, a4kit deploy) still works normally.
License
MIT
