> ## Documentation Index
> Fetch the complete documentation index at: https://docs.eventdbx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Install the `dbx` CLI, start the daemon, mint a token, and write your first aggregate.

EventDBX ships as a single CLI named `dbx`. Follow the steps below to go from zero to a running daemon with authenticated client access.

<Steps>
  <Step title="Install and start the daemon">
    ```bash theme={null}
    npm install -g eventdbx
    dbx start --foreground
    ```

    * Omit `--foreground` to run as a background service.
    * Use `--restrict=strict` once your schemas are locked in.
    * Logs stream to stdout; press `Ctrl+C` to stop the daemon when running in the foreground.
  </Step>

  <Step title="Mint a token">
    Generate boostrap token for initial access

    ```bash theme={null}
    dbx token bootstrap --stdout
    ```

    * Revoke tokens with `dbx token revoke <jti>` if they leak.
    * Mint short-lived tokens with `dbx token generate ... --ttl 10m`.
    * See [Authorization](/core-concepts/authorization) for scoping `--action`/`--resource` and tenants.
  </Step>

  <Step title="Connect with the JavaScript SDK">
    ```ts theme={null}
    import { createClient } from "eventdbxjs";

    const client = createClient({
      ip: process.env.EVENTDBX_HOST ?? "127.0.0.1",
      port: Number(process.env.EVENTDBX_PORT) || 6363,
      token: process.env.EVENTDBX_TOKEN,
      tenantId: "default",
    });

    await client.connect();

    await client.create("person", "p-110", "person_created", {
      payload: {
        fist_name: "Demo",
        last_name: "Demo",
        email: "jane@example.com",
      },
      metadata: { "@createdBy": "<current-id>" },
      note: "person created by <email>",
    });

    const history = await client.events("person", "p-110");
    console.log("Event count:", history.length);

    await client.disconnect();
    ```

    Swap in the Python, Java, PHP, .NET, or Go SDKs described on the Client SDKs page if you prefer another language.
  </Step>
</Steps>

## Next steps

* **Schema setup**: use CLI schema commands to create and evolve schemas (e.g., `dbx schema create ...`, `dbx schema add ...`, `dbx schema remove ...`, `dbx schema field ...`, `dbx schema alter ...`), or edit the `schema.json` files under your shard folders if you prefer to define them manually; see `dbx schema --help` for the full command surface.
* **Snapshots and verification**: `dbx aggregate snapshot <aggregate> <id>` materializes the latest state, and `dbx aggregate verify` recomputes Merkle roots when you need to prove integrity.
* **Replication**: run `dbx watch standby` to stream changes to a standby node, or `dbx push/pull` for one-off syncs.
* **Plugins**: configure HTTP or TCP plugins to fan events out to downstream services once your domain is populated.

<Note>Every CLI command accepts `--config <path>` if you need to target a custom configuration file or environment.</Note>
