TeaQL Forge Server is a local-first code generation service for TeaQL, written entirely in Rust.
It turns TeaQL .xml domain models into Rust libraries and fully configured workspace scaffolds, while keeping the same service API used by TeaQL clients, plugins, and agent workflows.
The generated workspace is designed around context-bound execution and audit-ready runtime patterns, making it suitable for AI-assisted business software development.
- In-Memory Generation: Renders Rust files directly in memory and packages them as a streamable
.zipfile for speed. - Multiple Scopes: Supports generating simple library crates (
rust-lib) and full application workspaces (rust-workspace). - Axum Web Server: Highly concurrent and memory-safe web server backend listening on configurable ports.
- Lightweight Docker Image: Built as a statically-linked binary from
scratchfor ARM64 using musl, resulting in a tiny (~3MB) footprint.
The easiest way to run the local server is via Docker:
docker run -d --name teaql-forge-server -p 8080:8080 teaql/teaql-forge-rs:latestOnce running, you can quickly test if the server is up:
curl http://127.0.0.1:8080/versionThe server exposes the following endpoints:
GET /version- Returns the current server version.POST /generate- Acceptsmultipart/form-datawith anxmlfile and ascopestring.
You can seamlessly integrate the local server with your existing cargo-teaql CLI workflow by pointing it to your local endpoint:
cargo-teaql gen-workspace --endpoint-prefix http://127.0.0.1:8080/ models/model.xmlThis command will send your model to the Docker container, receive the generated zip file in-memory, and unpack the domain and workspace directly into your project directory.
When running the binary manually (outside of Docker), you can pass the following command-line arguments:
--host: The interface to bind to (e.g.,0.0.0.0to expose to the network,127.0.0.1for local-only).-p, --port: The port to listen on (default8080).
Example:
cargo run --bin teaql-forge-server -- --host 0.0.0.0 --port 8080Warning: Binding to
0.0.0.0will expose the TeaQL local server to the network. Use Enterprise Mode or configure TLS/auth for production environments.
Apache-2.0 License