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. It provides a highly concurrent axum-based backend to process code generation, validate models, and serve AI-assist prompts for modern agentic workflows (e.g., Cursor, Claude, etc.).
- In-Memory Generation: Renders Rust files directly in memory and packages them as a streamable
.zipfile for lightning-fast execution. - AI Assist API: Provides dynamic markdown templates (
rust-assist-*) containing exact, model-aware code snippets to guide AI coding assistants in writing TeaQL standard code (CRUD, Queries, UI list pages, etc.). - Live Previews & Dashboard: Serves an interactive HTML dashboard, a React Flow Entity Graph, and a Data Dictionary directly from the loaded model.
- Multiple Targets: Generates pure domain libraries (
rust-lib-core) or fully configured CLI/Server workspaces (rust-app-console). - Tiny Multi-Arch Docker: Built statically from
scratchusingcargo-zigbuildandmusl. The final image is extremely lightweight (~5MB) and native to bothlinux/amd64andlinux/arm64.
The easiest way to run the local server is via Docker. This image runs smoothly on Linux, Windows (WSL), and Apple Silicon (M1/M2/M3) Macs.
docker run -d --name teaql-forge-server -p 8080:8080 teaql/teaql-forge-rs:latestOnce running, open your browser to view the interactive dashboard: 👉 http://localhost:8080/
Point your CLI tool or AI IDE to the local server to unlock real-time, model-aware code assistance:
export TEAQL_ENDPOINT_PREFIX=http://localhost:8080/You can seamlessly integrate the local server with your existing cargo-teaql CLI workflow by pointing it to your local endpoint:
# Generate a full Workspace
cargo-teaql gen-workspace --endpoint-prefix http://127.0.0.1:8080/ models/model.xml
# Generate via the standard generate command
cargo teaql --input model.xml rust-app-consoleGET /- Interactive HTML Dashboard with Live Previews.GET /version- Returns the current server version.GET /model-view.html- Interactive Entity Relationship Graph (React Flow).GET /data-design-react.html- Data Dictionary UI.GET /rust-assist-*/[entity]- Generates AI context prompts for specific operations (e.g.,rust-assist-query/platform).POST /generate- Acceptsmultipart/form-datawith anxmlfile and ascope(rust-lib-coreorrust-app-console).POST /evaluate- Evaluates KSML scripts and expressions.
The server uses cargo-zigbuild for true multi-arch static compilation.
cargo run --bin teaql-forge-server -- --host 127.0.0.1 --port 8080To publish a new version of the Docker image to Docker Hub, use the automated script. This requires cargo-zigbuild installed locally (cargo install cargo-zigbuild).
# Publish as "latest"
./publish_docker.sh
# Publish a specific version tag
./publish_docker.sh v0.9.0The script automatically:
- Cross-compiles statically for
x86_64andaarch64. - Packages both binaries into scratch containers (
-amd64and-arm64). - Creates and pushes a unified Docker Manifest.
When running the binary manually, you can pass 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 (default8081).
Warning: Binding to
0.0.0.0exposes the TeaQL local server to the network. Use Enterprise Mode or configure TLS/auth for production environments.
Apache-2.0 License