Packages
@useprint/cli
Preview, export, and build document workflows from the command line.
@useprint/cli provides the local development workflow for Useprint. It is the easiest way to preview your document components in the browser and export rendered HTML.
Install
npm install -D @useprint/cliCommands
useprint dev
Starts the local preview app and watches your documents.
npx useprint devUseful flags:
--dir <path>to change the documents directory--port <port>to change the preview port
useprint export
Builds your document components and writes rendered HTML into an output directory.
npx useprint exportUseful flags:
--outDir <path>to change the output directory--prettyto write easier-to-read HTML--dir <path>to change the source directory
useprint build
Copies the preview app into .useprint, installs dependencies, and runs a production build.
npx useprint builduseprint start
Starts the preview app that was built into .useprint.
npx useprint startDefault project shape
documents/
invoice.tsx
quote.tsx
static/The CLI expects ./documents by default, and it copies documents/static into exported output when present.