Paperwork.CLI 9.8.0

There is a newer version of this package available.
See the version list below for details.
dotnet tool install --global Paperwork.CLI --version 9.8.0
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local Paperwork.CLI --version 9.8.0
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=Paperwork.CLI&version=9.8.0
                    
nuke :add-package Paperwork.CLI --version 9.8.0
                    

<picture> <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/paperwork-collective/Paperwork.Core/main/.github/images/cli-banner-dark.png"> <img alt="Paperwork.CLI: your templates, turned into documents automatically" src="https://raw.githubusercontent.com/paperwork-collective/Paperwork.Core/main/.github/images/cli-banner-light.png"> </picture>

<p align="center"> <a href="https://github.com/richard-scryber/scryber.core">Scryber</a> | <a href="https://github.com/paperwork-collective/Paperwork.Core">Core</a> | CLI | <a href="https://github.com/paperwork-collective/Paperwork.Skill">Skill</a> | <a href="https://paperwork.design" target="_blank" rel="noopener">Design</a> | <a href="https://paperwork.vu" target="_blank" rel="noopener">View</a> | <a href="https://paperwork.help/paperwork.cli/" target="_blank" rel="noopener">Help</a> | <a href="https://www.paperwork-collective.com" target="_blank" rel="noopener">Corp</a> </p>

Paperwork.CLI

Your templates, turned into documents automatically.

Paperwork.CLI creates dynamic documents from your templates automatically: in scripts, scheduled jobs and pipelines. Reference a template published on paperwork.design by its id (the same published templates people fill in with the Viewer), or point it at template files you have downloaded, add data and fields at run time, and write the PDF to a file or straight to another command. It runs on Paperwork.Core.

Not yet supported: templates that require a password to open, and templates that read data through a browser-only (NoCors) connection.

The Paperwork family

What it's for
Scryber.Core The open-source generation engine: templates, and code to create a document.
Paperwork.Core Embedding generation in your .NET applications, from your own template or a document built in code.
Paperwork.CLI (this package) Creating dynamic documents from your templates automatically, whether referenced or downloaded.
Paperwork.Skill Making the CLI available to your AI, to design, build and run document creation.
Paperwork.Design The online template designer: build, preview and publish your templates.
Paperwork.View The free online PDF viewer for your custom templates and Paperwork designs.
Paperwork.Samples The designs and templates from the help files at paperwork.help, ready to use.

Documentation for all of them is at paperwork.help.

Installation

dotnet tool install -g Paperwork.CLI

Commands

Command Description
generate Generate a PDF document
validate <config> Validate a template config JSON file (schemaVers/template-wrapped shape — see config format)
list List published templates: your personal ones, one owner's public ones, or a collection's
login Sign in with GitHub (device flow) — needed for personal and collection templates
whoami Show who you are signed in as, and check the sign-in still works
logout Forget the saved sign-in on this machine
info Display version and environment information

Quick Start

From a stored public template

paperwork generate --template "j-smith:monthly-report" --output report.pdf   # an owner:slug id, see "Find a template's id" below

From a personal template — requires login first

paperwork login
paperwork generate --template "myGithubUsername:my-template-slug" \
  --personal \
  --output report.pdf

From a template in a collection — requires login as a member

paperwork login
paperwork generate --collection "acme:reports" --template monthly-summary \
  --output report.pdf

--template is the template's id within the collection, and --collection is the collection's own id. If you are not a member of the collection, or the template has not been published, the command says so before it tries to fetch anything.

Find a template's id

paperwork list --personal                          # your own personal templates
paperwork list --public --owner j-smith            # one owner's public templates
paperwork list --private --collection acme:reports # a collection's templates

One of --personal, --public or --private is required. Only published templates are listed. Add --json for script-friendly output.

Check your sign-in

paperwork whoami    # who you are in each environment, your role and user id
paperwork logout    # forget the saved sign-in (add --all for every environment)

From an HTML file

paperwork generate --layout invoice.html --output invoice.pdf

With data and fields

paperwork generate \
  --layout invoice.html \
  --data order=order.json \
  --field date=2026-03-26 \
  --field title="March Invoice" \
  --output invoice.pdf

From a config file

paperwork generate --config invoice-config.json --output invoice.pdf

Override a config data source at runtime

paperwork generate --config invoice-config.json \
  --data customer=local-customer.json \
  --output invoice.pdf

Pipe output to stdout

paperwork generate --layout report.html | aws s3 cp - s3://my-bucket/report.pdf

generate options

Option Description
--template <id> Fetch a template from Firebase Storage (mutually exclusive with --config/--layout)
--personal Fetch one of your own personal-scope templates (--template must be {owner}:{slug}) — requires login first
--collection <id> Fetch a template published in a collection (--template is its id within the collection) — requires login as a member
--environment <name> production (default) | staging | dev
--portal <host> The portal whose configuration (endpoints, allowed domains) to generate with, e.g. paperwork.design. Defaults to the environment's main portal
--config <file> Template config JSON file — schemaVers/template-wrapped shape
--layout <file> HTML layout file
--style <file> CSS file — repeatable
--data name=path JSON data file — repeatable; overrides config/template data by name
--field key=value Scalar field override — repeatable; accessible as $fields["key"] in templates
--output <file> Output PDF path; omit to write bytes to stdout
--sync Render synchronously. Remote content ($assets, $maps, Source items) is not waited for and will be missing — only for documents that use none

Validate

paperwork validate report.json
# Valid. Layouts: 1, Styles: 2, Data: 3, Fields: 1

Full documentation

License

MIT

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
9.8.2 37 11/4/2026
9.8.0 50 11/3/2026
9.7.5 110 10/7/2026
9.7.4.5 108 10/6/2026
9.7.4.4 111 10/2/2026
9.7.4.3 103 10/1/2026
9.7.4.2 110 10/1/2026
1.2.0 186 3/27/2026
1.1.0 141 3/27/2026
1.0.0 124 3/26/2026