FabricFabricHarness
Reference

Connector Recipes (`fh add`)

Pipe Markdown connector recipes into Claude / Codex / Cursor / Aider / OpenCode and have them scaffold a Fabric Harness sandbox, MCP, knowledge-base, or data adapter into your project.

fabric-harness add (alias fh add) supports direct scaffold recipes and TTY-aware Markdown connector guides. Use a scaffold when Fabric owns the file shape; use a guide when provider SDK versions, authentication, or project conventions need local adaptation.

Recipes today are thin wiring on top of the package helpers — the package owns the tested implementation, the recipe wires it into your specific project layout, env vars, and lifecycle. For most providers you can also import the helper directly without scaffolding (see Connector catalog).

Common usage

# List all available recipes (and the agent the CLI auto-detected for you)
fh add
fh add --json

# Scaffold implementation + env example + test
fh add slack
fh add modal
fh add channel slack
fh add channel discord
fh add database postgres
fh add databricks lakebase
fh add lakehouse
fh add sandbox e2b --dir ./service
fh add policy safe-defaults
fh add channel slack --no-install
fh add channel slack --dry-run

# Review and apply a managed upgrade
fh update slack --dry-run
fh update channel slack --dry-run
fh update channel slack

# Pipe a known recipe to your coding agent
fh add daytona | claude
fh add github-mcp | codex
fh add discord --install-deps | codex
fh add mintlify-mcp | cursor-agent
fh add fumadocs | aider

# Build a brand-new connector from a provider's docs URL
fh add https://e2b.dev --category sandbox | claude

# Print the markdown without piping (for inspection)
fh add daytona --print

For a unique managed alias, fh add <name> installs the recipe. Use --print to request the legacy Markdown guide explicitly. Names without a managed recipe retain the TTY-aware guide behavior.

Categories

Direct scaffold kinds:

KindCurrent recipes
channel18 maintained provider adapters plus generic webhook
databasePostgres, MySQL, MongoDB, Redis, SQLite, libSQL, Turso, Supabase, Valkey
sandboxDaytona, E2B, Modal, Vercel, Cloudflare Sandbox, Cloudflare Shell, Boxd, exe.dev, Islo, Mirage, smolvm
databrickscore, sql, lakebase, ai-search, rag-chain, lakeflow, jobs, system-tables-cost, apps, agent-services, genie, analyst (see Databricks recipes)
toolingBraintrust, Jetty, OpenTelemetry, Sentry, Vitest Evals
model-providerOpenAI, Azure OpenAI
skillAnalyze table
policySafe defaults

Connector-guide categories:

The Markdown recipes are grouped into four categories that map to Fabric Harness primitives:

CategoryMaps toExamples
sandboxSandboxFactoryDaytona, E2B, Modal, Vercel Sandbox
mcpconnectMcpServerGitHub, Linear, Mintlify, Slack
kbFilesystemSourceFumadocs (also localDirectorySource, r2FilesystemSource, s3FilesystemSource, azureBlobFilesystemSource, httpFilesystemSource in the SDK)
dataCommand / ToolDefPostgres, Notion REST
channelChannel + outbound ToolDefDiscord, Messenger, Slack, Stripe, Teams, and the remaining channel catalog
databaseScoped data tools and first-party unified persistencelibSQL/Turso, MongoDB, MySQL, Redis/Valkey, Supabase/Postgres
toolingEvent/eval integrationBraintrust, Jetty, OpenTelemetry, Sentry, Vitest evals

Auto-detected coding agents

fh add detects the agent you're running under and shows the matching pipe hint:

DetectedPipe hint
Claude Code (CLAUDE_CODE, CLAUDE_PROJECT_DIR)| claude
OpenAI Codex (CODEX_AGENT, CODEX_HOME)| codex
Cursor Agent (CURSOR_AGENT, CURSOR_TRACE_ID)| cursor-agent
Aider (AIDER_RUNNING)| aider
OpenCode (OPENCODE)| opencode
(none detected)| claude (canonical default)

Override by passing --print and piping yourself.

Versions and safe updates

Direct scaffolds declare aliases, a positive recipe version, compatible package ranges, managed files, upgrade notes, and package-manager-specific verification commands. Generated TypeScript and Markdown begin with fabric-harness-recipe: <kind>/<name>@<version>.

fh update reads those markers and creates a complete plan before changing the project. It adopts unmarked legacy files only when they exactly match generated content, stops on user modifications, preserves compatible dependency ranges, and rejects ranges that cannot overlap the recipe contract. Use --dry-run --json in CI or automation.

URL-form recipes

When you pass a URL instead of a known recipe name, fh add emits a generic "scaffold a connector from these docs" prompt. The agent then fetches the URL and writes the adapter:

fh add https://docs.modal.com --category sandbox | claude
fh add https://api.intercom.io --category data | codex

The receiving agent gets:

  1. The docs URL.
  2. The category (so it knows whether to produce a SandboxFactory, connectMcpServer call, FilesystemSource, or Command/ToolDef).
  3. A short template showing the file shape and the secret(<env-var>) pattern for credentials.

Where the recipes live

Direct scaffold recipes are typed definitions and ship with the CLI. Connector guides are Markdown files with local and bundled lookup:

Recipes are Markdown files in connectors/ at the repo root. The CLI looks for them in:

  1. The user's current project (walking up to find ./connectors/<file>.md)
  2. The CLI's own bundled copy (when developing this repo locally) The installed CLI's managed recipes work without cloning the source repository. Repository-only guides and authoring files require source access; public documentation does not link to the restricted raw GitHub origin.

Authoring a new recipe

  1. For a direct scaffold, add a typed recipe with a version, dependency ranges, managed files, and a verification command.
  2. For a guide, create connectors/<category>--<name>.md. Use the existing guides as templates: short, agent-friendly, no secrets.
  3. Add guide metadata to CONNECTOR_RECIPES in packages/cli/bin/fabric-harness.ts.
  4. Add clean-install and update/conflict fixtures when changing generated files or dependencies.
  5. Open a change through the authorized source workflow. Once released, the direct recipe alias and its bundled guide are available from the installed CLI.

See also