Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.tovuk.com/llms.txt

Use this file to discover all available pages before exploring further.

Tovuk uses a small project contract so humans and agents can deploy without guessing.

Flow

  1. Login with GitHub or Google.
  2. Run tovuk doctor --json.
  3. Run tovuk preview for local verification.
  4. Run tovuk deploy --wait --json.
  5. Tovuk queues the build, runs checks, and verifies the health route for Rust backends.
  6. Tovuk exposes the app on a tovuk.app deployment hostname.
For fullstack repos, run tovuk deploy from the repo root. The CLI reads the root tovuk.toml, builds the configured backend and frontend roots, serves the frontend at /, and routes /api/* to the Rust backend. Use --database to request managed Postgres for the backend.

Local preview

npx tovuk preview
For Rust backends, preview builds the release binary and starts it with PORT. For static frontends, preview builds the frontend and serves the output directory. For fullstack apps, preview builds both roots, runs the backend, and serves the frontend with a local /api/* proxy.

Runtime contract

Rust backends must listen on:
0.0.0.0:$PORT
Do not hardcode the port. Tovuk injects it at runtime. Static frontends do not need a runtime process; they call Rust backends for dynamic behavior.

Managed Postgres

When --database is used, Tovuk injects DATABASE_URL and TOVUK_DATABASE_URL. It also injects TOVUK_DATABASE_CONNECTION_LIMIT, TOVUK_POSTGRES_CONNECTION_LIMIT, and TOVUK_POSTGRES_POOL_MODE. Use the connection limit as the max size of your app’s database pool. This keeps database work fast and predictable for busy apps while matching the plan limit.

Agent-ready errors

CLI and API errors should be machine-readable:
{
  "code": "missing_cargo_lock",
  "message": "Cargo.lock is required for reproducible deploys.",
  "agent_instruction": "Run cargo generate-lockfile, commit Cargo.lock, then retry."
}
Agents should always fix the first failed check or first actionable log line, then rerun doctor before redeploying. After a failed build, start with:
npx tovuk logs --build <build_id> --json
Last modified on May 29, 2026