--- title: Getting Started description: Set up EventDBX locally, define schemas, and append your first event. nav_id: guides ---
Guide

Launch EventDBX locally in four steps.

Install the CLI, start the server, codify a schema, and write your first event. These commands mirror the ones we ship in production runbooks. The binary installs as eventdbx and also registers a shorter dbx alias.

$ curl -LsSf https://github.com/thachp/eventdbx/releases/download/v1.12.2/eventdbx-installer.sh | sh

$ dbx start --foreground
REST and GraphQL listening on http://0.0.0.0:7070
CLI socket ready on tcp://0.0.0.0:6363

1. Install the CLI

Grab the latest release for macOS, Linux, or Windows. Install scripts add the binary to your path and create a config directory under $HOME/.eventdbx.

$ curl --proto '=https' --tlsv1.2 -LsSf https://github.com/thachp/eventdbx/releases/download/v1.12.4/eventdbx-installer.sh | sh

# PowerShell
PS> irm https://github.com/thachp/eventdbx/releases/download/v1.12.4/eventdbx-installer.ps1 | iex

What the installer handles

  • Downloads native binaries for x86 and arm.
  • Initialises config with sane defaults.
  • Bootstraps completions when your shell supports them.

2. Start the server

Run the server in the foreground while you iterate. When the process is alive, the CLI proxies writes through the REST API automatically.

$ dbx start --foreground
INFO binding REST + GraphQL on http://0.0.0.0:7070
INFO binding CLI socket on tcp://0.0.0.0:6363
INFO restriction enabled (schema enforcement active)

Configuration tips

  • --api rest,graphql,grpc toggles surfaces.
  • --data-dir ./state attaches storage anywhere.
  • --restrict=false relaxes schema enforcement for experiments.

3. Define a schema

Schemas lock down which events each aggregate accepts and how frequently snapshots occur. Keep them in version control and deploy them through CI.

$ dbx schema create \
    --aggregate patient \
    --events patient-added,patient-updated \
    --snapshot-threshold 100

Schema stored at $HOME/.eventdbx/schemas/patient.json

Schema fields

  • aggregate is the identifier used in API calls.
  • events enumerates permitted event types.
  • snapshot-threshold controls hydration speed for large timelines.

4. Append your first event

Use the CLI for the smoothest experience or hit the REST API directly. Both paths land the same immutable event.

$ dbx aggregate apply patient p-002 patient-added \
    --field name="Jane Doe" \
    --field status=active

$ curl -X POST http://127.0.0.1:7070/v1/events \
    -H "Authorization: Bearer ${EVENTDBX_TOKEN}" \
    -H "Content-Type: application/json" \
    -d '{
        "aggregate_type": "patient",
        "aggregate_id": "p-002",
        "event_type": "patient-added",
        "payload": {
            "name": "Jane Doe",
            "status": "active"
        }
    }'

Next steps

  • Inspect timelines with dbx aggregate events patient p-002.
  • Monitor health at http://127.0.0.1:7070/health.
  • Promote to staging by replaying the event log or restoring a snapshot.

Keep going.

Dive into the API and CLI references to wire EventDBX into your workflows and automation.