1. Introduction
  2. Editor Integration
  3. Common Configurations
  4. 1. Editor Frontends
    1. 1.1. VS Cod(e,ium)
    2. 1.2. Neovim
    3. 1.3. Emacs
    4. 1.4. Sublime Text
    5. 1.5. Helix
    6. 1.6. Zed
  5. Features
  6. 2. Command line interface
  7. 3. Code Documentation
  8. 4. Code Completion
  9. 5. Exporting Documents
  10. 6. Document Preview
  11. 7. Testing
  12. 8. Linting
  13. 9. Other Features
  14. Service Overview
  15. Overview of Service
  16. 10. Principles
  17. 11. Commands System
  18. 12. LSP Inputs
  19. 13. Type System
  20. Service Development
  21. 14. Crate Docs
  22. 15. LSP and CLI
  23. 16. Language Queries
  24. 17. Document Preview

Tinymist Docs

The difference between typst-cli and tinymist-cli is that the latter one focuses on the features requiring code analysis or helping the language server. For example, tinymist-cli also provides a compile command, but it doesn't provide a query or watch command, which are provided by typst-cli. This is because tinymist compile also collects and saves the compilation commands needed by the language server.

#

Servers

#

Starting a Language Server Following LSP Protocol

To start a language server following the Language Server Protocol, please use the following command:

1
tinymist lsp
1
tinymist lsp

Or simply runs the CLI without any arguments:

1
tinymist
1
tinymist

#

Starting a Preview Server

To start a preview server, please use the following command:

1
tinymist preview path/to/main.typ
1
tinymist preview path/to/main.typ

See Arguments.

#

Starting a debug adapter Server Following DAP Protocol

To start a debug adapter following the Debug Adapter Protocol, please use the following command:

1
tinymist dap
1
tinymist dap

#

Commands

#

Compiling a Document

The tinymist compile command is compatible with typst compile:

1
tinymist compile path/to/main.typ
1
tinymist compile path/to/main.typ

To save the compilation command to the lock file:

1
tinymist compile --save-lock path/to/main.typ
1
tinymist compile --save-lock path/to/main.typ

To save the compilation command to the lock file at the path some/tinymist.lock:

1
tinymist compile --lockfile some/tinymist.lock path/to/main.typ
1
tinymist compile --lockfile some/tinymist.lock path/to/main.typ

The lock file feature is in development. It is to help the language server to understand the structure of your projects. See Configuration: tinymist.projectResolution.

#

Running Tests

To run tests, you can use the test command, which is also compatible with typst compile:

1
tinymist test path/to/main.typ
1
tinymist test path/to/main.typ

The test command will defaultly run all the functions whose names are staring with test- related the the main file:

1
#let test-it() = []
1
#let test-it() = []

See Docs: Testing Features for more information.

#

Generating shell completion script

To generate a bash-compatible completion script:

1
tinymist completion bash
1
tinymist completion bash

Available values for the shell parameter are bash, elvish, fig, fish, powershell, zsh, and nushell.