CLI reference¶
ope and obsidian-pdf-exporter are the same command. Run ope --help or ope <command> --help for the same information in the terminal.
| Command | Summary |
|---|---|
version |
Print the installed version. |
setup |
Install missing system dependencies (Pango/HarfBuzz/Fontconfig, pandoc). |
list-templates |
List all known PDF templates (built-in, packaged, user-config, runtime). |
list-plugins |
List all installed Obsidian-plugin support modules (built-in + third-party). |
export |
Export an Obsidian-format folder tree to a single PDF file. |
redline |
Generate a redline (tracked-changes) PDF between two versions. |
version¶
Print the installed version.
Prints the installed version. ope --version does the same.
setup¶
Install missing system dependencies (Pango/HarfBuzz/Fontconfig, pandoc).
Installs missing native dependencies (Pango, HarfBuzz, Fontconfig and pandoc) with the package manager of the platform. See Installation.
| Option | Description | Default |
|---|---|---|
--check |
Diagnose only — do not install anything (exit 1 if something is missing) | off |
-y, --yes |
Skip the confirmation prompt | off |
list-templates¶
List all known PDF templates (built-in, packaged, user-config, runtime).
Prints every known template with its source: built-in, packaged entry point, user-config folder or registered at runtime. See Templates.
list-plugins¶
List all installed Obsidian-plugin support modules (built-in + third-party).
Prints every installed plugin support module, sorted by priority. See Plugins.
export¶
Export an Obsidian-format folder tree to a single PDF file.
Builds one PDF from a vault folder. Git is not required. When the folder is in a git repository and --version is not set, the short commit hash is shown as the version label. See Folder Notes for how the folder becomes sections.
| Argument | Description |
|---|---|
ROOT |
Path to the vault folder to export (required) |
| Option | Description | Default |
|---|---|---|
-T NAME\|PATH, --template NAME\|PATH |
Template name (see list-templates) or path to a custom template (.css file or directory with template.yaml) |
default |
-o PATH, --output PATH |
Output PDF path (default: ./.export/<title>.pdf) | |
-t TEXT, --title TEXT |
Document title (default: folder name) | |
--subtitle TEXT |
Document subtitle | |
-v TEXT, --version TEXT |
Document version (e.g. 3.1.0) | |
-d YYYY-MM-DD, --date YYYY-MM-DD |
Document date (YYYY-MM-DD, default: today) | |
--include NAME |
Only include these subfolder names. Repeatable. | |
--exclude NAME |
Exclude these subfolder names. Repeatable. | |
-O KEY=VALUE, --option KEY=VALUE |
Pass key=value options to plugins / template (repeatable) | |
--disable-plugin NAME |
Skip the named Obsidian plugin (repeatable; see list-plugins) |
|
--toc/--no-toc |
Include a table of contents at the start of the document | --toc |
--blame |
Add a strip next to every page with the last commit that changed each block (author, date, message; details on hover) | off |
--debug |
Keep the intermediate build directory for inspection | off |
ope export ./Vault/Handbook \
--title "Team handbook" --subtitle "How we work" \
--version 3.1.0 --date 2026-05-07 \
--include "Chapter A" --include "Chapter B" \
--disable-plugin meta_bind \
-O mermaid.landscape=off -O tables.landscape=off
redline¶
Generate a redline (tracked-changes) PDF between two versions.
Builds a tracked-changes PDF between two git commits of ROOT (--from-commit, run inside the git repository that holds ROOT), or between two folders or notes on disk without git (--from-path). See Redline and Comparing versions.
| Argument | Description |
|---|---|
ROOT |
Folder or note to compare (with --from-path: the newer version on disk) (required) |
| Option | Description | Default |
|---|---|---|
--from-commit REF |
Older git commit ref (baseline) | |
--to-commit REF |
Newer git commit ref (default: HEAD) | |
--from-path PATH |
Older version as a folder or note on disk (baseline), compared with ROOT on disk without git; not with --from-commit, --to-commit or --blame | |
-T NAME\|PATH, --template NAME\|PATH |
Template name (default: redline) or path to a custom template (.css file or directory with template.yaml) | redline |
-o PATH, --output PATH |
Output PDF path (default: ./.export/<title>_redline.pdf) | |
-t TEXT, --title TEXT |
Document title (default: folder or note name) | |
--subtitle TEXT |
Document subtitle | |
-O KEY=VALUE, --option KEY=VALUE |
Pass key=value options to plugins / template (repeatable), e.g. redline.style=side-by-side or redline.collapse=on | |
--disable-plugin NAME |
Skip the named Obsidian plugin (repeatable; see list-plugins) |
|
--toc/--no-toc |
Include a table of contents at the start of the document | --toc |
--blame |
Add a strip next to every page with the last commit that changed each block (author, date, message; details on hover) | off |
--debug |
Keep the intermediate build directory for inspection | off |
Options for -O key=value¶
-O (--option) passes free-form settings to the core steps, the plugins and
the template. These keys are read by ope itself:
| Key | Values | Default | Described in |
|---|---|---|---|
line_breaks |
hard, soft |
from .obsidian/app.json |
Line breaks |
links.outside |
text, italic |
text |
Wiki links |
tables.landscape |
auto, on, off |
auto |
Tables |
tables.landscape_min_cols |
number | 6 |
Tables |
mermaid |
off |
on | Mermaid |
mermaid.config |
path to JSON | none | Mermaid |
mermaid.max_height |
CSS length | none | Mermaid |
mermaid.landscape |
on, off |
on |
Mermaid |
mermaid.landscape_ratio |
number | 1.4 |
Mermaid |
mermaid.landscape_min_font |
points | 7 |
Mermaid |
mermaid.fit |
on, off |
on |
Mermaid |
footnotes |
page, end |
page |
Footnotes |
pdf_embeds |
pages, link |
pages |
Embeds |
pdf_embeds.max_pages |
number | 10 |
Embeds |
pdf_embeds.dpi |
number | 150 |
Embeds |
citations |
off |
on | Citations |
citations.bibliography |
paths, separated by , |
auto | Citations |
citations.csl |
path to a CSL style | Chicago author-date | Citations |
citations.title |
text | References |
Citations |
excalidraw.auto_export |
on, off |
on |
Excalidraw |
Third-party plugins and templates can read any other key. By convention a
plugin uses <plugin>.<key> and a template <template>.<key>.
Environment variables¶
| Name | Purpose |
|---|---|
OBSIDIAN_PDF_GTK_PATH |
Extra folders, separated by os.pathsep, that are searched for the GTK and Pango libraries (Windows and macOS). |
OBSIDIAN_PDF_EXPORTER_TEMPLATES_DIR |
Folder scanned for named user templates. Default: $XDG_CONFIG_HOME/obsidian-pdf-exporter/templates, or ~/.config/obsidian-pdf-exporter/templates. |
XDG_CONFIG_HOME |
Moves the default user templates folder. |
Exit codes¶
| Code | Meaning |
|---|---|
0 |
Success. |
1 |
The export failed, setup --check found a missing dependency, an install command failed, or redline ran outside a git repository. |
2 |
Bad arguments, for example an unknown template or a malformed -O value. |
130 |
Aborted at the setup confirmation prompt. |