effect README

The project's README from github.com/Effect-TS/effect. As one markdown file: README.md.

pkg.pr.new

Effect

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.

Effect V4 is currently a release candidate. The main branch contains v4 development.

Install V4 RC

npm install effect@rc

Requirements

Effect v3

The Effect v3 source code is available on the v3 branch, which is also where issues and pull requests meant for Effect v3 should be targeted.

Packages

This monorepo contains the core effect package alongside integration packages that extend it. All v4 packages are published under the rc tag on npm.

Package Description API Reference
effect The core package docs
@effect/platform-browser Platform services for the browser docs
@effect/platform-bun Platform services for Bun docs
@effect/platform-deno Platform services for Deno docs
@effect/platform-node Platform services for Node.js docs
@effect/platform-node-shared Shared services for Node.js-compatible runtimes docs
@effect/sql-clickhouse SQL client for ClickHouse docs
@effect/sql-d1 SQL client for Cloudflare D1 docs
@effect/sql-libsql SQL client for libSQL docs
@effect/sql-mssql SQL client for Microsoft SQL Server docs
@effect/sql-mysql2 SQL client for MySQL docs
@effect/sql-pg SQL client for PostgreSQL docs
@effect/sql-pglite SQL client for PGlite docs
@effect/sql-sqlite-bun SQL client for SQLite via bun:sqlite docs
@effect/sql-sqlite-do SQL client for Cloudflare Durable Objects SQLite docs
@effect/sql-sqlite-node SQL client for SQLite via node:sqlite docs
@effect/sql-sqlite-react-native SQL client for SQLite in React Native docs
@effect/sql-sqlite-wasm SQL client for SQLite compiled to WebAssembly docs
@effect/ai-anthropic Anthropic provider for the Effect AI modules docs
@effect/ai-openai OpenAI provider for the Effect AI modules docs
@effect/ai-openai-compat OpenAI-compatible API provider for the Effect AI modules docs
@effect/ai-openrouter OpenRouter provider for the Effect AI modules docs
@effect/atom-react React bindings for Effect Atom docs
@effect/atom-solid SolidJS bindings for Effect Atom docs
@effect/atom-vue Vue bindings for Effect Atom docs
@effect/opentelemetry OpenTelemetry integration docs
@effect/vitest Helpers for testing with Vitest docs
@effect/docgen Documentation generator for Effect projects docs
@effect/doctest Runs JSDoc examples as Vitest tests docs
@effect/openapi-generator Generate Effect code from OpenAPI specifications docs

Resources

License

MIT

effect (Effect-TS/effect)

Searching Database…

17.3K ·GitHub
这是什么?Effect 是一个 TypeScript 库,用来构建健壮、易维护、类型安全、可上生产的应用。它解决的是大规模开发中的那些难题:类型化错误、依赖注入、结构化并发、任务调度、链路追踪,以及 schema 校验。
它是一个单独的库,还是一整套包生态?是一个生态:这个 monorepo 里既有核心的 effect 包,也有围绕它的各种集成包——平台服务、SQL 客户端、AI 服务商、UI 绑定、OpenTelemetry,以及测试辅助工具。
在引入 Effect 之前,我的项目需要满足什么条件?需要 TypeScript 5.9 或更高版本,并在 tsconfig.json 里开启 strict 选项——想要在 Effect 的工具链下获得最佳性能,推荐使用 TypeScript 7。在 Node.js 上,一般最低要求 18 或更高版本。
我的 Node 版本能跑吗?大概率可以——一般最低要求是 Node.js 18+,但有些集成包需要更新的运行时;比如 @effect/sql-sqlite-node 就要求 Node.js 22.16 或更高版本。
Effect 能在哪些环境运行——只能在 Node 里用吗?不是。除了 Node.js,还有面向 Bun、Deno 和浏览器的平台包,SQL 客户端甚至支持 Cloudflare D1、Cloudflare Durable Objects、React Native,以及编译成 WebAssembly 的 SQLite。
它为哪些数据库提供了客户端?PostgreSQL、MySQL、Microsoft SQL Server、ClickHouse、libSQL、PGlite、Cloudflare D1,以及多种形态的 SQLite(node、Bun、WASM、React Native、Durable Objects),全部通过 @effect/sql-* 系列客户端包提供。
它能对接 OpenAI、Anthropic 这类 AI 服务商吗?可以——Effect AI 模块提供了针对 Anthropic、OpenAI、任何 OpenAI 兼容 API,以及 OpenRouter 的服务商接入:@effect/ai-anthropic、@effect/ai-openai、@effect/ai-openai-compat 和 @effect/ai-openrouter。
它和 React、Vue、SolidJS 配合得好吗?配合得很好——Effect Atom 为 React、SolidJS 和 Vue 提供了官方绑定。测试方面有 Vitest 辅助工具(@effect/vitest)、能把 JSDoc 示例转成测试的运行器(@effect/doctest),还有 OpenTelemetry 集成。
What are similar projects?gitagent, mastra, auth, agento11y, lo, ramda, dagger, mlflow
Creator
Effect-TS
Size
144.6 MB
Stars
17.3K
Age
6y
Commits · 90 Days