trex.server.start

A local command that builds and starts the API server with login and permission checks turned off.

In plain words
What is it for?
Use it to start the local API, database migrations, metrics, health checks, and background processing, then test the API on localhost:8000.
Why use it?
It gives developers a quick way to run the server locally without setting up authentication first. It also checks that the program builds and the PostgreSQL database is available.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/ambient-code/platform/trex.server.start
Clone the repo
git clone --depth 1 https://github.com/ambient-code/platform

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 313 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00313
Opus 5 $0.00000 $0.00156
Sonnet 5 $0.00000 $0.00063
Haiku 4.5 $0.00000 $0.00031

Measured yesterday against content hash 84bb7936a416, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

trex.server.start scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s http://localhost:8000/api/ambient-api-server | jq
Origin

Copies of this mod

1 near-identical copy found in the catalogue:

components/ambient-api-server/.claude/commands/trex.server.start.md · 44 lines

What it actually says

Start Server (Development Mode)

Build and start the API server with authentication and authorization disabled for local development.

Instructions

  1. Build the binary:

    make binary
    
  2. If the build fails, diagnose and fix compilation errors before proceeding.

  3. Start the server with auth disabled:

    make run-no-auth
    

    This runs ./ambient-api-server migrate then ./ambient-api-server serve --enable-authz=false --enable-jwt=false.

  4. The server starts on localhost:8000. Verify it's running:

    curl -s http://localhost:8000/api/ambient-api-server | jq
    

Prerequisites

  • PostgreSQL must be running. If the server fails to connect, suggest running /trex.db.setup first.
  • The binary must compile cleanly. If there are errors, fix them before retrying.

What's Running

The serve command launches four concurrent servers:

  • API server on localhost:8000 (REST endpoints)
  • Metrics server on localhost:8080 (Prometheus metrics)
  • Health check server on localhost:8083
  • Controllers server (event-driven background processing via PostgreSQL LISTEN/NOTIFY)

Quick Test

After the server starts, test with:

curl -s http://localhost:8000/api/ambient-api-server/v1/ | jq
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 44 lines · 0 tokens per session scan A 84bb7936a416

Subscribe to this mod's changes

trex.server.start is a command published in the GitHub repository ambient-code/platform (129 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 313 tokens. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.