Getting Started
Thinai is a domain-specific modeling language for domain-driven design. The guides on this site introduce the language and its current syntax. Thinai is in alpha; syntax and language-service behavior may still change between releases.
Requirements
Section titled “Requirements”- Visual Studio Code 1.91 or newer for the editor extension
- Node.js 22 or newer for the CLI and the language package
The editor extension bundles the language server. You do not need a separate language-server installation to use Thinai in VS Code.
Install the editor extension
Section titled “Install the editor extension”Install the pre-release version from the Visual Studio Marketplace:
code --install-extension thinai-lang.vscode-thinai --pre-releaseYou can also search for Thinai in the Extensions view and select Install
Pre-Release Version. The extension provides diagnostics, completion,
navigation, formatting, and import quick fixes for .tni files.
Open a folder that contains .tni files. The extension activates on .tni
files and builds the model from the file and its imports.
Install the CLI
Section titled “Install the CLI”npm install -g thinai-cli@alphathinai-cli --versionYou can also run it without a global install:
npx thinai-cli@alpha --versionUse the CLI
Section titled “Use the CLI”The CLI generates a JavaScript summary, exports the model graph, produces task-scoped context slices, reports model impact, validates models, and runs a read-only MCP server.
# Generate the JavaScript summarythinai-cli generate path/to/model.tni
# Export the model graphthinai-cli inspect path/to/model.tni --out model.json
# Get one aggregate or context and its dependenciesthinai-cli context path/to/model.tni Aggregate:Ordering.Order --format md
# Report elements affected by a changethinai-cli impact path/to/model.tni ValueObject:Ordering.Order.OrderId --json
# Validate the source file and its transitive importsthinai-cli validate path/to/model.tni
# Start a read-only MCP serverthinai-cli mcp path/to/model.tniPass --destination <dir> to choose the generation output directory.
The CLI validates the source file and its transitive imports. It does not discover separate files that import the source file. Use the VS Code extension or another workspace-aware client when you need to validate the complete import-connected model, including importers.
See agent workflow for the model-first workflow and MCP tools.
Use the language package
Section titled “Use the language package”npm install thinai-language@alphaThe package exports the language services used by the CLI and the editor extension.
Examples
Section titled “Examples”The Order Fulfillment example is a complete multi-file model that exercises imports, modules, context maps, events, and published query contracts. The Language Tour is a compact syntax and visibility tour.
Source and support
Section titled “Source and support”The Thinai source repository is private during the alpha. Report bugs and feature requests in the public issue tracker. See alpha notes and limitations before relying on the extension for production work.
Learn the language
Section titled “Learn the language”Start with the language model for strategic DDD concepts, then read tactical modeling and events and behavior.