Generated SDKs
Fluffy eliminates runtime environment variable parsing and broken connection strings by compiling capability bindings into type-safe SDK packages.
#Overview
When you run fluffy-chainsaw generate, Fluffy inspects the resolved topology and generates runtime clients directly into your application's source tree under .fluffy/.
#Go Runtime Bindings
In Go runtimes, import the generated client to interact with your databases, topics, and secrets:
1package main23import (4 "context"5 "log"6 "my-project/.fluffy/sdk/database"7 "my-project/.fluffy/sdk/topic"8)910func main() {11 ctx := context.Background()1213 // Fully typed database connection pool14 db, err := database.GetPrimaryMainDb(ctx)15 if err != nil {16 log.Fatalf("failed to connect: %v", err)17 }1819 // Publish typed events20 ordersTopic, err := topic.GetOrdersTopic(ctx)21 ordersTopic.Publish(ctx, []byte("order-payload"))22}#TypeScript Browser SDK
For web entrypoints and portals:
1import { createFluffyClient } from '~/generated/fluffy-client'23const client = createFluffyClient({4 endpoint: process.env.VITE_API_ENDPOINT,5})67// Type-safe RPC with automatic token injection8const result = await client.orders.create({9 sku: 'FLUFFY-CORE-01',10 quantity: 2,11})#Drift Detection in CI
Prevent untested code or mismatched capability requirements from reaching production:
1fluffy-chainsaw generate --application storefront --check If a developer changed a database permission or added a secret without regenerating code, the check command exits with a non-zero status code.