The internet-native programming language with built-in HTTP, databases, crypto, AI, and a JIT compiler. 18 modules. 238+ functions. Zero dependencies.
Modern development means installing dozens of packages before writing a single line of logic. Forge ships with the internet baked in.
Decorators like @server and @get give you a production-ready REST API with zero boilerplate. No framework needed.
SQLite and PostgreSQL are built into the runtime. db.query() and db.execute() โ no ORM, no driver installs.
SHA256, MD5, base64, hex encoding โ all built in. crypto.sha256("data") just works.
Dual syntax โ write set name to "Forge" or let name = "Forge". Both compile the same. Your choice.
Ask LLMs directly with ask "prompt". Built-in chat mode with forge chat. AI is a first-class citizen.
Three execution tiers โ interpreter, bytecode VM, and Cranelift JIT. The JIT runs 11x faster than Python on compute-heavy workloads.
30 interactive tutorials built into the CLI. Run forge learn and start writing Forge in minutes โ no docs to read first.
Run shell commands, pipe data, check exit codes โ sh(), pipe_to(), which(). Replace fragile bash scripts with Forge.
Classic syntax for developers who think in code. Natural syntax for everyone else. Mix them freely โ both compile identically.
set name to "World" say "Hello, {name}!" define greet(who) { say "Welcome, {who}!" } set mut score to 0 repeat 5 times { change score to score + 10 } if score > 40 { yell "You win!" } otherwise { whisper "try again..." }
let name = "World" println("Hello, {name}!") fn greet(who) { println("Welcome, {who}!") } let mut score = 0 for i in range(0, 5) { score += 10 } if score > 40 { println("You win!") } else { println("try again...") }
No frameworks. No packages. No boilerplate. Just the code that matters.
@server(port: 3000) @get("/hello/:name") fn hello(name: String) -> Json { return { greeting: "Hello, {name}!", language: "Forge" } } @post("/users") fn create_user(body: Json) -> Json { db.execute("INSERT INTO users ...") return { created: true } }
let users = db.query("SELECT * FROM users") let active = users .filter(fn(u) { u.active }) .map(fn(u) { u.name }) term.table(active) // Export to CSV csv.write("report.csv", users) // Or hash some data let hash = crypto.sha256("sensitive") say hash
say sh("whoami") if sh_ok("which docker") { say "Docker installed" } let files = sh_lines("ls /etc | head -5") for f in files { say "Found: {f}" } // Pipe Forge data into commands let sorted = pipe_to(data, "sort")
// Error handling that reads safe { risky_function() } must parse_config("app.toml") // Retry with a keyword retry 3 times { fetch("https://api.example.com") } // Pattern matching + ADTs type Shape = Circle(Float) | Rect(Float, Float) match shape { Circle(r) => say "r={r}" Rect(w, h) => say "{w}x{h}" }
Full stdlib with the interpreter. Raw speed with the JIT. The Cranelift JIT puts Forge alongside Node.js for compute-heavy code.
Every module is available from the first line of code. No package manager, no dependency hell.
Define data with thing, attach behavior with give, enforce contracts with power, compose with has. Or use classic struct/impl/interface โ both compile identically.
thing Person { name: String, age: Int, role: String = "member" } give Person { define greet(it) { return "Hi, I'm " + it.name } } power Describable { fn describe() -> String } give Person the power Describable { define describe(it) { return it.name + " (" + it.role + ")" } } set p to craft Person { name: "Alice", age: 30 } say p.greet() say satisfies(p, Describable) // true
struct Person { name: String, age: Int, role: String = "member" } impl Person { fn greet(it) { return "Hi, I'm " + it.name } } interface Describable { fn describe() -> String } impl Describable for Person { fn describe(it) { return it.name + " (" + it.role + ")" } } let p = Person { name: "Alice", age: 30 } println(p.greet()) println(satisfies(p, Describable)) // true
First-class concurrency primitives. No runtime to configure, no async coloring to fight. Spawn tasks, pass messages, await results.
// Create a channel let ch = channel() // Spawn a producer spawn { for i in range(0, 5) { send(ch, "msg-{i}") } } // Receive messages repeat 5 times { let msg = receive(ch) say msg }
// Natural syntax forge fetch_data() { set resp to hold http.get("https://api.example.com") return resp.body } // Classic syntax async fn fetch_data() { let resp = await http.get("https://api.example.com") return resp.body } // Fire-and-forget yolo { http.post("/analytics", data) }
Forge ships a GenZ-inspired debug toolkit alongside the classics. Same functions, more personality.
// Profiling cook { let result = expensive_operation() } // prints execution time // Benchmarking slay 1000 { fibonacci(20) } // runs 1000 iterations, prints stats // Silent execution โ swallow all errors ghost { might_fail() } // Fire-and-forget async yolo { send_analytics(data) } // Classic debugging still works sus(my_object) // inspect with type info bet(score > 0) // assert it's positive no_cap(result, 42) // assert equality
Common tasks that require packages and boilerplate elsewhere are one-liners in Forge.
| Task | Forge | Python | Node.js | Go |
|---|---|---|---|---|
| REST API server | 3 lines 0 deps | 12 lines flask | 15 lines express | 25 lines stdlib |
| Query SQLite | 2 lines 0 deps | 5 lines stdlib | 8 lines better-sqlite3 | 12 lines go-sqlite3 |
| SHA-256 hash | 1 line 0 deps | 3 lines stdlib | 3 lines crypto | 5 lines stdlib |
| HTTP GET request | 1 line 0 deps | 3 lines requests | 5 lines node-fetch | 10 lines stdlib |
| Parse CSV file | 1 line 0 deps | 4 lines stdlib | 6 lines csv-parser | 8 lines encoding/csv |
| Terminal table output | 1 line 0 deps | 5 lines tabulate | 4 lines cli-table | 10 lines tablewriter |
| Retry with backoff | 1 line 0 deps | 12 lines tenacity | 15 lines async-retry | 20 lines retry-go |
One install. 30 tutorials. Everything built in.