Skip to content

Getting Started

This guide explains how to install and configure the Claude Code Plugin for EventSourcingDB. At the end, you will have the plugin installed and connected to your EventSourcingDB instance.

Before You Begin

You need a running EventSourcingDB instance and a valid API token for it. If you haven't set one up yet, see Running EventSourcingDB. Alternatively, once the plugin is installed, it can start a local development instance for you using Docker – see Available Skills.

Adding the Marketplace

The plugin is distributed through the thenativeweb plugin marketplace. Add it to Claude Code:

/plugin marketplace add thenativeweb/claude-plugins

You only need to do this once. The marketplace will be available in all future Claude Code sessions.

Installing the Plugin

Install the EventSourcingDB plugin from the marketplace:

/plugin install esdb@thenativeweb

Configuring the Connection

The plugin reads two environment variables to connect to your EventSourcingDB instance:

Variable Description Default
ESDB_URL The base URL of your EventSourcingDB instance. http://localhost:3000
ESDB_API_TOKEN The API token used to authenticate with EventSourcingDB. Claude will ask you if not set.

In addition, two optional environment variables control how Claude constructs events. Skills that write events or register schemas need a consistent event source and a common reverse-domain prefix for event types, so that all events created in a session share a uniform format:

Variable Description Default
ESDB_SOURCE The source to use for new events, as a URI (e.g., https://library.example.io). See Sources. Claude will ask you once per session if not set.
ESDB_EVENT_TYPE_PREFIX The reverse-domain prefix for new event types (e.g., io.example.library). See Event Types. Claude will ask you once per session if not set.

Set the variables in your shell before starting Claude Code:

export ESDB_URL="http://localhost:3000"
export ESDB_API_TOKEN="your-api-token"
export ESDB_SOURCE="https://library.example.io"
export ESDB_EVENT_TYPE_PREFIX="io.example.library"

Verifying the Connection

To verify that the plugin is installed and can reach your EventSourcingDB instance, type:

/esdb:ping

Claude will send a ping request to your EventSourcingDB instance and confirm whether the connection is healthy.

For a list of all available Skills and what they do, see Available Skills.