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 make sure it’s working on your machine.Download Ballerina
Distributions available for
Linux, OS X, and Windows
Need some help? Read the Getting Started guide.
Take a quick tour to run a simple hello world services and call a web API.
Read the quickstart guide and follow along in your IDE
Learn the language and the libraries
Learn the “batteries-included” standard libraryThe Standard Library
Read the language & platform specifications to really understand the guts of the language.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`
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|
Ballerina projects is the way to organize real world Ballerina development tasks. Learn more about 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 use Ballerina to fetch, build, create, version, search, and install Ballerina modules with repositories that are local and remote.
How to write testable Ballerina code using its built-in test framework, which provides a set of building blocks to help write tests.
How to document your Ballerina programs and modules in order to generate API documentation.
How to share your local modules with the Ballerina community using Ballerina Central.
How to configure your runtime services and generate deployment artifacts for various targets including Docker and Kubernetes.
How to use logging, metrics, and tracing to observe Ballerina services.
How to generate Ballerina connector and service code for your existing Protocol Buffer definition.
The Ballerina Style Guide shows how to maintain a standard coding style among the Ballerina community.
This guide shows how to develop a restful API in Ballerina which is documented in an OpenAPI contract.
Provides guidelines on writing secure Ballerina services, while demonstrating different security features and controls available within Ballerina.