Just Fucking Use Effect
You've tried everything else. The 47 npm packages. The spaghetti try-catch blocks.
The "it works on my machine" deployments.
It's time to stop coping.
npm install effect
// That's it. That's the tweet.
// No 47 dependencies. No config files.
// Just vibes and type safety.
/// Why Should You Give a Fuck?
Try-Catch is a War Crime
You know that feeling when you wrap everything in try-catch and pray? Effect treats errors as values. Your compiler literally tells you what can fail. Revolutionary, we know.
Promise.all is a Death Trap
One failure = everything explodes. No retry. No cleanup. No survivors. Effect has retries, timeouts, and interruption built in. Like an adult wrote it.
Your node_modules is a Landfill
47 dependencies for basic functionality? Effect is batteries-included. It's TypeScript's missing standard library. Marie Kondo would be proud.
You Don't Need a PhD in FP
Functional programming without the gatekeeping. No monad lectures. No category theory homework. Just good patterns that work.
Observability That Doesn't Suck
Built-in tracing. OpenTelemetry support. Metrics that actually mean something. See exactly where your code is slow or stupid.
Production-Ready Since Day One
Not some academic experiment. Real companies ship real products with Effect. Version 3.0 is API stable. This shit works.
/// Developer Confessions
"I used to mass-catch everything and log 'something went wrong'. Now I know exactly what failed and why. My therapist is concerned I'm too happy."
"My node_modules used to be 2GB. Now it's just Effect and vibes. I can finally see my children again."
"Someone told me Effect was 'functional programming' and I panicked. Then I used it and realized I don't need to know what a monad is. Thank fuck."
/// What You Actually Get
/// Building AI Agents? Yeah, Effect Does That Too
LLMs are non-deterministic chaos machines. APIs fail. Rate limits hit. Responses stream. Tokens run out. Effect was literally built for this shit.
Provider-Agnostic
Write your agent logic once. Swap between OpenAI, Anthropic, Google, or Amazon Bedrock at runtime. No rewrites. No vendor lock-in. Just vibes.
Reliability Built-In
Retries with backoff. Timeouts. Circuit breakers. Rate limiting. All the things you'd have to build yourself, except you don't have to. Because Effect.
Structured Concurrency
Run multiple LLM calls in parallel. Cancel stale requests. Race providers against each other. Stream partial results. All safely managed. No orphaned promises.
Actually Testable
Mock your LLM responses. Inject test doubles. No more "I hope this works in prod" prayers. Your AI code can have real tests now.
import { AiChat } from "@effect/ai"
import { OpenAiClient } from "@effect/ai-openai"
import { Effect, Schedule } from "effect"
const askAgent = (prompt: string) =>
Effect.gen(function* () {
const ai = yield* AiChat
const response = yield* ai.generateText({
prompt,
system: "You are a helpful assistant"
}).pipe(
Effect.retry(Schedule.exponential("500 millis")),
Effect.timeout("30 seconds"),
Effect.withSpan("ai.generateText") // Built-in tracing!
)
return response.text
})
// Swap providers without changing business logic
const program = askAgent("Explain monads like I'm 5").pipe(
Effect.provide(OpenAiClient.layer({ apiKey }))
// Or: AnthropicClient.layer(), GoogleClient.layer(), etc.
)
Real companies like 14.ai use Effect for production AI agent systems. Because when your AI talks to customers, "it works sometimes" isn't good enough.
/// "But Effect Looks Hard to Learn"
LLMs are really fucking good at writing Effect code. Claude, GPT-4, Gemini โ they all know Effect. The patterns are consistent, the types guide the way, and the docs are excellent training data.
Types Are The Prompt
Effect's rich type signatures tell LLMs exactly what to write. Error types, dependencies, return values โ it's all in the signature. The AI doesn't have to guess.
Consistent Patterns
Effect code follows predictable patterns. Effect.gen, pipe, Layer โ once an LLM sees the pattern, it nails it every time. Unlike your spaghetti async/await.
Self-Documenting
The type system makes code intentions crystal clear. LLMs can read Effect code and understand what it does. Try that with your 500-line try-catch pyramid.
Vibe Coding Works
Describe what you want in plain English. The LLM writes type-safe, error-handled, properly structured Effect code. You review, tweak, ship. Welcome to 2025.
import { Effect, Schedule, Console } from "effect"
const fetchUserWithRetry = (id: string) =>
fetchUser(id).pipe(
Effect.retry(
Schedule.recurs(3).pipe(
Schedule.intersect(Schedule.exponential("1 second"))
)
),
Effect.timeout("10 seconds"),
Effect.tap((user) =>
Console.log(`Fetched user: ${user.name}`)
),
Effect.tapError((error) =>
Console.error(`Failed to fetch user: ${error}`)
)
)
// Type: Effect<User, UserNotFound | TimeoutException, never>
// The compiler knows EXACTLY what can go wrong. Magic.
Seriously, just ask your favorite LLM to write Effect code. It's scary good. The learning curve everyone worries about? The AI already climbed it for you.
Stop Fucking Around
You've read this far. You know your current code is held together by hope and console.logs. Make the switch.
npm install effect