Gladex API & CLI Reference
Complete reference for the Gladex investor app endpoints and CLI commands.
Public Endpoints
Accessible from any network without authentication.
Lightweight health check. Returns JSON with service status, environment, timestamp, and version.
{
"status": "ok",
"service": "gladex-investor-app",
"env": "prod",
"timestamp": 1790039940,
"version": "0.4.28"
}
Detailed health check. Includes peer service status, disk usage, and unread message count.
{
"status": "ok",
"service": "gladex-investor-app",
"env": "prod",
"timestamp": 1790039940,
"version": "0.4.28",
"checks": {
"investor-app-dev": "ok",
"investor-app-prod": "self",
"disk_usage_pct": 34.7,
"disk_free_bytes": 68625489920,
"unread_messages": 0
}
}
Returns application version, PHP version, and environment.
{
"app": "gladex-investor-app",
"version": "0.4.28",
"php": "8.3.6",
"env": "prod"
}
Downloads the latest gladex CLI binary (Linux amd64). Use curl -O or wget.
curl -O https://gladex.de/download/gladex
chmod +x gladex
./gladex --help
LAN-Only Endpoints
Restricted to private network IPs (127.0.0.0/8, 10.0.0.0/8, 192.168.0.0/16). Returns 403 from public IPs.
Investor chat UI. Threaded message view with agent-investor communication. Supports CMD+Enter send, 6h time filter, dark theme.
Returns all messages as JSON array, ordered by timestamp.
{
"messages": [
{
"id": 1,
"ts": "1726812345",
"direction": "investor_to_agent",
"body": "Hello from investor!",
"read": 1
}
]
}
Send a message from investor to agent. Body must be JSON with body field. Also appends to INBOX.md for agent pickup.
curl -X POST http://localhost:8001/api/messages \
-H "Content-Type: application/json" \
-d '{"body": "Build the landing page"}'
Mark a specific message as read by ID.
Returns unread investor message count.
{ "unread_investor_messages": 0 }
Budget dashboard UI. Shows monthly allowance, spending, allocations, and rules.
Returns parsed budget data from BUDGET.md as structured JSON.
{
"month": "2026-09",
"allowance": 5.00,
"spent": 1.50,
"remaining": 3.50,
"allocations": ["gladex.de (1.50 EUR/mo)"],
"rules": "..."
}
Trust Dashboard UI. Shows AI tool confidence scores with summary grid, score list, and record form.
Returns trust scores from the Go CLI workspace database.
{
"scores": [
{
"source": "copilot",
"target": "project-x",
"score": 0.85,
"level": "HIGH",
"updated_at": "2026-09-21T20:00:00Z"
}
],
"summary": { "total": 3, "high": 1, "medium": 1, "neutral": 0, "low": 1 }
}
Record a trust outcome via the Go CLI. Body: {"source": "...", "target": "...", "outcome": "accepted|rejected|partial"}
Changelog page. Renders CHANGELOG.md with dark theme, version tags, and section labels.
CLI Commands (gladex)
Go CLI binary (v0.4.28). Download: curl -O https://gladex.de/download/gladex
Workspace
| Command | Description |
|---|---|
gladex init | Initialize a new workspace (creates .gladex/ directory with SQLite DB) |
gladex status | Show workspace status (contexts, workflows, trust entries) |
gladex doctor | Check workspace health and dependencies |
gladex config | Show/set configuration values |
gladex version [--json] | Show version info (optionally as JSON) |
Context Management
| Command | Description |
|---|---|
gladex context push <name> [files...] | Store/update named contexts with file content + metadata |
gladex context pull <name> [--raw] | Retrieve stored contexts (header/footer or raw) |
gladex context list [--format json] | List all stored contexts |
gladex context delete <name> | Remove named contexts |
gladex context export [--format json] | Export all contexts |
gladex context import <file> | Import contexts from file |
gladex context diff <name1> <name2> | Compare two contexts |
Workflow Engine
| Command | Description |
|---|---|
gladex workflow create <name> --from <file> | Create workflow from JSON definition |
gladex workflow run <name> [--dry-run] [--allow-shell] | Execute workflow steps. --allow-shell required for shell steps. |
gladex workflow list | List all workflows |
gladex workflow show <name> | Show workflow definition |
gladex workflow delete <name> | Delete a workflow |
gladex workflow validate <file> | Validate a workflow JSON file |
gladex workflow runs <name> | Show run history for a workflow |
Workflow Templates
| Command | Description |
|---|---|
gladex templates list | List all bundled workflow templates (8 templates) |
gladex templates show <name> | Show template definition and install command |
gladex templates install <name> [--as <workflow-name>] | Install a template into workspace |
gladex templates search <query> | Search templates by keyword |
Trust Scoring
| Command | Description |
|---|---|
gladex trust record <source> <target> <outcome> | Record AI suggestion outcome (accepted/rejected/partial) |
gladex trust list | List all trust scores |
gladex trust get <source> <target> | Get trust score for a specific pair |
gladex trust confidence | Show confidence levels summary |
HTTP API Server
| Command | Description |
|---|---|
gladex serve [--port 8080] | Start HTTP API server (10 endpoints) |
MCP Server
| Command | Description |
|---|---|
gladex mcp [--port 50052] | Start MCP-compliant JSON-RPC 2.0 server (7 tools, schema validation, rate limiting) |
Architecture
┌─────────────────────────────────────────────────┐
│ DNS (PowerDNS API) │
│ gladex.de ──→ 77.90.15.49 (VPS) │
│ dev / git / info / stats subdomains │
└────────────────────┬────────────────────────────┘
│ WireGuard (10.2.3.0/24)
┌────────────────────▼────────────────────────────┐
│ Apache (TLS) │
│ :80 → 301 HTTPS │ :443 → reverse proxy │
│ Let's Encrypt cert (auto-renewal) │
└──────┬──────────────────────────┬───────────────┘
│ │
┌────▼────┐ ┌──────▼──────┐
│ :8000 │ │ :8001 │
│ DEV │ │ PROD │
│ PHP 8.3 │ │ PHP 8.3 │
│ SQLite │ │ SQLite │
└─────────┘ └────────────┘
│ │
┌────▼──────────────────────────▼──────┐
│ Go CLI (gladex v0.4.28) │
│ Context · Workflow · Trust · MCP │
│ 130+ unit tests │
└──────────────────────────────────────┘
DNS Records
| Record | IP | TTL | Purpose |
|---|---|---|---|
| gladex.de | 77.90.15.49 | 3600 | Landing page (public) |
| dev.gladex.de | 77.90.15.49 | 3600 | Dev environment (investor app) |
| git.gladex.de | 77.90.15.49 | 3600 | Git remote (git daemon :9418) |
| info.gladex.de | 77.90.15.49 | 3600 | Product info page (public) |
| stats.gladex.de | 77.90.15.49 | 3600 | Container statistics (LAN-only) |
TLS Certificate
| Property | Value |
|---|---|
| Issuer | Let's Encrypt |
| Domains | gladex.de, dev.gladex.de, git.gladex.de, info.gladex.de, stats.gladex.de |
| Expires | 2026-12-20 |
| Renewal | Automatic via certbot timer + deploy hook |
| Method | HTTP-01 webroot challenge |