1. Introduction
  2. User Guide
  3. 1. Installation
  4. 2. Get Started
  5. 3. Frequently Asked Questions
  6. 4. Further reading
  7. Reference Guide
  8. 5. Command Line Tool
    1. 5.1. init
    2. 5.2. build
    3. 5.3. serve
    4. 5.4. clean
    5. 5.5. completions
  9. 6. Format
    1. 6.1. book.typ
      1. 6.1.1. Book Metadata
        1. 6.1.1.1. Draft chapter
      2. 6.1.2. Build Metadata
    2. 6.2. Theme
    3. 6.3. Typst Support
      1. 6.3.1. Cross Reference
        1. 6.3.1.1. Cross Reference Sample
      2. 6.3.2. Embed Sanitized HTML Elements
        1. 6.3.2.1. Multimedia components
      3. 6.3.3. Semantic Page Description
    4. 6.4. Rendering Tests
  10. 7. For developers
    1. 7.1. Typst-side APIs
    2. 7.2. shiroa CLI Internals
    3. 7.3. Alternative Backends

shiroa

#

Installation

There are multiple ways to install the shiroa CLI tool. Choose any one of the methods below that best suit your needs.

#

Pre-compiled binaries

Executable binaries are available for download on the GitHub Releases page. Download the binary for your platform (Windows, macOS, or Linux) and extract the archive. The archive contains an shiroa executable which you can run to build your books.

To make it easier to run, put the path to the binary into your PATH.

#

Build from source using Rust

To build the shiroa executable from source, you will first need to install Yarn, Rust, and Cargo. Follow the instructions on the Yarn installation page and Rust installation page. shiroa currently requires at least Rust version 1.75.

To build with precompiled artifacts, run the following commands:


        
cargo install --git https://github.com/Myriad-Dreamin/shiroa --locked shiroa

        
cargo install --git https://github.com/Myriad-Dreamin/shiroa --locked shiroa

To build from source, run the following commands (note: it depends on yarn to build frontend):


        
git clone https://github.com/Myriad-Dreamin/shiroa.git

        
git submodule update --recursive --init

        
cargo run --bin shiroa-build

        
# optional: install it globally

        
cargo install --path ./cli

        
git clone https://github.com/Myriad-Dreamin/shiroa.git

        
git submodule update --recursive --init

        
cargo run --bin shiroa-build

        
# optional: install it globally

        
cargo install --path ./cli

With global installation, to uninstall, run the command cargo uninstall shiroa.

Again, make sure to add the Cargo bin directory to your PATH.