Getting Started


You can install LiTScript from npm as a global tool.

> npm install --global litscript

This will add a new command line tool called lits.


You can scaffold an existing project to use LiTScript by cding to the project directory and then running command:

> lits init

LiTScript will ask a series of questions about your project and documentation settings and create a litsconfig.json file based on them. If it finds a .vscode directory under your project folder, it can add references to JSON schemas used by LiTScript into your settings.json file.

Additionally, you might want to set configuration properties in litsconfig.json that automatically update table of contents and exclude files/folders in the project directory. Below are example settings.

    "updateToc": true,
    "exclude": [


You can run LiTScript either manually by executing command

> lits

or automatically each time a source file changes using

> lits --watch


> lits --serve

which starts the development server in watch mode.

If you opted to add scripts in package.json then you can also run LiTScript with npm, or from VS Code menu.

> npm run lits


> npm run lits-watch


GitHub Pages Another good practice is to output the documentation to the docs folder under your project folder. If your project lives in GitHub, you can publish your documentation simply by choosing master branch/docs folder as the source for your GitHub Pages site. You can find this option under project settings in GitHub.

Migrating from 1.3

LiTScript 2.0 is a major release and contains multiple breaking changes to version 1.3: