⚡ v0.1.0 Released on npm

The Fast Backend Language.

Write once, deploy everywhere. Natively compiles to JavaScript for Cloudflare Workers, Node.js, Deno, and Bun.

Read Documentation
npm install -g tezz-lang

Officially created by Abhinav.

Tezz Power

Why Tezz?

Blazing Fast

Designed for the edge. Zero cold starts when deployed to Cloudflare Workers. It transpiles cleanly to optimized JavaScript.

🌐

Built-in HTTP

Services and Routes are first-class citizens. No web frameworks required. You write `service` and `route`, Tezz handles the rest.

📦

Zero Dependencies

The compiler is pure JavaScript. Write clean, Python-like syntax without worrying about massive node_modules folders.

Complete Documentation

Everything you need to know to master the Tezz programming language.

1. Installation & CLI

Tezz is distributed via npm. Install it globally to use the CLI from anywhere.

$ npm install -g tezz-lang

CLI Commands

CommandDescription
tezz initCreates a new Tezz project with a hello world example in the current directory.
tezz run app.tezzCompiles and runs the Tezz file immediately in a local Node.js environment.
tezz build app.tezzCompiles the code to JavaScript.
tezz build app.tezz --target workerCompiles specifically for Cloudflare Workers.

2. Variables & Types

Tezz uses the let keyword for declaring variables. It supports strings (with powerful interpolation), numbers, booleans, arrays, and objects.

-- Variables
let name = "Tezz"
let version = 0.1
let isFast = true

-- Arrays and Objects
let frameworks = ["Node", "Cloudflare", "Bun"]
let config = { port: 8080, mode: "production" }

-- String Interpolation (uses {})
let greeting = "Welcome to {name} version {version}!"

3. Functions

Functions are defined using the fn keyword. You can specify parameter types and return types using arrows.

fn calculateTotal(price: number, tax: number) -> number {
  let total = price + tax
  return total
}

fn greetUser(name: string) {
  return "Namaste, {name}! 🙏"
}

4. Control Flow

Standard if/else statements and for-in loops are supported without unnecessary parentheses.

-- If Statements
if status == 200 {
  respond 200 { success: true }
} else if status == 404 {
  respond 404 { error: "Not Found" }
} else {
  respond 500 { error: "Server Error" }
}

-- Loops
for user in users {
  -- Process user
}

5. Services & Routes Killer Feature

Tezz was built specifically for backend connectivity. service, route, and respond are native keywords in the language. There is no need to import Express or Hono.

service UserAPI on 3000 {

  -- GET route
  route GET "/users" {
    let usersList = [{ id: 1, name: "Abhinav" }]
    respond 200 { users: usersList }
  }

  -- POST route (parsing JSON body)
  route POST "/users" {
    let body = request.json()
    respond 201 { created: true, received: body }
  }

  -- Path parameters
  route GET "/users/:id" {
    let userId = params.id
    respond 200 { id: userId, message: "Fetching user {userId}" }
  }
}

Built-in Route Objects

Inside any route block, you automatically have access to:

  • request.method - e.g. "GET", "POST"
  • request.url - e.g. "/users/1"
  • request.headers - Object containing request headers
  • request.json() - Automatically parses the request body as JSON
  • request.text() - Reads raw text body
  • params.name - Accesses URL path parameters (like :id)
  • request.query - Object containing URL search parameters

6. Deployment (Cloudflare Workers)

Tezz compiles down to the standard Fetch API format used by edge runtimes like Cloudflare Workers.

# 1. Compile your Tezz code targeting 'worker'
$ tezz build app.tezz --target worker --output dist/worker.js

# 2. Deploy to Cloudflare using Wrangler
$ npx wrangler deploy dist/worker.js