Skip to content
mycl is in early development. The API may change before a stable release; it is not yet recommended for production use.

Add dynamically scoped behaviors to your functions

Replace, wrap or transform your TypeScript functions from outside their call site.

Call site never changes

Bind a replacement in a registry and activate it for a scope. The binding runs inside that scope. Callers stay untouched.

One identity, three jobs

A capability is its own registry key, type contract, and default implementation. No tokens, no string lookups, no container.

Misuse doesn't compile

A binding with the wrong signature is a compile error, and requires() makes a missing binding one too.

Nothing extra

Zero dependencies, ESM only, side-effect free. v0.1.0 bundles to 1.7 KB min+gzip.

New here? Read the Introduction for what mycl is and when to reach for it, or jump straight to the Quick Start.