Skip to content

Command Line Interface (CLI) ​

ISDL ships a command line tool that generates a Foundry VTT system from an .isdl file without needing VS Code. This is useful for:

  • Automated builds (CI/CD pipelines, scripts)
  • Editors other than VS Code (Neovim, Sublime, Emacs, JetBrains, etc.)
  • Quickly regenerating a system from the terminal

The CLI uses the exact same generator as the VS Code extension, so the output is identical.

Installation ​

Install globally from npm (requires Node.js 18+):

bash
npm install -g intelligent-system-design-language

This adds an isdl command to your PATH. (The longer alias intelligent-system-design-language-cli is also available if you prefer.)

To verify the install:

bash
isdl --version

Usage ​

bash
isdl generate <file> --destination <dir>
Argument / OptionDescription
<file>Path to your .isdl (or legacy .fsdl) source file
-d, --destination <dir>The folder to generate the system into — your Foundry Data/systems folder

Example ​

bash
isdl generate my-system.isdl --destination "~/FoundryVTT/Data/systems"

On success you'll see:

Intelligent System generated successfully: <output path>

Then launch Foundry and activate your new system, exactly as you would when generating from VS Code.

Help ​

bash
isdl --help
isdl generate --help

Running from a cloned repository ​

If you've cloned the repository instead of installing from npm, you can run the CLI directly after building:

bash
cd isdl
npm install
npm run build
node ./bin/cli.js generate my-system.isdl --destination "/path/to/Foundry/Data/systems"

There's also a convenience script:

bash
npm run isdl:generate -- generate my-system.isdl --destination "/path/to/Foundry/Data/systems"

Notes ​

  • Node.js is required. Generation runs a bundling step (Vite) under the hood, so the machine needs Node installed — but it does not need VS Code or Foundry to generate.
  • Dependencies install automatically. npm install -g intelligent-system-design-language pulls everything the generator needs, with the correct platform-specific binaries for your OS.
  • Same output as the extension. Whether you generate from the CLI or from the VS Code extension, the generated system is identical.
  • Your custom code survives regeneration. Hand-written native code in <id>-custom.mjs / <id>-custom.css is never overwritten — see Custom Code & Styles.

Language Server (LSP) — editing outside VS Code ​

The CLI handles compiling. For editing .isdl files, ISDL ships a language server that speaks the standard Language Server Protocol, so any LSP-capable editor (Neovim, Emacs, Sublime, Helix, …) gets:

  • Diagnostics — validation errors and warnings as you type
  • Completion — keyword and reference suggestions
  • Hover — info on symbols
  • Go to definition — jump to referenced documents/fields
  • Formatting

Installing the npm package puts an isdl-lsp command on your PATH:

bash
npm install -g intelligent-system-design-language

The server communicates over stdio when launched with --stdio (the transport editors use):

bash
isdl-lsp --stdio

Neovim ​

Neovim 0.8+ has a built-in LSP client — no plugin required. Register the .isdl filetype and start the server for it:

lua
-- Recognize .isdl files
vim.filetype.add({ extension = { isdl = 'isdl' } })

-- Start the ISDL language server for .isdl buffers
vim.api.nvim_create_autocmd('FileType', {
  pattern = 'isdl',
  callback = function(args)
    vim.lsp.start({
      name = 'isdl',
      cmd = { 'isdl-lsp', '--stdio' },
      root_dir = vim.fs.root(args.buf, { '.git' }) or vim.fn.getcwd(),
    })
  end,
})

If you cloned the repo instead of installing from npm, point cmd at the built server directly:

lua
cmd = { 'node', '/path/to/isdl/out/language/main.cjs', '--stdio' },

Other editors ​

Any editor with LSP support can use the server — configure it to launch isdl-lsp --stdio (or node /path/to/out/language/main.cjs --stdio) for the isdl language / *.isdl files. Consult your editor's LSP client docs for the exact configuration.

Syntax highlighting note: highlighting is delivered to VS Code via a TextMate grammar, which most non-VS-Code editors can't consume directly. The LSP above provides the semantic features (diagnostics, completion, etc.) regardless of editor; dedicated highlighting in editors like Neovim would require a tree-sitter grammar, which is not yet provided.