Installation
Get started with Effect by installing the package in your TypeScript project.Effect v4.0.0-beta is currently in beta. The package is production-ready, but the version number indicates that minor API changes may occur before the stable 4.0.0 release.
Install Effect
Install theeffect package using your preferred package manager:
4.0.0-beta.21.
Requirements
Effect requires the following minimum versions:- TypeScript: 5.9 or higher
- Node.js: 18.0 or higher (for Node.js environments)
TypeScript configuration
Ensure yourtsconfig.json has strict mode enabled for the best type-safety:
tsconfig.json
Project setup
Create a new project
If you’re starting from scratch, create a new directory and initialize a package.json:
Package structure
Effect is distributed as a single package with multiple entry points:effect- Core functionality (Effect, Schema, Layer, etc.)effect/testing- Testing utilitieseffect/unstable/ai- AI and language model integrationseffect/unstable/cli- CLI application utilitieseffect/unstable/cluster- Distributed cluster capabilitieseffect/unstable/http- HTTP clienteffect/unstable/httpapi- HTTP API servereffect/unstable/observability- Observability exports (OTLP, etc.)effect/unstable/process- Child process managementeffect/unstable/sql- SQL database integrations- And many more…
Modules under
unstable/ are stable in functionality but may have API changes as they graduate to the stable API surface.Platform packages
For Node.js or Bun-specific functionality, you may want to install platform packages:- File system operations
- HTTP server and client
- Command line interface utilities
- Process management
- Runtime utilities
Verify installation
Create a simple test file to verify everything is working:src/test.ts
Next steps
Now that Effect is installed, continue to the quick start guide to build your first program:Quick start
Build your first Effect program