⭐Getting Started
This page will cover how to install Cosmo make your first program!
Installation
Cosmo Installer
If you want a quick cross-platform setup, then the installer is for you. You can find the latest release for the Cosmo installer here.
From source
If you want to customize your installation, build your own fork of Cosmo, the installer isn't supported on your device, or you just don't want to use the installer, then this is for you.
Download the source code.
Install Crystal.
If on OSX/Linux, run
sudo make install
. That's it. On Windows, just runshards build --release
and add thebin
folder to your PATH.
Writing a "Hello, world" program
To get started writing your first Cosmo app, first create a new folder.

test
.Now, create your Cosmo file. Cosmo sees files named main
or the name of your project as an entry point. I will use the name of my project in this case, test
, to give an example.

A main function is optional in Cosmo, except for if you want to accept the arguments the program was executed with. The args
parameter is also optional. Be sure to mark your main function as public
and return an int
, which will be the exit code of the program.


Last updated