Make sure you have Forge and Pulse installed before you begin. See the Installation guide for setup instructions.
Create your first Kairo app
1
Create your project directory
Create a new directory for your project and navigate into it. Kairo projects are just folders — there is no scaffolding command yet, so you set them up by hand.Your project will have a simple structure with one manifest file and one source file:
2
Write the package manifest
Create a file named
kairo.toml in your project directory. This is the package manifest — it tells Forge the name, version, language version, and kind of your project.3
Write your first Kairo source file
Create a file named A few things to notice:
main.ak. Every Kairo source file starts with a module declaration that matches your package name. The main function is the entry point of your application.- The
moduledeclaration matches thenameinkairo.toml import Pulse.Consolebrings in the console I/O module from the Pulse standard librarypublicis required onmainso Forge can find it as the entry point- There are no semicolons
4
Check your code with Forge
Before building, run If everything is correct, you will see output similar to:
forge check to validate your code without producing any output files. This is the fastest way to catch type errors and syntax issues during development.5
Build your application
Run A successful build looks like this:Your compiled application is now ready to run.
forge build to compile your project. Forge reads kairo.toml, resolves dependencies, compiles all .ak source files, and writes the output to the build directory.6
Run your application with Pulse
Use You should see your message printed to the console:That’s it — you’ve written, built, and run your first Kairo application.
pulse run to execute your compiled application with the Pulse runtime.Trying different entry point signatures
Kairo supports several valid signatures for themain function. You can return an exit code or a Result if your application needs to signal success or failure.
All three signatures also have
async variants — for example, public async func main() — for applications that need to perform asynchronous work at startup.What’s next?
Now that your first program is running, explore the rest of the language and toolchain.Language Syntax
Learn Kairo’s syntax, keywords, and core constructs in detail.
Types
Explore Kairo’s built-in types and how to define your own value and object types.
Forge CLI
Master the full Forge command set: restore, build, test, package, and publish.
