Let’s learn Ballerina!

Ballerina is meant to be a quick start for anyone with prior programming experience. Let’s get you going on to happy dancing!

Getting set up to dance


Download a Ballerina installer and install Ballerina on your machine.

Download Ballerina

Distributions are available for
Linux, OS X, and Windows.

For more information, see Getting Started


To set up your IDE, download the VS Code or IntelliJ IDEA plugin from their marketplaces and install it.

For instructions, see VS Code or IntelliJ IDEA.


Take a Quick Tour using your IDE to run a simple hello world service and call a web API.

Learn the language and the libraries

Need to understand a particular feature? Check out an example about it!

Learn the “batteries-included” standard library.

The Standard Library

Get an in-depth understanding of the language and its design.

Language Specification

Learn the “ballerina” command

The “ballerina” command is your one-stop-shop for all things Ballerina. Here’s all that you can do with it and what they mean:

`ballerina COMMAND ARGS`

Get started

These commands help you check your installation and know that things are set up smoothly.

version Tells you the version of Ballerina you have installed.
home Prints out the location of you current Ballerina distribution. This is useful if you need to help your IDE plugin figure out where Ballerina is.

Build, test & run programs

These commands are your best friends! These everyday commands are for the very basics of being a Ballerina programmer: from compiling and running programs to testing them to generating their documentation.

build Compile a Ballerina program, a single .bal file, an entire project or a single root module into an executable jar file.
test Run tests of a particular module or all the modules of a Ballerina project.
run Build and run a Ballerina program, a single .bal file, an entire project or a previously built program.
clean Clean all artifacts generated by the build command for a project.
doc Generate API documents for all public symbols of a Ballerina module or project.
format Format Ballerina source files as per the Ballerina style guide.

Work with Ballerina Central

Ballerina Central is how you share Ballerina modules with others in a safe, secure, dependable way.

search Search Ballerina Central for modules.
pull Pull a module from Ballerina Central.
push Upload a module to Ballerina Central.

Manage projects

Ballerina projects are the way to organize real world Ballerina development tasks. Learn more about it in this How-To.

new Create a Ballerina project.

Use the supporting tools

These powerful supporting tools extend Ballerina to various ecosystem technologies that are inherently cloud native. This functionality will grow over time and will even be developer extensible in the future.

encrypt Use this tool to encrypt sensitive data and pass them to a Ballerina program via the configuration system.
openapi This is the OpenAPI (Swagger) stub / skeleton generation tool. Read this How-To for more information.
grpc This is the gRPC stub / skeleton generation tool.

How To’s

Structuring Ballerina Code

How to use Ballerina to fetch, build, create, version, search, and install Ballerina modules with repositories that are local and remote.

Documenting Ballerina Code

How to document your Ballerina programs and modules in order to generate API documentation.

Testing Ballerina Code

How to write testable Ballerina code using its built-in test framework, which provides a set of building blocks to help write tests.

Running and Deploying Ballerina Services

How to configure your runtime services and generate deployment artifacts for various targets including Docker and Kubernetes.

Publishing Modules on Ballerina Central

How to share your local modules with the Ballerina community using Ballerina Central.

Observing Ballerina Services

How to use logging, metrics, and tracing to observe Ballerina services.

Writing Secure Ballerina Code

How to write secure Ballerina services, while demonstrating different security features and controls available within Ballerina.

Ballerina Style Guide

How to maintain a standard coding style among the Ballerina community.

Extending Ballerina

How to add additional compile-time behavior using compiler extensions and annotations.

Generating Ballerina Code for Protocol Buffer Definitions

How to generate Ballerina connector and service code for your existing Protocol Buffer definition.

Developing Ballerina Services Using an OpenAPI Documentation

How to develop a restful API in Ballerina which is documented in an OpenAPI contract.