Skip to main content

Define events once. Ship to any analytics provider.

Stop coupling instrumentation to a single analytics vendor. event-spec lets you define events once in YAML, generate type-safe wrappers for every language, and swap providers without touching application code.

📋

Event Contract Layer

Define events once in YAML with versioning, JSON Schema validation, and breaking-change detection using SchemaVer.

🔌

SDK Runtime Layer

Pluggable analytics destinations behind a stable Provider interface. Hooks, context propagation, queueing, and dispatch included.

Codegen Layer

Generate language-native typed wrappers from your event registry for Go, TypeScript, and Kotlin (Swift, Python planned).

🏛️

Governance Layer

Registry server with REST API, audit tooling to scan codebases for event usage, and automatic catalog generation.

Provider Ecosystem

Amplitude
PostHogsoon
Mixpanelsoon
Segmentsoon
GA4soon
RudderStacksoon

SDK Support

Go TypeScript Kotlin Swift Python Rust

From spec to instrumented in minutes

specs/ecommerce/product_viewed/1-0-0.yaml
# specs/ecommerce/product_viewed/1-0-0.yaml
$schema: "https://event-spec.io/schemas/event/v1"
name: product_viewed
display_name: "Product Viewed"
version: "1-0-0"
status: active
namespace: ecommerce
type: track
event_name: "Product Viewed"

properties:
product_id:
type: string
required: true
category:
type: string
required: true
enum: [clothing, electronics, other]
currency:
type: string
required: false
default: "USD"