| Crates.io | oicana_cli |
| lib.rs | oicana_cli |
| version | 0.1.0-alpha.7 |
| created_at | 2025-01-31 10:53:09.07239+00 |
| updated_at | 2025-12-04 23:00:35.949264+00 |
| description | CLI for working with Oicana templates. |
| homepage | https://oicana.com |
| repository | https://github.com/oicana/oicana |
| max_upload_size | |
| id | 1537421 |
| size | 178,054 |
Dynamic PDF Generation based on Typst
Oicana offers seamless PDF templating across multiple platforms. Define your templates in Typst, specify dynamic inputs, and generate high quality PDFs from any environment - whether it's a web browser, server application, or desktop software.
Oicana is in Alpha! It is rough around the edges and has a limited number of integrations.
The getting started guide demonstrates how to
Integrations allow you to use Oicana templates from different platforms and programming languages.
Ready to use:
You can find an open source example project in the Oicana GitHub organization for every available integration. The example project for the browser integration is deployed to https://example.oicana.com (not compatible with some mobile browsers).
More integrations are planned. If you are missing a specific one, please open a GitHub issue or sent us an e-mail at
hello@oicana.com. This helps with prioritizing.
For more details, please take a look at the documentation.
An Oicana template consists of
.typ filestypst.toml manifest with
name, version, entrypoint and tool.oicana.manifest_version valuesOicana templates are "normal" Typst projects and can be worked on in the official Typst editor or any other editor with Typst support.
You can find a couple of open source example templates on GitHub.
The Oicana Typst package has to be set up for every template. It will handle inputs for you and fall back on their default or development values when needed.
The package needs minimal setup:
#import "@preview/oicana:0.1.0": setup
#let read-project-file(path) = return read(path, encoding: none);
#let (input, oicana-image, oicana-config) = setup(read-project-file);
The example templates showcase how to use the return values of the setup function.
Snapshot tests can be defined for every template. The CLI described in the next section has an oicana test command.
There are no binaries of the CLI published yet. Install the current CLI with
cargo install --path tools/oicana_clifrom a clone of this repository.
You can find more information on the CLI in the documentation and with the oicana help command.
Packing Oicana templates is required to use templates with integrations.
Example commands to package templates:
oicana pack --all - pack all templates in the current directory (including child directories)
oicana pack templates/invoice -o output - pack the template in the templates/invoice directory and put the output into the output directory
The compile command will create pdf, png, or svg files from unpacked templates.
Example commands to compile templates:
oicana compile templates/invoice -f pdf -j invoice=templates/invoice/invoice.json -b logo=templates/invoice/logo.jpg
oicana compile templates/table -j input=templates/table/data.json
oicana compile templates/package -j input=templates/package/sample.json
Example commands to test templates:
oicana test - run all tests of all templates in the current directory (including child directories)
oicana test templates/invoice - run the tests of the template in the directory templates/invoice
/ɔɪkɑna/
Oicana is source-available under PolyForm Noncommercial License 1.0.0. You can use it for free in any noncommercial context.
If you would like to use Oicana in a commercial capacity, please contact us at hello@oicana.com.
The Typst integration and several example projects in the Oicana GitHub organization are open source under their respective licenses. The example projects depend on Oicana integrations that are licensed under the before mentioned PolyForm Noncommercial License 1.0.0.
See NOTICE for a report of licenses in this project.