Everything you need to know about the Kit programming language. Can't find the answer you're looking for? Check out our documentation or join the community.
Kit is a functional programming language that combines the expressiveness of Clojure-style syntax with the safety of Hindley-Milner type inference. It features an effect system for tracking side effects, native compilation via Zig, and a dual-backend architecture with both an interpreter and compiler.
Kit exists because I've spent most of my career thinking about programming languages — and wanting one that felt right.
I'm a polyglot programmer who has worked with over 50 programming languages, and I've long been fascinated by language design and parsing. Early on, books like Writing Compilers and Interpreters and How to Create Your Own Freaking Awesome Programming Language shaped my desire to build my own language. In 2006, I put those ideas into practice by building a domain-specific language for an internal enterprise product, which was successfully used in production.
Since then, I've wanted to design my own “dream” language. With the emergence of large language models, that finally became feasible. Kit was built through an iterative, LLM-assisted process—switching tools when one stalled, refining ideas as implementation progressed, and even changing the underlying systems language from Rust to Zig. After four months of focused work, Kit emerged as the language I had been aiming toward for years.
Kit was built on the shoulders of giants. It was inspired, in varying degrees, by: Clojure, Crystal, F#, Gleam, Go, Haskell, Lua, Ocaml, Odin, Pony, Python, Roc, Ruby, Rust, V, and Zig.
See the Language Comparison for more details.
When the language was being designed, the first LLM utilized, ChatGPT, randomly generated 🪁 "Kite" as a name for the language. Not being satisfied with the name, the last letter "e" was dropped to create the name Kit.
Later, the Kit fox was chosen as the mascot for the language.
Google's Nano Bannana designed the original, unreleased, logo for Kit.
The final logo was designed by Brand Pulse.
Kit stands out in several ways:
See the Language Comparison for more details.
Kit is designed for developers who want the safety and expressiveness of functional programming without sacrificing performance or tooling. It's great for:
Kit is built around several core principles:
println aliases to Stdout.write-line).
kit run), and REPL
(kit repl), enables rapid development, while the compiler (kit build) produces optimized native binaries via Zig - both must produce identical output
? (e.g., empty?, has-key?), identifiers use
kebab-case
Kit is currently at version 2026.1.13. While it's feature-complete for many use
cases and includes extensive tooling, the language may still evolve. We recommend evaluating it
for your specific needs before using in production.
Kit currently supports macOS and Linux. Windows support is planned for a future release.
The easiest way to install Kit is using the install script:
# Install latest version
curl -fsSL https://gitlab.com/kit-lang/kit-lang/-/raw/main/install.sh | sh
# Install a specific version
curl -fsSL https://gitlab.com/kit-lang/kit-lang/-/raw/main/install.sh | sh -s -- --version 2026.1.13
This downloads pre-built binaries for your platform (macOS or Linux, x86_64 or ARM64) and
installs them to ~/.kit. The script will prompt you to add Kit to your PATH.
Alternatively, you can build from source:
git clone https://gitlab.com/kit-lang/kit-lang
cd kit-lang
zig build
Building from source requires Zig 0.15.2+. For detailed instructions, see the Installation Guide.
Yes! The Kit Playground lets you write and run Kit code directly in your browser. It's a great way to explore the language, experiment with features, and share code snippets without any setup.
Use the kit init command to create a new project with a
kit.toml manifest:
kit init my-project
cd my-project
kit run src/main.kit
This sets up a project structure with package metadata, dependencies, and a starter file.
kit run and kit build?
kit run executes your code using the interpreter, which is great for development
and quick iteration. kit build compiles your code to a native binary via Zig for
maximum performance.
# Run with interpreter (fast startup)
kit run hello.kit
# Compile to native binary (fast execution)
kit build hello.kit -o hello
./hello
Hindley-Milner is a type inference algorithm that can automatically determine the types of expressions without requiring explicit type annotations. This means you get the safety of static typing without the verbosity:
# No type annotations needed - Kit infers everything
add-five = fn(x) => x + 5
# Kit infers: add-five : Int -> Int
result = map add-five [1, 2, 3]
# Kit infers: result : List Int
Kit's effect system tracks what side effects your functions can perform. This helps you reason about your code and catch bugs at compile time:
# Pure function - no side effects
double = fn(x) => x * 2
# Effect: Pure
# Function with I/O effect
greet = fn(name) => println "Hello, " ++ name
# Effect: IO
The effect system prevents accidental side effects and makes testing easier since pure functions are predictable and isolated.
Pattern matching lets you destructure data and handle different cases elegantly. Kit ensures you handle all possible cases at compile time:
type Result a b = Ok a | Error b
handle = fn(result) =>
match result
| Ok value -> "Success: " ++ to-string value
| Error msg -> "Failed: " ++ msg
# List pattern matching
first = fn(list) =>
match list
| [x | _] -> Some x
| [] -> None
Kit also provides match macros for common pattern matching scenarios.
These include is for boolean pattern checks, as for
extracting values with defaults, and guard for early returns when
patterns don't match. Match macros reduce boilerplate and make your intent clearer.
See the
Pattern Matching Guide for more.
Kit is primarily a functional language and doesn't have traditional classes or inheritance. Instead, it uses:
This approach provides many benefits of OOP (polymorphism, encapsulation) while avoiding common pitfalls (fragile base classes, complex inheritance hierarchies).
Kit uses the Result type for error handling instead of exceptions. This makes error
paths explicit and ensures you handle them:
safe-divide = fn(x, y) =>
if y == 0 then
Error "Division by zero"
else
Ok (x / y)
# Chain operations with Result
result =
safe-divide 10 2
|> Result.map (fn(x) => x + 1)
|> Result.unwrap-or 0
See the Error Handling Guide for more.
Kit uses suffixes to indicate what a function does:
?): Functions that return a boolean.
These are predicates that test a condition.
!): Functions that either perform
assertions, mutate data in place, or have side effects. The ! warns
that something unusual is happening.
# Predicate functions end with ?
List.empty? [] # => true
Map.has-key? "name" user # => true
String.starts-with? "kit" "k" # => true
# Assertion functions end with !
test "math works"
assert-eq! (2 + 2) 4
assert-true! (is-even? 10)
# Mutating functions end with ! (transient data structures)
t = PVec.transient vec
PVec.append! t 42 # mutates t in place
PMap.insert! m "key" val # mutates m in place
This convention makes code more readable by signaling intent at a glance.
When you see empty?, you know it returns a boolean.
When you see !, you know something effectful is happening—either
an assertion that can fail or a mutation of data.
Kit avoids the colored function issue by providing the following concurrency primitives:
Kit includes a complete toolchain:
kit init - Initialize new projectskit run - Run code with the interpreterkit build - Compile to native binarieskit check - Type check without runningkit test - Run testskit dev - Run development workflow (format, check, test)kit format - Format source codekit lsp - Language Server Protocol for editor integrationkit install - Install dependencieskit cache - Manage package cacheSee the CLI Reference for details.
Dependencies are declared in kit.toml and can come from Git repositories or local
paths:
[package]
name = "my-app"
version = "1.0.0"
[dependencies]
kit-json = { git = "https://gitlab.com/kit-lang/kit-json", tag = "v1.0" }
kit-csv = { path = "../kit-csv" }
Then run kit install to fetch dependencies.
Yes! Kit includes a built-in Language Server (kit lsp) that provides rich editor
features:
Official extensions are available for popular editors:
The LSP also works with Neovim, Helix, Emacs, and any editor that supports the Language Server Protocol. See the LSP documentation for setup instructions.
Kit has built-in testing support. Define test blocks directly in your code:
test "addition works correctly"
assert-eq! (add 2 3) 5
assert-eq! (add -1 1) 0
test "list operations"
xs = [1, 2, 3]
assert-eq! (length xs) 3
assert-true! (contains? 2 xs)
Run with kit test src/tests.kit. For property-based testing, use the
kit-quickcheck package.
Kit shares Haskell's Hindley-Milner type inference and focus on purity, but differs in several ways:
See the Language Comparison for more details.
Kit borrows Clojure's expressive syntax and functional style but adds static typing:
Kit's pipes |> (data-first) and |>> (data-last) were inspired
by Clojure's thread-first -> and thread-last ->>.
See the Language Comparison for more details.
Both Kit and Rust prioritize safety, but take different approaches:
Kit is inspired by Rust's error messages and tooling quality.
See the Language Comparison for more details.
Kit and Gleam share similar goals (friendly functional programming with great tooling) but differ in implementation:
See the Language Comparison for more details.
Yes! The kit-benchmarks repository contains performance benchmarks comparing Kit against other mainstream programming languages. These benchmarks help you evaluate Kit's runtime performance for various workloads and see how it stacks up against languages like Rust, Go, and others.
We welcome contributions of all kinds:
Check out the CONTRIBUTING.md file in the repository for guidelines.
Several resources are available:
Yes, Kit is fully open source. The compiler, standard library, and all official packages are available on GitLab.