Write once, deploy everywhere. Natively compiles to JavaScript for Cloudflare Workers, Node.js, Deno, and Bun.
npm install -g tezz-lang
Officially created by Abhinav.
Designed for the edge. Zero cold starts when deployed to Cloudflare Workers. It transpiles cleanly to optimized JavaScript.
Services and Routes are first-class citizens. No web frameworks required. You write `service` and `route`, Tezz handles the rest.
The compiler is pure JavaScript. Write clean, Python-like syntax without worrying about massive node_modules folders.
Everything you need to know to master the Tezz programming language.
Tezz is distributed via npm. Install it globally to use the CLI from anywhere.
$ npm install -g tezz-lang
| Command | Description |
|---|---|
tezz init | Creates a new Tezz project with a hello world example in the current directory. |
tezz run app.tezz | Compiles and runs the Tezz file immediately in a local Node.js environment. |
tezz build app.tezz | Compiles the code to JavaScript. |
tezz build app.tezz --target worker | Compiles specifically for Cloudflare Workers. |
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}!"
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}! 🙏"
}
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
}
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}" }
}
}
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 headersrequest.json() - Automatically parses the request body as JSONrequest.text() - Reads raw text bodyparams.name - Accesses URL path parameters (like :id)request.query - Object containing URL search parametersTezz 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