Command-line tools¶
This page inventories the public command-line interface (CLI) for document authors and project maintainers. It keeps command names, aliases, safe defaults, write behaviour, and automation semantics visible in one place.
Start with Publish a document to see each command in the task
that needs it. Run a command from the project
root—the directory containing zensical.toml—unless an option explicitly
names another location.
Use the shorter pdk executable when you prefer it; it is an exact alias.
bootstrap also answers to boot, and source-bundle to source.
Check the installation¶
The first prints the installed release. The second lists the commands supplied by that release. Ask an individual command for its current options:
If a guide and local help disagree, the local help describes the code you are
actually running. Check prodockit --version, then compare it with the version
pinned by the project before assuming an option is unavailable.
Choose a command¶
| Command | Use it when | Safe first run | Writes |
|---|---|---|---|
prodockit bootstrap |
A machine or checkout is not ready to build and publish | prodockit bootstrap |
Only with --apply; configuration questions use --configure |
prodockit init-tools |
The project needs local Mermaid or MathJax rendering tools | prodockit init-tools |
Tool manifests, scripts, and ignore entries; existing files require --force |
prodockit init-mathjax |
The website needs the installed MathJax bundle copied into its assets | prodockit init-mathjax |
Website JavaScript assets and, unless disabled, .gitignore |
prodockit pdf |
You need one PDF containing the pages in nav |
prodockit pdf |
The configured PDF output |
prodockit source-bundle |
A submission needs the Markdown and configuration as a separate PDF | prodockit source-bundle |
The configured source-bundle output |
prodockit sync-repo |
Repository links or badges must match the current remote | prodockit sync-repo --check |
zensical.toml and the managed README badge block without --check |
prodockit pins |
Build-input versions disagree or need a reviewed upgrade | prodockit pins --check --offline |
Matching version declarations when a version is selected |
prodockit template-sync |
A generated project needs later template fixes | prodockit template-sync |
With --apply, template-owned/shared files on a new branch; always appends its ignored log |
The prodockit init-mathjax command is the narrower website
asset command; use init-tools when preparing both Mermaid and maths for PDF
output.
Build and preview¶
Zensical owns the live website commands:
serve watches the source and rebuilds a local preview. The strict build is
the final website check: it starts clean and treats broken links, missing
anchors, and other validation warnings as failures.
Prodockit builds the additional artifacts:
When building both the complete PDF and site, keep this order:
Zensical copies the finished PDF into the site directory. Reversing the order can publish the PDF from the previous build while every command exits successfully.
To render one page while developing PDF styles, use:
That ignores nav and is a quick diagnostic, not a substitute for the final
complete build.
Maintain without changing files¶
Begin with report-only forms:
prodockit sync-repo --check
prodockit pins --check --offline
prodockit template-sync
prodockit bootstrap
These answer four different questions:
- Does repository metadata match
origin? - Do declared build versions agree across files?
- Has the source template changed files it owns?
- Is this machine and checkout ready to build?
Do not replace one with another merely because they all use the word “check”.
Apply and verify a maintenance change¶
-
Read the report
Run the non-writing or check form first. A maintenance command should tell you which files or stages are involved before you authorise writes.
-
Apply only the reported change
Examples:
prodockit sync-repo prodockit pins --set zensical=0.0.55 prodockit template-sync --apply prodockit bootstrap --applypins --setis unattended and leaves unnamed packages untouched.template-sync --applystages its work on a branch but does not commit it.bootstrap --applyperforms only outstanding stages and verifies each one. -
Repeat the check
prodockit sync-repo --check prodockit pins --check --offline prodockit template-sync prodockit bootstrapThe second run should be clean or explain any remaining manual work. Do not treat a changed file as proof that the intended state was reached.
-
Build and inspect
Open the website and PDF when the change can affect rendering. Automated checks catch known failures; visual review answers whether the output is the document you intended to publish.
Use commands in automation¶
Automation must not wait for a prompt. Use explicit non-interactive forms:
Important exit-status behaviour:
| Command | Exit zero means |
|---|---|
sync-repo --check |
Managed repository metadata is already current |
pins --check --offline |
Every discovered declaration agrees; no network comparison was attempted |
pins --check |
Declarations agree and none of the selected PyPI packages is behind |
zensical build --clean --strict |
The site built without a strict validation error |
pytest |
The selected source or built-output checks passed |
The ordinary interactive prodockit pins command is for a terminal, not CI.
Likewise, template-sync --push asks before committing, merging, and pushing;
it is an assisted maintainer operation rather than an unattended deployment
step.
Find the next guide¶
- Maintain prodockit provides the complete recurring cycle.
- Set up a machine takes a new computer through its first successful publish.
- Repository metadata explains every derived link and badge.
- Version pinning and drift covers controlled upgrades and scheduled comparisons.
- Staying in step with the template protects project-owned writing while updating shared infrastructure.
- Build and release covers the package release from branch to PyPI and verified Pages deployment.