A language designed to be written by AI: explicit types, unambiguous context; native plugins in C for the hot paths; HTTP/2, databases, object storage and mail as ready-made libraries (protocol libraries ship with the toolchain), with a package registry you can query over MCP. A cross-platform GUI of its own — one API for Windows, Linux and macOS, with a rich set of controls and a canvas, rendered identically on all three. A runtime sandbox gates file, network and system APIs; a program packs into a single file that runs on Windows and Linux alike.
plugin_load(`json`) // a plugin: loaded, then built in
function fib(n) :
{
if (n < 2) {
return n
}
return fib(n - 1) + fib(n - 2)
}
var string who = `Tabby` // backticks, ${} interpolation
var int kb = 2 ^ 10 // ^ is exponentiation
var dict ages = json_parse(`{"alice": 30}`)
var any bob = dict_get(ages, `bob`) // a missing key is notfound
if (type_of(bob) == `notfound`) {
print(`${who}: fib(20) = ${fib(20)}, 2^10 = ${kb}`)
}
prints Tabby: fib(20) = 6765, 2^10 = 1024 · language tour →
Every variable declares its type; a missing key is notfound, an empty value is null, and each has a name. Clear context is what makes generated code correct.
Write the hot paths as a C plugin and call it like a builtin; call an existing DLL / SO directly through extern.
TCP / TLS and crypto are builtins; HTTP/2, WebSocket, databases, S3 and mail are libraries written in plain, readable Tabby.
See the ecosystem →File, network, subprocess and native calls can all be switched off at startup, with grants only for trusted libraries; a forbidden call is stopped on the spot.
How the sandbox works →What makes AI-written code fail is not difficulty, it is that several spellings all look right. Tabby keeps the option space narrow: a small grammar, types written out in the open, and a name for every way something can fail. Generated code either runs correctly or fails early — and the error says how to fix it, so the model can repair it on the next turn.
Strings are always backticks `…`, interpolation is ${…}; comments are //; local variables declare a type: var string, var int, var any. No alternative styles to pick from, so code from a person and code from a model look the same.
cl knows every builtin, your modules and the descriptors of loaded plugins: a typo in a function name, a missing plugin_load, or the wrong argument count is listed at compile time instead of exploding on that line at run time.
A missing key is notfound, an empty value is null; tcp_recv returns an empty string on timeout and notfound when the peer disconnects. Putting notfound into a var string is an immediate error, never a silent literal.
Runtime errors carry the line, the call stack and what to change — the box on the right is the VM's own output. Paste it back into your AI assistant and the next attempt usually lands.
vm --sandbox turns off file, network, subprocess and native calls in one go; --deny net,proc narrows it item by item. Untrusted scripts do not have to be read in full before they run.
@mcp registers a plain function as an MCP tool, http_server speaks JSON-RPC. The package registry exposes /mcp too: connect your assistant and it can search packages and read their docs; the language reference itself installs as a Skill.
$ tabby run app.tb [warning:-1] => [Ln:4] undefined function 'json_parse' var dict o = json_parse(body) [warning:-1] => [Ln:9] undefined function 'prnt' prnt(`done`) [error:-1] => 2 error(s) found, compilation failed
A forgotten plugin_load(`json`) and a mistyped print — both found before anything runs
run time[error:-1] => [Ln:7 @app] Runtime error: Type error: cannot assign notfound to string variable 'id' (lookup failed; use `var any` to handle the missing case) var string id = dict_get(q, `id`)
A missing key never turns into an empty string; the message names the fix
MCP tooluse http_server
use http_server { mcp }
@mcp(`add`, `Add two integers`,
`{"type":"object","properties":{"a":{"type":"number"},"b":{"type":"number"}}}`)
function tool_add(args) :
{
var int a = to_int(dict_get(args, `a`))
var int b = to_int(dict_get(args, `b`))
return to_string(a + b)
}
http_server.mcp_enable(`/mcp`) // @mcp tools are discovered at startup
http_server.http_serve(8100) // your assistant connects to localhost:8100/mcp
Hot loops, system calls, an existing C library — make it a binary plugin. One header,
tabby_plugin.h, compiled to a DLL / SO; after plugin_load its functions are ordinary
builtins: bare calls, argument counts checked at compile time, typed return values. The bundled JSON and
SQLite support is built this way.
Through the host function table a plugin builds int, real, strings, bytes and nested lists / dicts directly — sqlite_query hands back a list of dicts, nothing left to parse.
cl reads the plugin's descriptor: a wrong name or argument count is reported when you compile, not when execution reaches that line.
Heavy modules live in plugins, so programs that do not need them do not carry them — JSON and SQLite are plugins, loaded with plugin_load only when used.
A plugin depends on one frozen header; it declares the capabilities it needs, and the sandbox grants those instead of handing out the master key that is native FFI.
Just calling an existing DLL / SO? Declare it with extern and call it; on Linux it goes through libffi.
plugin_load(`sqlite`) // sqlite.dll / sqlite.so
var int db = sqlite_open(`notes.db`)
sqlite_exec(db, `CREATE TABLE IF NOT EXISTS notes(` +
`id INTEGER PRIMARY KEY, body TEXT)`)
var list args = list_new()
list_push(args, `plugins return Tabby's own collections`)
sqlite_exec(db, `INSERT INTO notes(body) VALUES (?)`, args)
var list rows = sqlite_query(db, `SELECT id, body FROM notes`)
for each (row in rows) { // one dict per row
var int id = dict_get(row, `id`)
var string body = dict_get(row, `body`)
print(`#${id} ${body}`)
}
sqlite_close(db)
C · writing one
#include "tabby_plugin.h" static const TabbyHostApi* H; // demo_rows(n) -> list of dict static void demo_rows(TbCtx* ctx) { long long n = 0; H->arg_int(ctx, 0, &n); TbColl* rows = H->list_new(ctx); for (long long i = 0; i < n; i++) { TbColl* row = H->dict_new(ctx); H->dict_set_int(ctx, row, "n", i); H->dict_set_int(ctx, row, "sq", i * i); H->list_push_coll(ctx, rows, row); } H->ret_coll(ctx, rows); } // + a function table and the exported tabby_plugin_init
Build desktop tools with the same API on Windows, Linux (X11 / Wayland), and macOS: buttons, single-
and multi-line text, lists, sliders, scroll areas, and a canvas that draws shapes, drags them and reports
per-item events. Tabby draws the controls itself, so they look the same on all three platforms.
The GUI plugin and gui.tb both ship with the toolchain (gui.tb is part of the standard
library): write use gui, with no separate Tabby package to install.
Windows, frames, labels, buttons, single- and multi-line text, checkboxes and radio buttons, sliders,
progress bars, lists and scroll areas, laid out with gui.pack / grid /
place. Tabby draws the controls, follows the system's light or dark theme by default, and
scales with the display DPI.
Lines, polylines, rectangles, ovals, polygons, arcs, text and images on a canvas: move them, restyle them, reorder them, tag them for bulk operations. Hit testing follows the actual shape; a press grabs the item, so drag, hover and per-item events work — enough for paint tools, plots and node editors.
Text fields support Tab navigation, selection, undo, password masking, and input method composition. Linux needs desktop runtime libraries; input method support depends on how the GUI plugin was built.
use gui
var int win = gui.window(`Tabby GUI`, 360, 180)
var int label = gui.label(win, `Hello, Tabby!`)
gui.pack(label, pady: 20)
var int button = gui.button(win, `Click me`, command: `on_click`)
gui.pack(button)
function on_click(ev) :
{
gui.set_text(label, `Button clicked!`)
}
gui.mainloop()
Save the example and run tabby run hello-gui.tb. Download the toolchain ↓
Implemented byte by byte against the RFCs, written in Tabby, sources readable. HTTP / HTTP/2 /
WebSocket clients and servers and the embedded document store ship with the toolchain — the standard
library, use it and go. PostgreSQL / MySQL / Redis / MongoDB, S3, etcd, mail, SMS and payment
are tp packages: tp install when you need one. The package manager
tp installs from the registry site separately.
TCP / UDP, TLS with mutual authentication, local IPC, subprocesses, threads and mutexes, files and memory mapping; SHA-256 / HMAC / PBKDF2 / HKDF, P-256 signatures and ECDH, AES-128-GCM. JSON and SQLite are plugins shipped with the toolchain — plugin_load and go.
HTTP / HTTP/2 / WebSocket clients and servers, hpack, jsondb, TOTP, GUI: installed with the toolchain in
$TABBY_BIN/stdlib (pre-compiled), used through dep= in the manifest. No package
manager, no separate version.
tp installDatabases, object storage, etcd, mail, SMS and payment live in the registry as tp packages — or as
packages of your own: every version is reviewed by an administrator before publication, installing checks
sha256 and compiles in place, it tells you which dep= lines your manifest needs, and upgrades
do not wait for a toolchain release.
Registry search is an MCP endpoint: connect your assistant and it can look up packages, read the readme and resolve dependencies on its own.
# 1. install Tabby (this site) $ curl -fsSL …/install.sh | sh # 2. the standard library ships with the toolchain $ echo dep=http_server >> app.manifest # 3. for everything else, install the package manager $ curl -fsSL <registry site>/install.sh | sh $ tp install redis
Two installers, two jobs: the toolchain and its standard library come from this site, tp and the packages from the registry site
Capability switches live on the VM's command line, not in the program's manifest — an author cannot
grant anything to themselves. The same .t file under different flags is a different set of
permissions: run AI-generated scripts, run code users uploaded, without reading it line by line first.
--sandbox turns off every controllable capability; --deny net,proc turns off only what is listed; --allow sqlite inverts the default — dangerous ones off, only what is listed on.
Files and memory mapping, TCP / UDP / TLS, environment variables, subprocesses, local IPC, threads, raw pointers, native calls and plugin loading are each one capability. Strings, collections, math, hashing and crypto are pure computation and always available.
extern can call any system function and bypass every gate, so it is refused at the declaration and again when a library loads; --extern-allow admits only the named libraries. Subprocesses are the same, and --sandbox turns both off.
--grant platform_db:sqlite: user code cannot touch the database, but a library loaded from TABBY_LIB can do it on its behalf. Capabilities follow the module the code lives in; a same-named library planted in the program's deps/ gets no grant.
A disabled function never executes a line of native code; calling it as a statement raises a catchable error and try / catch lets the program carry on.
Inside an if condition a disabled function evaluates to false instead of throwing (the operation is still blocked). For a clear error, assign the result to a variable first.
try {
file_write(`out.txt`, `hi`)
} catch (e) {
print(`file: ${e}`)
}
try {
var int s = tcp_connect(`example.com`, 80)
} catch (e) {
print(`net: ${e}`)
}
try {
var any p = new_process(`cmd /c whoami`)
} catch (e) {
print(`proc: ${e}`)
}
print(`sha256 still works: ` + str_sub(sha256(`abc`), 0, 16))
vm --sandbox
$ vm --sandbox untrusted.t file: capability disabled: builtin 'file_write' is not permitted in this environment net: capability disabled: builtin 'tcp_connect' is not permitted in this environment proc: capability disabled: builtin 'new_process' is not permitted in this environment sha256 still works: ba7816bf8f01cfea
No file written, no connection made, no process started; pure computation runs — the output above is the VM's own (lines folded to fit)
# typical deployments (flags go before the program file) # pure computation, touches nothing $ vm --sandbox untrusted.t # database only $ vm --allow sqlite service.t # network and subprocesses off, everything else normal $ vm --deny net,proc report.t # user code fully denied, only trusted libraries reach the database $ vm --sandbox --grant platform_db:sqlite app.t
One line in the manifest, dep=jsondb, and packaging writes only the name into the
program; the library is loaded at run time from TABBY_LIB. A packaged program carries no library
code, so it is never pinned to a version.
tp update replaces the library and every already-packaged program picks it up on the next start — no recompile, no repackaging. A security fix does not mean re-releasing every service that depends on it.
deps/<library>/ next to the program wins over TABBY_LIB: patch one service, pin the old behaviour, and leave every other program on the machine alone.
dep=jsondb static packs the library into the program: a self-contained, reproducible single file that does not need TABBY_LIB to deploy.
A program built on Windows runs on Linux as it is, and the other way round; libraries are resolved by name on the target machine.
The VM resolves every dependency during startup and lists everything it cannot find, instead of failing later at the call site.
No lock file and no version solver: compatibility rests on the library author's contract — interfaces only grow. For an absolute pin, use static.
# app.manifest holds a single line, dep=greet $ mk app.manifest $ ls -l app_demo_1.t # 2.8 KB: your code and a library name $ vm app_demo_1.t hello, world (greet v1) $ tp update greet # the library moves to v2, the program is untouched $ vm app_demo_1.t hello, world (greet v2) $ mkdir -p deps/greet && … # this project ships its own override $ vm app_demo_1.t hello, world (project-local override)
One .t file, not repackaged, three different results — dependencies resolve by name at startup
# app.manifest main=main mod=main dep=http_server # standard library: ships with the toolchain dep=jsondb static # static: packed into the .t, version frozen
emit fires and returns, await waits for the result, a timeout block handles the deadline. When it expires the whole call chain stops at a statement boundary; a critical section holding a lock finishes first; a borrowed database connection is closed by the library, not leaked.
Servers listen on 127.0.0.1 only unless you write 0.0.0.0; TLS clients (HTTP, WebSocket, mail, S3) verify the server against the system trust store by default and refuse an untrusted one.
tabby build packs the modules into one .t bytecode file that runs on Windows and Linux; -r strips the embedded sources before you distribute, dep=… static packs the libraries in too.
vm -d with the dbg client for remote debugging: breakpoints, stepping, variables; tabby repl for trying things out; tabby run compiles incrementally, packages and runs in one step.
Routes are declared with a decorator, nothing to register by hand; :name captures a path segment, http_serve handles connections and concurrency.
emit fires and returns, await gets the after result; a slow one takes the timeout branch.
use http_server
use http_server { http }
@http(`GET`, `/hello/:name`)
function hello(client, ctx) :
{
var dict p = http_server.get_params(ctx)
var string name = dict_get(p, `name`)
http_server.send_json(client, 200, `{"hi":"${name}"}`)
return 0
}
http_server.http_serve(8080) // @http routes are discovered at startup
// curl localhost:8080/hello/worldweb.tb · http_server is in the standard library: just tabby run web.tb
event fetch(url) :
body:
{
sleep(50)
succeed `200 OK <- ` + url
}
failed(err):
{
print(`failed: ` + err)
}
after(result):
{
return result
}
timeout(2000):
{
print(`too slow`)
}
emit fetch(`a.example`) // fires and returns
var any r = await fetch(`b.example`) // waits for after's return value
print(r) // 200 OK <- b.exampleevents.tb · tabby run events.tb
The Windows and Linux archives are complete offline installers: the toolchain, the JSON and SQLite plugins, and the install scripts. Unpack one and run its installer — the result is the same as the one-line command above; the package manager tp installs separately from the registry site. The Agent Skill is the language reference for the same version, platform-neutral: unpack it into your tool's skill directory.
| Platform | File | Size | SHA-256 |
|---|---|---|---|
| loading… | |||
# Windows: unpack, double-click install.cmd, or in a terminal PS> .\tabby-1.0.0-windows-x64\install.cmd # uninstall (-Purge also removes installed packages) PS> .\tabby-1.0.0-windows-x64\install.cmd -Uninstall
# Linux $ tar xzf tabby-1.0.0-linux-x64.tar.gz $ sh tabby-1.0.0-linux-x64/install.sh # uninstall (--purge also removes installed packages) $ sh tabby-1.0.0-linux-x64/install.sh --uninstall
# macOS (macos-arm64 for Apple silicon, macos-x64 for Intel) $ tar xzf tabby-1.0.0-macos-arm64.tar.gz $ sh tabby-1.0.0-macos-arm64/install.sh # Uninstall (add --purge to drop installed packages too) $ sh tabby-1.0.0-macos-arm64/install.sh --uninstall