Introduction

The minimalist, high-performance web framework for Bun.

Welcome to Bklar 🐰

Bklar (pronounced buh-klar) is a modern web framework built specifically for Bun.

It is designed to be incredibly fast by leveraging native Bun APIs, while offering a Developer Experience (DX) comparable to sophisticated frameworks like NestJS or Hono, but with a much simpler surface area.

Why Bklar?

Quick Look

Here is a complete API with validation and Swagger documentation in just a few lines:

import { Bklar } from "bklar";
import { z } from "zod";

const app = Bklar();

app.get(
  "/users/:id",
  (ctx) => {
    // ctx.params.id is strictly typed!
    return ctx.json({ id: ctx.params.id, name: "Bun User" });
  },
  {
    schemas: {
      params: z.object({ id: z.coerce.number() }),
    },
    doc: {
      summary: "Get User",
      tags: ["Users"],
    },
  }
);

app.listen(3000);

The Ecosystem

Bklar isn't just a router; it's a suite of tools designed to work perfectly together.

Getting Started

Ready to build? Create your first project in seconds.

The fastest way to start.

bun create bklar my-app

Add it to an existing project.

bun add bklar zod

Requirements

Bklar requires Bun v1.0.0 or higher.

On this page