🚧 CLI is in active development β€” some features are incomplete. Join the waitlist for stable release notifications.
How It Works

One binary. One port.
Every execution recorded.

Flux is a single Rust binary with five in-process modules. Every layer β€” from the gateway to the database β€” emits structured spans tied to one request ID. The CLI reassembles them on demand.

Try it β†’See the features
1

Flux runs your code β€” TypeScript on Deno V8, or Rust/Go/Java/Python/PHP/AssemblyScript via Wasmtime.

2

While it runs, every request’s spans, mutations, and inputs are recorded automatically.

3

Later, inspect, replay against new code, or diff against any other request.

Five modules. One process. One trace.

All five modules run in a single binary on port :4000. Every layer is instrumented at the runtime level β€” no application-level tracing hooks needed. Span data is stored in Postgres alongside mutation logs.

πŸ‘€
Client
Any HTTP client
πŸ›‘οΈ
Gateway
auth Β· rate limit Β· route β†’ span
⚑
Runtime
TS (V8) or WASM (Wasmtime) β†’ span
πŸ—„οΈ
Data Engine
query compiler Β· policy Β· SQL β†’ span
🐘
Your PostgreSQL
standard Postgres, you own the data

* Each hop produces a span stored in the trace store.

flux trace 4f9a3b2c
$ flux trace 4f9a3b2c

  Trace 4f9a3b2c  POST /create_user  200

  β–Έ gateway                     3ms
    auth βœ”  rate_limit βœ”  cors βœ”

  β–Έ create_user                 81ms
    β–Έ db:select(users)           11ms
    β–Έ db:insert(users)           14ms

  β–Έ send_welcome  async β†’  queued

  ── total: 98ms ─────────────────────

What happens when a request runs.

1

Request capture

When a request arrives at the Gateway, Flux assigns it a globally unique request ID (UUID v4). This ID is propagated internally to every module. The gateway records auth result, rate-limit decision, matched route, and timing as the first span.

gateway β†’ span
# Gateway emits:
{
  request_id: "4f9a3b2c",
  span: "gateway",
  method: "POST",
  path: "/create_user",
  auth: "ok",
  duration_ms: 3
}
2

Function execution

The Runtime receives the request with the propagated request ID. It executes your function β€” TypeScript in a Deno V8 isolate, or compiled WebAssembly via Wasmtime. Both runtimes share the same host API. Every ctx.db, ctx.queue, and ctx.fetch call is intercepted and recorded as a child span.

runtime β†’ spans
# Runtime emits per call:
{
  request_id: "4f9a3b2c",
  span: "create_user",
  children: [
    { span: "db:select(users)", 11ms },
    { span: "db:insert(users)", 14ms }
  ],
  duration_ms: 81
}
3

Mutation logging

Every database write goes through the Data Engine, which applies schema validation, column policies, and row-level security before executing the SQL. After execution, it writes a mutation record: which table, which row, old value, new value, and the request ID that caused it.

data engine β†’ mutation log
# Mutation record:
{
  request_id: "4f9a3b2c",
  table: "users",
  row_id: 42,
  operation: "insert",
  data: { email: "a@b.com", plan: "free" },
  timestamp: "2026-03-10T14:22:01Z"
}
4

Trace graph

All spans for a request ID are stored in an ordered graph. flux trace <id> retrieves them and renders the full tree β€” gateway, function, database queries, tool calls β€” in execution order with latencies.

trace store β†’ rendered
$ flux trace 4f9a3b2c

  gateway           3ms
  create_user      81ms
    db:select       11ms
    db:insert       14ms
  send_welcome  async β†’ queued

  total: 98ms
5

Deterministic replay

Because every span includes its full input and output, any request can be replayed deterministically. flux incident replay re-executes against the current code with side-effects disabled. flux bug bisect replays across your git history to find regressions.

replay β€” side-effects off
$ flux incident replay 14:00..14:05

  hooks: off Β· events: off Β· cron: off
  db writes: on Β· mutation log: on

  βœ” 22/23 passing
  βœ—  req:550e8400 still fails
     Stripe timeout at payments/create.ts:42
Technology

Open foundations, high-performance core.

Every module is written in Rust for predictable latency and memory safety. TypeScript functions run on Deno V8. Functions in Python, Go, Java, PHP, Rust, C#, or Ruby compile to WebAssembly and run on Wasmtime with Cranelift AOT compilation. Your data stays in standard Postgres.

πŸ›‘οΈ
Gateway
Rust (Axum)

Auth, rate limit (per-tenant token bucket), CORS, routing. Routes requests to the Runtime via in-process dispatch.

⚑
Runtime
Rust + Deno V8 + Wasmtime

TypeScript runs on V8 isolates. Python, Go, Java, PHP, Rust, C#, Ruby compile to WebAssembly and run on Wasmtime with Cranelift AOT. All share the same host API and tracing.

πŸ—„οΈ
Data Engine
Rust (Axum)

DB proxy: query compilation (JSON β†’ SQL), column policies, row-level security. Writes mutation records for every change.

πŸ“¬
Queue
Rust

Durable async job queue backed by Postgres. Workers execute functions through the Runtime. Fully traced.

πŸ”Œ
API
Rust (Axum)

Management API: deploy functions, manage schemas, API keys, tenants. Used by the CLI and web dashboard.

See it in action.

The quickstart takes 5 minutes. You deploy a function, trigger a request, and trace it end to end from the CLI.

Start the Quickstart β†’CLI Reference