Skip to content
लिपि lipi

सुरु Start

Getting started

Install lipi, write a .lip file and run it.

Install

On macOS or Linux, paste this into a terminal:

curl -fsSL https://raw.githubusercontent.com/RusilKoirala/lipi/master/install.sh | sh

On Windows, download and run lipi-setup.exe.

Both add lipi to your PATH. Open a new terminal and check:

lipi --version

The install page has step-by-step help and other options.

Write a program

Lipi programs live in files ending in .lip. Create namaste.lip:

// Lines starting with // are comments.
rakha naam = "Sita";
rakha umer = 21;

bhana("Namaste,", naam);
bhana("Arko barsa", umer + 1, "barsa pugnuhunchha.");

Run it

lipi namaste.lip
Namaste, Sita
Arko barsa 22 barsa pugnuhunchha.

bhana prints every value you give it, separated by spaces, and ends the line.

The rules in short

  • Every statement ends with a semicolon ;.
  • A block that ends with }, such as a yadi or a named kaam, does not need one.
  • Names can use letters, digits and _, but cannot start with a digit: naam, umer2, mero_naam.
  • Comments start with // and run to the end of the line.

If you break one of these rules, Lipi stops and tells you where. Try deleting a ; and running again:

Galti: line 2 ma semicolon birsiyo

Found a mistake on this page? Edit it on GitHub.