Skip to main content
Kairo uses a clean, C-style brace-based syntax inspired by languages like C#, Kotlin, and Swift. Every construct uses {} blocks for scope, statements terminate at newlines without semicolons, and the language enforces explicit structure to keep large codebases predictable and navigable. If you have written code in any modern statically-typed language, Kairo’s syntax will feel immediately familiar — while its business-domain-first conventions give your code a distinctly readable shape.

Modules and File Structure

Every .ak file declares exactly one module using the module keyword at the top of the file. A module name uses dot-separated Pascal-case segments and should reflect the business or technical domain the file represents.
A file must contain exactly one module declaration, and it must appear before any imports or declarations. Omitting a module declaration is a compile error.
Module names are dot-separated identifiers and typically mirror your project’s logical namespace hierarchy. There is no requirement that module names map directly to file-system paths, but keeping them aligned makes projects easier to navigate.

Import Statements

Use import to bring another module’s public declarations into scope. Kairo does not support wildcard imports — every import names a specific module explicitly.

Import with Alias

When two modules share a common short name, or when you simply want a shorter qualifier, use as to assign a local alias:
After this, you can refer to Data.SomeType rather than Astra.Data.SomeType.

Type-Only Import

Use import type when you only need a specific type from a module — for example, to reference it in a signature without pulling in all of the module’s declarations:
Prefer import type for UI or infrastructure types that appear only in signatures. It communicates intent clearly and keeps the module’s dependency surface minimal.
Here is a complete file header showing all three import forms together:

Visibility Modifiers

Kairo has three visibility levels. The default — used when you write no modifier at all — is internal.
private is only valid on members declared inside a type (object or value). You cannot use private on a top-level declaration.

Statement Termination

Kairo does not use semicolons. Each statement ends at the newline. This keeps code vertically readable and avoids the noise of trailing punctuation.
Placing two statements on a single line is not supported — each statement occupies its own line.

Keywords and Contextual Keywords

The following identifiers are reserved as keywords and cannot be used as names:
The following identifiers are contextual keywords — they carry special meaning in certain positions but can appear as regular identifiers elsewhere:

File Naming Conventions

Kairo source files use the .ak extension. File names must be lowercase kebab-case: Keeping file names lowercase and hyphenated makes projects portable across case-sensitive and case-insensitive file systems and avoids ambiguity when multiple developers work on the same codebase.

Putting It All Together

Here is a small but complete .ak file that demonstrates every structural element covered on this page:
Notice that the file name for this module would be confirmation.ak or order-confirmation.ak — lowercase kebab-case, ending in .ak.