beetlebug

Use cases

ztcl is a Tcl interpreter that runs scripts with limits. A script gets only the capabilities that the host gives it, and each run counts its work in compute units. These pages show programs that use these parts.

Some pages show parts of ztcl that you can use today. Other pages show a prototype: a small program that shows what is possible, with its source in examples/usecases. Each page says which parts are a prototype.

Page What you can build
Run untrusted code A program that runs plugins that it does not trust, each in an isolated thread with its own limits.
Meter and bill scripts A service that runs the scripts of its customers and bills each one in compute units, with signed usage records.
Scripts and personal tools Small tools for your own files, each with the smallest set of capabilities that it needs.
AI and numeric work Tensors, a training DSL, and a small language model, in plain Tcl and inside the sandbox.
Embed in another program Tcl as the script language of a program in Zig, C, or JavaScript.
Agents Tools for coding agents, an MCP server, and agent loops in an isolated thread.

ztk is Tk on ztcl. Its use cases show desktop, web, and phone apps.