Kit Documentation

Welcome to the Kit programming language documentation. Kit is a functional language that combines static safety with dynamic flexibility, featuring Hindley-Milner type inference, pattern matching, and native compilation via Zig.

New to Kit?

Start with the Language Tour for a quick overview of Kit's features, or follow the Installation Guide to set up your development environment.

Quick Start

# Clone and build Kit
git clone https://gitlab.com/kit-lang/kit-lang
cd kit-lang
zig build

# Create your first Kit program
echo 'println "Hello, Kit!"' > hello.kit

# Run with interpreter
kit run hello.kit

# Or compile to native binary
kit build hello.kit -o hello
./hello
Explore with the REPL

Start an interactive session with kit repl. Use :info <Module> to view documentation for any module (e.g., :info List, :info String).

Core Concepts

Standard Library Modules

Kit includes a comprehensive standard library with modules for common operations. View all modules →

Hello World

The simplest Kit program:

println "Hello, World!"

A more complete example showing Kit's features:

# Define a function
greet = fn(name) => "Hello, ${name}!"

# Use pattern matching with ADTs
type Result a = Ok a | Err String

handle = fn(result) =>
  match result
  | Ok value -> println value
  | Err msg -> println "Error: ${msg}"

# Functional data processing
numbers = [1, 2, 3, 4, 5]

result = numbers
  |> filter (fn(x) => x > 2)
  |> map (fn(x) => x * 2)
  |> fold (fn(acc, x) => acc + x) 0

println result  # => 24

External Packages

Kit has a growing ecosystem of 68 packages for databases, networking, graphics, and more. Browse all packages →

Networking & Web

Finance & Trading