Wyrly DI is a dependency injection toolkit for explicit, analyzable, type-safe application architecture. Use it when you want dependency injection for modern TypeScript apps without legacy decorator metadata, automatic runtime type guessing, or framework lock-in.Documentation Index
Fetch the complete documentation index at: https://docs.wyrly.dev/llms.txt
Use this file to discover all available pages before exploring further.
Get started
Install
@wyrly/core for Deno, Node.js, or Bun and create your first container.Why Wyrly?
Learn why Wyrly uses typed tokens, explicit dependencies, and standard decorators.
Framework adapters
Add request-scoped DI to Next.js, Express, Hono, Fresh, or GraphQL.
API reference
See the stable public exports for Wyrly DI v2.0.
What Wyrly is for
Wyrly is designed for TypeScript applications that value clear composition roots, explicit dependencies, and framework-independent domain code. It fits especially well with DDD and Clean Architecture, where use cases depend on ports and the outer layer wires concrete infrastructure through typed tokens.Core ideas
- No
reflect-metadata - No
emitDecoratorMetadata - No parameter decorators
- Type-safe tokens
- Explicit dependencies
- Singleton, scoped, and transient lifetimes
- Request scopes for web frameworks
- Inspectable and validatable dependency graphs
Packages
| Package | Purpose |
|---|---|
@wyrly/core | Core container, typed tokens, lifetimes, validation, graph inspection |
@wyrly/next | Next.js App Router request-scoped DI |
@wyrly/express | Express middleware for one DI scope per request |
@wyrly/hono | Hono middleware for edge-friendly DI scopes |
@wyrly/fresh | Fresh 2.x middleware and route helpers |
@wyrly/graphql | GraphQL request context integration |
Start with an example
If you are new to Wyrly, start with the core quickstart, then pick the adapter that matches your runtime.Core quickstart
Register a repository implementation and resolve a use case from a scope.
Examples
Find runnable examples for DDD, provider patterns, graph validation, and web frameworks.