Installation
Koine ships as source. You clone the repository and build it with the .NET SDK; the CLI is packaged
as a .NET tool, so you can also install a short koine command instead
of typing dotnet run each time — see Install the koine command below.
Prerequisites
Section titled “Prerequisites”-
.NET 10 SDK or newer. The whole solution targets
net10.0. Check what you have:Terminal window dotnet --versionIf you don’t see a
10.xSDK, install it from the .NET download page. -
Git, to clone the repository.
That’s the entire toolchain. Koine has no other runtime dependencies — the compiler is a plain .NET console app, and the C# it emits is self-contained.
Clone and build
Section titled “Clone and build”git clone https://github.com/Atypical-Consulting/Koine.gitcd KoineBuild the solution and run the test suite in one shot:
./scripts/build/build.shscripts/build/build.sh is a thin wrapper around the SDK — it runs dotnet build followed by
dotnet test. If you prefer to drive the SDK yourself (or you’re on Windows), the equivalent is:
dotnet builddotnet testA green test run means the compiler is ready to use.
Invoke the CLI
Section titled “Invoke the CLI”The compiler lives in the Koine.Cli project. You run it with dotnet run --project, passing the
compiler’s own arguments after a -- separator:
dotnet run --project src/Koine.Cli -- <args>Everything before -- is for dotnet run; everything after is for Koine. Start by confirming it
works:
dotnet run --project src/Koine.Cli -- --version1.0.0.0Run it with no arguments (or --help) to see the full usage:
dotnet run --project src/Koine.Cli -- --helpKoine — a DSL for Domain-Driven Design.
Usage: koine --version koine build <file.koi|dir> [--target csharp|glossary] [--out <dir>] [--glossary <file.md>] [--config <file>] koine watch <file.koi|dir> [--target …] [--out …] [--config <file>] # rebuild on every change koine fmt <file.koi|dir> [--check] # canonically format .koi (--check: verify only) koine init [dir] [--force] # scaffold a starter project koine check <file.koi|dir> --baseline <dir> # flag breaking changes vs a published baseline koine lsp # Language Server (stdio) for editor diagnosticsBuild your first model
Section titled “Build your first model”The repository ships a starter model at templates/starters/billing/billing.koi. Just checking that a model parses and
validates — no output written — is the fastest round-trip:
dotnet run --project src/Koine.Cli -- build templates/starters/billing/billing.koiOK: templates/starters/billing/billing.koi parsed and validatedTo actually emit C#, add --target csharp and an --out directory:
dotnet run --project src/Koine.Cli -- build templates/starters/billing/billing.koi --target csharp --out ./generatedwrote 15 files to ./generatedThe generated C# under ./generated is self-contained — it compiles on its own, with no reference to
Koine. That build argument is the heart of the compiler; the
CLI reference covers build, check, the glossary target, and the LSP
server in full.
Install the koine command
Section titled “Install the koine command”Typing dotnet run --project src/Koine.Cli -- … for every invocation gets old fast. There are two
ways to get a short koine command.
Install as a global tool
Section titled “Install as a global tool”The CLI is packaged as a .NET tool (PackAsTool, command name koine). Pack it from source, then
install it globally:
dotnet pack src/Koine.Cli -c Release -o ./nupkgdotnet tool install -g --add-source ./nupkg Koine.Clikoine --version0.17.3koine is now on your PATH, so every example in the docs works verbatim — koine build …,
koine fmt …, koine init …. Update later with dotnet tool update -g --add-source ./nupkg Koine.Cli,
or remove it with dotnet tool uninstall -g Koine.Cli.
Or publish a self-contained binary
Section titled “Or publish a self-contained binary”If you’d rather not install a tool, publish the CLI once and alias the produced binary to koine:
dotnet publish src/Koine.Cli -c Release -o ./binalias koine="$PWD/bin/Koine.Cli"koine --versionNext steps
Section titled “Next steps”With the compiler building, you’re ready to write your own .koi model.
- Your first model — write a bounded context from scratch and read the C# it emits.
- CLI reference — every command, flag, and exit code.