The non-interactive inksmith-cli companion validates portable templates and renders JSON data to PDFs using the Desktop renderer. It reads the current user's Desktop licence cache; it does not open a desktop window or connect to Press.
Install location
The Windows NSIS installers put inksmith-cli.exe beside InkSmith.exe. Windows MSIX registers an app execution alias. The Linux Debian package installs inksmith-cli in /usr/bin.
Validate a template
inksmith-cli validate --template path/to/template.inks
Validation checks the package, template schema, and exact packaged font bindings. It does not need a licence.
Render one PDF
inksmith-cli render --template invoice.inks --data customer.json --output invoice.pdf
--data - reads a JSON object from standard input. A simple data file might contain:
{"customer":{"name":"Ada"},"invoice":{"number":"INV-1042"}}
Input JSON is limited to 1 MiB. The output path must end in .pdf, name an existing directory, and not already exist. The CLI commits the complete file atomically and refuses to overwrite an existing result.
Handle results in an application
Successful commands write one versioned JSON object to stdout; failures write one JSON object to stderr. Branch on the exit status and the stable error.code, not the display message.
| Exit status | Meaning |
|---|---|
| 0 | Success |
| 2 | Command syntax |
| 3 | Input or JSON data |
| 4 | Template package or schema |
| 5 | PDF destination |
| 6 | Renderer or cancellation |
Ctrl+C cancels rendering without committing an incomplete PDF. Rendering uses the same cached licence limits as Desktop export. For complete Python, Node.js, and shell examples, see CLI examples.