Effect: The Standard Library for Production TypeScript
Effect is a library for building robust, maintainable, type-safe, and production-grade applications in TypeScript. It helps you handle the hard problems at scale: typed errors, dependency injection, structured concurrency, scheduling, tracing, and unified schema validation.
Installation
npm install effect
TypeScript & Runtime Requirements
Effect is engineered to take full advantage of TypeScript's strongest type inference engine. Verify your project meets these compiler constraints:
TypeScript 5.9+ is the required minimum. TypeScript 7 is strongly recommended for the best type-checking performance and full compatibility with Effect's native TypeScript language tooling (tsgo).
Node.js 18+ is the general baseline runtime for running Effect on Node.js. Specific integration packages require newer runtimes; for instance, @effect/sql-sqlite-node requires Node.js 22.16 or newer for native SQLite bindings.
Official Effect Packages (32)
effectCoreCore runtime, lightweight green-thread fiber system, typed errors, and structured concurrency.
npm install effect@effect/platform-browserWeb platform abstractions for browser DOM, fetch, storage, and worker communications.
npm install @effect/platform-browser@effect/platform-bunUltra-fast Bun runtime integration leveraging Bun native APIs.
npm install @effect/platform-bun@effect/platform-denoDeno runtime bindings for file system, streams, and subprocesses.
npm install @effect/platform-deno@effect/platform-nodeNode.js production runtime with native streams, file system, and HTTP server.
npm install @effect/platform-node@effect/platform-node-sharedShared utility layer for Node-compatible runtimes and toolchains.
npm install @effect/platform-node-shared@effect/sql-clickhouseHigh-throughput analytical OLAP database driver with stream decoding.
npm install @effect/sql-clickhouse@effect/sql-d1Cloudflare D1 edge database driver with transaction and batching support.
npm install @effect/sql-d1@effect/sql-libsqlTurso and LibSQL distributed edge SQLite client with embedded replicas.
npm install @effect/sql-libsql@effect/sql-mssqlEnterprise Microsoft SQL Server client with connection pooling and typed parameters.
npm install @effect/sql-mssql@effect/sql-mysql2MySQL 8 and MariaDB async connection pool with typed statement execution.
npm install @effect/sql-mysql2@effect/sql-pgPostgreSQL connection manager with connection pooling, migrations, and streaming.
npm install @effect/sql-pg@effect/sql-pgliteEmbedded WASM Postgres in-process driver for Node, browser, and edge testing.
npm install @effect/sql-pglite@effect/sql-sqlite-bunNative Bun SQLite bindings with compiled C++ execution speed.
npm install @effect/sql-sqlite-bun@effect/sql-sqlite-doCloudflare Durable Objects embedded SQLite storage driver.
npm install @effect/sql-sqlite-do@effect/sql-sqlite-nodeNode 22.16+Node.js SQLite integration using node:sqlite (Requires Node.js 22.16+).
npm install @effect/sql-sqlite-node@effect/sql-sqlite-react-nativeOffline-first SQLite persistence driver for React Native iOS and Android apps.
npm install @effect/sql-sqlite-react-native@effect/sql-sqlite-wasmIn-memory and IndexedDB-backed SQLite compiled to WebAssembly.
npm install @effect/sql-sqlite-wasm@effect/ai-anthropicAnthropic Claude 3.5 Sonnet & Opus client with typed streaming and tool calling.
npm install @effect/ai-anthropic@effect/ai-openaiOpenAI GPT-4o, o1, and embeddings client with structured JSON output schemas.
npm install @effect/ai-openai@effect/ai-cloudflareCloudflare Workers AI edge model inferences with zero cold starts.
npm install @effect/ai-cloudflare@effect/ai-typesafeEnd-to-end typed schema validation for AI agents, prompt outputs, and tool dispatch.
npm install @effect/ai-typesafe@effect/ai-openai-compatDrop-in driver for local models (Ollama, vLLM, LM Studio) and third-party APIs.
npm install @effect/ai-openai-compat@effect/ai-openrouterUnified multi-model API router accessing 200+ frontier and open-weight models.
npm install @effect/ai-openrouter@effect/atom-reactFine-grained reactive state atoms and fiber subscription hooks for React 18 & 19.
npm install @effect/atom-react@effect/atom-solidSolid.js reactive signals powered by Effect concurrent runtime and error channels.
npm install @effect/atom-solid@effect/atom-vueVue 3 Composition API refs and reactive bindings linked to Effect fibers.
npm install @effect/atom-vue@effect/opentelemetryZero-overhead OpenTelemetry tracing, spans, baggage, and metrics propagation.
npm install @effect/opentelemetry@effect/vitestVitest integration providing effect-aware it.effect test runners and assertions.
npm install @effect/vitest@effect/docgenAutomated documentation and API website generator from TypeScript docstrings.
npm install @effect/docgen@effect/doctestAutomated test runner that type-checks and verifies code blocks in markdown docs.
npm install @effect/doctest@effect/openapi-generatorCompiles Effect Schema definitions directly into OpenAPI 3.1 specifications.
npm install @effect/openapi-generatorLong-Term Support: Effect 4.x & Effect 3.x
Teams depend on Effect for production architectures they expect to run for years. Effect provides clear long-term support (LTS) lifecycle stability:
Active Long-Term Support milestone. Incorporates zero-cost fiber scheduling, unified Schema validation, optimized microtask dispatching, and full TypeScript 7 forward compatibility.
The established major release powering thousands of production services. Receives critical security patches and backwards-compatible maintenance updates.
Upgrading from Effect 3.x to 4.x is smooth with automated codemods and the comprehensive MIGRATION.md guide.
Let's Talk
Whether your team is considering Effect, rolling it out, or already running it in high-throughput production, the core team would love to hear from you:
Introduce your team on Discord or email contact@effectful.co. Happy to connect privately on Slack or Discord for feedback and architectural guidance.
Exploring dedicated support for mission-critical enterprise systems. If your organization has specific SLA, vulnerability auditing, or private roadmap needs, reach out directly.
Official Adoption Partners offer hands-on implementation, consulting, team extension, staff training, and commercial support.
Official Links & Community Hub
Effect is 100% open-source software, free for both personal and enterprise commercial use.
