CLI
Site commands search upward from the current working directory for tola.toml. Pass -C to target a config file elsewhere:
tola inspect -C ../docs-site/tola.toml configCommands
| Command | Purpose |
|---|---|
tola dev | Start the local dev server, watch files, and rebuild on change. |
tola check | Compile and validate output paths and internal links without writing public/. |
tola preview | Build once with production settings in memory and serve locally. |
tola build | Write the verified output atomically to publish-dir (default public/). |
tola fmt | Format site Typst sources per [formatter] (--check verifies formatting only). |
tola doctor | Inspect config, paths, hooks, and external tools on this machine. |
Dev server
tola dev # Listen on 127.0.0.1:5277 by default
tola dev --port 0 # Pick an available port automatically
tola dev --no-reuse # Re-run all hooks on every rebuild
tola dev --json # Emit one JSON event per line on stdoutWhen a rebuild fails, tola dev keeps serving the last successful build and prints full diagnostics in the terminal. External wrappers can watch tola dev --json for server-ready, build-finished, and hook-finished events (parse in Nu with lines | each {|line| $line | from json }).
Check and build
tola check --no-hooks # Skip hooks and reuse existing files on disk
tola check --no-build # Check standalone Typst syntax only
tola check --json --pretty # Emit JSON with pages, routes, references, and diagnostics
tola preview --base-path /docs/ # Override base-path for one local preview
tola build -o public-review # Write to an alternate directory inside the projectTroubleshooting
Run read-only inspect commands to diagnose missing pages, merged config, fonts, or icons:
| Symptom | Command | Likely cause |
|---|---|---|
| New page missing | tola inspect sources | Extension is not lowercase .typ, under a hidden directory or symlink, or filtered by draft: true. |
| Unexpected config or hook order | tola inspect config --mode dev | include merge precedence, or hook dev / enabled-by settings. |
| Missing SVG/PDF glyphs | tola inspect fonts | Font missing from [typst.fonts], or system fonts disabled by --pure. |
| Icon lookup error | tola inspect icons | Misspelled collection name, or missing icon.with(module: get-module().name) inside a module. |
| External tool failure | tola doctor | Hook binary missing from PATH, or invalid directory configuration. |
All inspect subcommands accept --json (with --pretty). Add -v, -vv, or --log-file debug.log for detailed execution traces.
Editor & LSP
Tola ships a site-aware Typst language server (tola lsp) and embedded Nushell language server (tola nu --lsp) for completion, hover docs, go-to-definition, rename, and live diagnostics.
tola editor setup --list
tola editor setup vscode --dry-run
tola editor setup vscodetola editor setup <editor>generates package stubs and merges workspace config (e.g.vscode,helix) without overwriting unrelated settings.- Add
--nu(such astola editor setup helix --nu) to enable the embedded Nushell LSP alongside Typst. - Run
tola editor packagesafter upgrading Tola to refresh editor stubs for@tola/*and modules. - Other LSP-capable editors can print a starter snippet with
tola editor template <editor>or launchtola lspdirectly (falls back to default config if notola.tomlis found). tola fmtandtola lspshare the[formatter]settings intola.toml.
More commands
tola help/tola help -i: Offline terminal reference and interactive browser (see Reference).tola skill --list: Task-oriented guides in the terminal or exported to Markdown.tola <alias> --help: Subcommands registered by configured modules (for instancetola docs guide).tola query: Run named module queries or extract#metadata(...)from standalone.typfiles.tola nu: Run scripts with embedded Nushell or call@tola-scripts/*.tola update/tola vendor: Updatetola.lockand bundle offline dependencies.tola module check/tola module pack: Validate and package standalone modules.tola completions/tola manpage: Generate shell completions and man pages.