| Crates.io | clinnet |
| lib.rs | clinnet |
| version | 0.1.8 |
| created_at | 2025-11-12 09:02:34.865255+00 |
| updated_at | 2025-12-04 12:09:06.813985+00 |
| description | Incrementally render Typst figures from DOT graphs and assemble them into a grid PDF. |
| homepage | https://github.com/lcnbr/linnet/tree/main/clinnet |
| repository | https://github.com/lcnbr/linnet |
| max_upload_size | |
| id | 1928989 |
| size | 689,518 |
clinnet is the command-line companion to the linnet graph library.
It scans a directory for .dot files, incrementally renders each figure through
Typst, and assembles the resulting PDFs into a single grid document.
cargo install clinnet
This installs the linnet binary (the package is named clinnet to avoid a clash with the library
crate). Make sure the typst CLI is available on your $PATH, as the tool shells out to it for
every compilation step.
# Render every .dot file underneath ./examples into build/grid.pdf
linnet examples
On first run, clinnet writes a small set of default Typst templates and a compiled linnest.wasm
plugin into build/templates/. You can provide your own templates via --figure-template,
--grid-template, or --layout-template flags. Pass --style multiple times to add extra files
whose contents should invalidate the incremental build cache when they change.
You can pass custom variables to Typst templates using --input key=value, which makes the
variables available through sys.inputs in your templates. This works exactly like the Typst CLI's
--input option.
.dot graphs in your project directory.linnet <graphs-root> to refresh the figure PDFs and the combined grid.build/grid.pdf (or the path supplied via --grid-output) to browse the results.The cache lives in build/.cache/figures.json; deleting it forces a full rebuild. See
linnet --help for the complete flag list.
You can pass custom variables to your Typst templates:
# Pass variables that will be available in templates via sys.inputs
linnet examples --input theme=dark --input scale=1.5
# Multiple inputs can be specified
linnet examples --input author="John Doe" --input version=1.0 --input debug=true
These variables are available in both figure and grid templates through Typst's sys.inputs
dictionary.
After a full run, you can re-render individual figures or the final grid without rescanning DOT files:
# Rebuild a single figure that was part of the previous run
linnet --build-dir build --rebuild-figure path/to/file.dot
# Rebuild the grid PDF based on the cached figure metadata
linnet --build-dir build --rebuild-grid
# Partial rebuilds also support input variables
linnet --build-dir build --input theme=light --rebuild-grid