Skip to main content

Manage Typst templates and documents from the command line

Project description

typst-manager

A command-line tool to manage Typst templates and documents.

Create a personal library of reusable templates. Spin up new documents from them in seconds. Everything lives in plain folders — no database, no lock-in.


Installation

Requirements: Python 3.9 or higher.

Linux / macOS

curl -sSL https://raw.githubusercontent.com/orvizz/typst-manager/main/install.sh | bash

Or with pipx:

pipx install typst-manager

Windows

irm https://raw.githubusercontent.com/orvizz/typst-manager/main/install.ps1 | iex

Or with pipx:

pipx install typst-manager

From source

git clone https://github.com/orvizz/typst-manager
cd typst-manager
pip install -e .

Verify

typst-manager --help

Where files are stored

OS Default location
Linux ~/.local/share/typst-manager/
macOS ~/Library/Application Support/typst-manager/
Windows %APPDATA%\typst-manager\

Override at any time with the TYPST_MANAGER_HOME environment variable:

export TYPST_MANAGER_HOME=/path/to/custom/dir   # Linux / macOS
set TYPST_MANAGER_HOME=C:\path\to\custom\dir    # Windows

Quick start

# 1. Create a blank template (opens in your editor)
typst-manager template create article

# 2. Or save a document you're already working on as a template
typst-manager template create letter --from ~/docs/my-letter/

# 3. List your templates
typst-manager template list

# 4. Create a new document from a template
typst-manager new my-report --template article

Commands

typst-manager new

Create a new document from a template. The template is copied into a new folder inside the current directory (or --out if given).

typst-manager new <name> --template <template-name> [--out <dir>]
typst-manager new quarterly-report --template report
typst-manager new thesis --template academic --out ~/documents

typst-manager template

create

Create a new template. Four modes:

# Start from a boilerplate (main.typ, template.typ, metadata.typ, sources.bib)
typst-manager template create <name>

# Save an existing document folder as a template (compiled .pdf files excluded)
typst-manager template create <name> --from path/to/document/

# Import a single .typ file as the template's main.typ
typst-manager template create <name> --from path/to/file.typ

# Duplicate an existing template
typst-manager template create <name> --from <other-template-name>
Option Description
--from <source> Directory, .typ file, or existing template name
-d, --description Short description shown in template list

edit

Open a template's folder in your configured editor.

typst-manager template edit <name>

rename

Rename a template.

typst-manager template rename <name> <new-name>

delete

Delete a template permanently.

typst-manager template delete <name>
typst-manager template delete <name> --yes   # skip confirmation

list

List all templates with their descriptions.

typst-manager template list
NAME                 DESCRIPTION
------------------------------------------------------------
academic             Two-column academic paper
article              Clean article with header
report               Formal report with cover page

typst-manager config

show

Print current configuration and storage paths.

typst-manager config show

set

Change a configuration value.

typst-manager config set editor nvim
typst-manager config set author "Jane Doe"
Key Values Description
editor system, vim, nvim, code Editor used to open template folders
author any string Stored for your reference

typst-manager man

Open the full reference manual.

typst-manager man

On Linux and macOS the man page is opened with man(1). On Windows it is printed to the terminal.


Template structure

When you create a blank template, typst-manager generates a ready-to-use boilerplate:

<data-dir>/templates/<name>/
├── main.typ        entry point — imports template.typ and metadata.typ
├── template.typ    page layout and typographic styles
├── metadata.typ    document metadata (title, author, date…)
├── sources.bib     BibTeX bibliography with a sample entry
└── meta.toml       template name and description (not copied to documents)

Configuration file

Stored at <data-dir>/config.toml:

[core]
editor = "nvim"

[user]
author = "Jane Doe"

Development

git clone https://github.com/orvizz/typst-manager
cd typst-manager
pip install -e ".[dev]"
pytest tests/

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

typst_manager-0.2.0.tar.gz (20.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

typst_manager-0.2.0-py3-none-any.whl (19.4 kB view details)

Uploaded Python 3

File details

Details for the file typst_manager-0.2.0.tar.gz.

File metadata

  • Download URL: typst_manager-0.2.0.tar.gz
  • Upload date:
  • Size: 20.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for typst_manager-0.2.0.tar.gz
Algorithm Hash digest
SHA256 bc62d7dea85373a35df377644527dd1d015139df96893375ee515aab69130331
MD5 d133591757c5d4417597c5c3371f1efe
BLAKE2b-256 4ebda8d3fdc548f1180f29ef8e7cfe8be08becfbf10c835ae892a4aabf929599

See more details on using hashes here.

File details

Details for the file typst_manager-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: typst_manager-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 19.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for typst_manager-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c6060720eaa6cae1bcc5a40fc37a1bfa07f0149e07118a8b506f896a6f81e9a5
MD5 ffdc52ee290f357d6703812ae3a7f4f5
BLAKE2b-256 702a762eccdcd495b1e585326a8c4c3c2bcc3435b2f0dc5f4b1a0a0deeb75cde

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page