Arvore Repo Hub

Services

The services section declares infrastructure services (databases, caches, search engines) that run locally via Docker Compose.

Schema

YAML

services:
  - name: mysql
    image: mysql:8.0
    port: 3306
    env:
      MYSQL_ROOT_PASSWORD: root
      MYSQL_DATABASE: myapp

  - name: postgres
    image: postgres:16
    port: 5432
    env:
      POSTGRES_PASSWORD: postgres

  - name: redis
    image: redis:7-alpine
    port: 6379

TypeScript

With hub.config.ts, use the type-safe service helpers that pre-fill images and default ports:

import { defineConfig, service } from "@arvoretech/hub/config";

export default defineConfig({
  services: [
    service.mysql("mysql", { env: { MYSQL_ROOT_PASSWORD: "root", MYSQL_DATABASE: "myapp" } }),
    service.postgres("db"),
    service.redis("cache"),
    service.elasticsearch("search"),
    service.custom("qdrant", "qdrant/qdrant:latest", { port: 6333 }),
  ],
});

Available helpers: service.mysql(), service.postgres(), service.redis(), service.mongo(), service.rabbitmq(), service.elasticsearch(), service.clickhouse(), service.custom(). See Configuration for details.

  • name: elasticsearch image: docker.elastic.co/elasticsearch/elasticsearch:8.11.0 port: 9200 env: discovery.type: single-node xpack.security.enabled: “false”

  • name: qdrant image: qdrant/qdrant:latest port: 6333


| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `name` | string | Yes | Service name |
| `image` | string | Yes | Docker image |
| `port` | number | No | Single exposed port |
| `ports` | number[] | No | Multiple exposed ports |
| `env` | object | No | Environment variables passed to the container |

## CLI Commands

### `hub services up`

Start all services in the background:

```bash
hub services up

This generates a docker-compose.yml from hub.yaml (if it doesn’t exist) and runs docker compose up -d.

hub services down

Stop all services:

hub services down

hub services ps

Show status of running services:

hub services ps

hub services logs

Follow logs from all services, or a specific one:

# All services
hub services logs

# Specific service
hub services logs mysql

hub services restart

Restart all services:

hub services restart

hub services clean

Stop services and remove volumes (resets all data):

hub services clean

Generated docker-compose.yml

The CLI generates a docker-compose.yml from the services section. Example output:

services:
  mysql:
    image: mysql:8.0
    restart: unless-stopped
    ports:
      - "3306:3306"
    environment:
      MYSQL_ROOT_PASSWORD: root
      MYSQL_DATABASE: myapp
    volumes:
      - mysql_data:/var/lib/mysql

  redis:
    image: redis:7-alpine
    restart: unless-stopped
    ports:
      - "6379:6379"
    volumes:
      - redis_data:/var/lib/redis

volumes:
  mysql_data:
  redis_data:

Volumes and restart: unless-stopped are automatically added by the CLI. The volume mount path is inferred from the image name (e.g. mysql -> /var/lib/mysql, redis -> /var/lib/redis, postgres -> /var/lib/postgresql/data).

Integration with Setup

hub setup starts services automatically. Skip with --skip-services:

hub setup --skip-services

Sandbox

The sandbox service type runs an AIO Sandbox container — a full Linux environment with a real browser, code execution, and MCP endpoint. It’s designed for AI agents to run builds, tests, and browser automation in isolation.

Configuration

services:
  - name: sandbox
    type: sandbox
    port: 8080

Or with TypeScript:

services: [
  { name: "sandbox", type: "sandbox", port: 8080 },
],
FieldTypeRequiredDefaultDescription
namestringYesService name
type"sandbox"YesMust be "sandbox"
portnumberNo8080Host port mapped to the sandbox
workspacestringNo.Path to mount inside the container
envobjectNoExtra environment variables

CLI Commands

hub sandbox up       # Start the sandbox container
hub sandbox down     # Stop the sandbox container
hub sandbox status   # Check if it's running (default)
hub sandbox logs     # Follow container logs
hub sandbox open     # Open VSCode Server in the browser

Endpoints

When running, the sandbox exposes:

EndpointDescription
http://localhost:<port>/mcpMCP endpoint for AI agents
http://localhost:<port>/code-server/VSCode in the browser
http://localhost:<port>/vnc/index.html?autoconnect=trueReal browser via VNC
http://localhost:<port>/v1/docsAPI documentation

Integration with hub generate

When a sandbox service is configured, hub generate automatically:

  1. Adds a sandbox MCP entry to the editor config (Cursor, Kiro)
  2. Injects a “Sandbox Environment” section into QA and coding agent prompts (qa-frontend, qa-backend, coding-frontend, coding-backend)

This lets agents run shell commands, execute code, control a browser, and read/write files inside the sandbox without touching the host machine.