# Metaverse — task runner

[private]
default:
    @just --list

# ── Infrastructure (Postgres + Metabase) ───────────────────────────────────────

# Start Postgres and Metabase
[group('infrastructure')]
up:
    docker compose up -d

# Stop services (data is preserved)
[group('infrastructure')]
down:
    docker compose down

# Stop and remove all data (full reset)
[group('infrastructure')]
reset:
    docker compose down -v

# First-run setup: creates Metabase admin account + API key (copy output to .env)
[group('infrastructure')]
setup:
    uv run scripts/setup.py

# ── MCP server ─────────────────────────────────────────────────────────────────

# Start the MCP server locally (requires .env with METABASE_API_KEY)
[group('mcp')]
serve:
    uv run metaverse

# Register the MCP server with Claude Code (run once per machine)
[group('mcp')]
mcp-add:
    claude mcp add --transport http metaverse http://localhost:8000/mcp

# ── Python ─────────────────────────────────────────────────────────────────────

# Install / sync dependencies
[group('python')]
sync:
    uv sync

# Lint
[group('python')]
lint:
    uv run ruff check src/ tests/

# Format
[group('python')]
fmt:
    uv run ruff format src/ tests/

# Lint + format check (CI)
[group('python')]
check:
    uv run ruff check src/ tests/
    uv run ruff format --check src/ tests/
