InversifyJS
A strong pick. 2nd of 7 dependency injection.
InversifyJS is the most feature-rich decorator-based IoC container for TypeScript. Development has moved to the inversify monorepo and is very active. It is a strong pick for large class-based apps. The cost is three breaking majors in about two years and weak compile-time checking of injection tokens.
Best for: Teams building large class-based TypeScript apps that want a full-featured container with scopes, contextual bindings, async resolution and an optional HTTP framework.
Scores
Overall7.4
How strongly do we recommend it for a new project today?
Claude Opus 5.5: 7.0, likely 6.0 to 8.0
It is the most capable and most widely depended-on DI container for class-based TypeScript, and it is actively maintained. Frequent breaking majors, runtime-only token checks, and download growth below the median keep it from being the clear default. Awilix is a lighter, steadier alternative, and tsyringe is simpler but barely maintained.
- peers: Awilix is active with 68 commits; tsyringe and TypeDI show little or no maintenance.
- inversify.io/blog/announcing-inversify-8-0-0: The current major is stable but brought breaking changes.
- releasealert.dev/github/inversify/monorepo: Active release cadence.
GPT-6.2 Sol: 7.8, likely 6.7 to 8.8
InversifyJS is one of the strongest choices in this group for TypeScript applications that need async services, layered containers, and detailed binding diagnostics. Awilix has a simpler setup for teams that want to wire functions or classes without configuring decorators. The value of Inversify's extra control depends on the size of the service graph, and its below-median download growth tempers the recommendation for new projects.
- inversify.io/docs/api/container: Documents capabilities that matter in complex applications.
- github.com/inversify/monorepo/releases/tag/inversify%408.3.0: The stable release improves diagnostics and fixes lifecycle behavior.
- github.com/jeffijoe/awilix: Documents function and class wiring without decorator setup.
- npm downloadsLast4Weeks and downloadsSame4WeeksYearAgo; medianDownloadsRatio: Install growth of 2.03× trails the 4.1× catalog median.
Needed by many4.2
How many developers need a tool for this job?
Claude Opus 5.5: 4.0, likely 3.0 to 5.0
Most JS/TS developers never use a standalone DI container. Its users are mainly backend and large class-based apps outside NestJS and Angular, which ship their own DI. Inversify's decorator-and-class take narrows this a little further.
- blog.logrocket.com/top-five-typescript-dependency-injection-containers: Compares DI containers as a specialised TypeScript tool.
- NestJS and Angular built-in DI: The largest DI users rely on their framework's own container.
GPT-6.2 Sol: 4.4, likely 3.3 to 5.6
InversifyJS works across frameworks and can wire both browser and server applications. Its class-based approach is most useful when teams manage many services, lifetimes, or extension points. Developers report that direct wiring is enough for smaller projects, and the survey gives no direct estimate of how many teams need a standalone container.
- survey.stackoverflow.co/2026/technology/data: Shows use of JavaScript, TypeScript, and major frameworks, with no standalone DI question.
- theia-ide.org/docs/services_and_contributions: Illustrates service wiring and extension points in a modular app.
- reddit.com/r/typescript/comments/1lbfv3u/which_di_library: Users describe frontend and backend use, as well as cases where direct wiring suffices.
Helps a lot7.6
How well does it do the job for those who need it?
Claude Opus 5.5: 7.0, likely 6.0 to 8.0
It is the most complete container in the category: contextual and tagged bindings, scopes, activation and deactivation hooks, sync and async resolution, modules, and plugins. The monorepo has done dedicated performance work, and a third-party benchmark puts it ahead of Awilix and tsyringe on resolution speed. Users report weak type safety with string tokens, verbose central binding files, and errors that only show up at runtime.
- inversify.io/blog/announcing-inversify-8-0-0: v8 changes: sync-by-default names, stricter ServiceIdentifier, ESM-only.
- dev.to/ayoub-chrigui/i-was-sick-of-inversifyjs-after-3-years-in-production-so-i-built-a-better-di-container-4kb6: Production user reports token type-safety gaps and runtime-only binding errors.
- jsr.io/@inferdi/inferdi@6.0.1: Vendor benchmark shows Inversify faster than Awilix and tsyringe at hot resolution.
- npm-compare.com/awilix,inversify,tsyringe: Describes Inversify as the most feature-rich option.
GPT-6.2 Sol: 8.2, likely 7.1 to 9.2
Version 8.3 ships TypeScript declarations and documents async resolution, container hierarchies, and test snapshots. Its new plan inspection helps diagnose binding selection before creating services. Decorator metadata adds build setup, and older examples can lead coding agents to use v7 method names. An outside microbenchmark found slower singleton resolution than Awilix on v7, so current v8 performance remains less certain.
- raw.githubusercontent.com/inversify/monorepo/inversify%408.3.0/packages/foundation/tools/typescript-config/tsconfig.base.json: The tagged build enables declaration output despite the collector's false hasTypes flag.
- inversify.io/docs/api/container: Documents typed resolution, hierarchies, lifecycle hooks, and snapshots.
- github.com/inversify/monorepo/releases/tag/inversify%408.3.0: Adds plan inspection and fixes lifecycle handler ordering.
- inversify.io/docs/faq/using-bundlers: Documents the build requirements for legacy decorators and metadata.
- inversify.io/docs/guides/migrating-from-v7: Lists renamed methods and changed sync and async defaults.
- github.com/quinnjr/dependency-injector/blob/main/BENCHMARK_COMPARISON.md: Outside microbenchmark compares Inversify 7.10.8 with Awilix 12.0.5.
Holds up over time7.1
Will it still be a good choice in two years?
Claude Opus 5.5: 7.0, likely 6.0 to 8.0
Work moved to inversify/monorepo, which ships many releases. inversify had 16 versions in the last year, and 8.3.0 came out in November 2026, so the old repo's zero commits are misleading. Against that, breaking majors come often (v7 in 2025, v8 in March 2026, ESM-only), most of the work seems to come from one main maintainer, and outside funding is negligible.
- releasealert.dev/github/inversify/monorepo: Dense release stream in Oct and Nov 2026, including inversify 8.3.0.
- npm versionsLast year: 16 versions published in the last year.
- inversify.io/docs/guides/migrating-from-v7: Another migration guide, for repeated breaking changes.
- opencollective.com/inversifyjs: Very little money comes in through Open Collective.
GPT-6.2 Sol: 7.2, likely 6.0 to 8.3
Development moved to the monorepo, and npm recorded 16 versions in the past year. The active issue queue is small, though one maintainer runs the visible npm releases and funding depth is unclear. Sprotty's v8 migration required changes to inherited injection and child-container wiring. Support for standard decorators is still under discussion, which adds uncertainty over two years.
- npm versionsLastYear: 16 package versions in the past year.
- github.com/inversify/InversifyJS/releases: The last release in the original repository announces the move.
- github.com/inversify/monorepo/issues: Seven open issues in the active repository when checked.
- github.com/inversify/monorepo/actions/workflows/publish.yaml: Recent manual npm releases show one operator.
- github.com/eclipse-sprotty/sprotty/pull/561: Downstream maintainers document concrete v8 migration work.
- github.com/inversify/monorepo/issues/2086: An open proposal explores support for standard decorators.
Used widely6.2
How many use it, and is that growing?
Claude Opus 5.5: 7.0, likely 6.0 to 8.0
It has about 13.9M downloads per 4 weeks and leads the category on dependents, with 17,579 repos and 1,975 packages. Downloads roughly doubled over the year, but a ratio of 2.0 is below the 4.1 median, so its share is slipping. TSyringe's 20x jump looks driven by a dependency of another tool, not by direct choices.
- npm downloadsLast4Weeks vs downloadsSame4WeeksYearAgo: 13.88M vs 6.83M, a ratio of about 2.0, below the 4.1 median.
- dependents: 17,579 repos, the highest among peers (injection-js 13,633, tsyringe 6,704).
- github stars: 12,050 stars, the most in the category.
GPT-6.2 Sol: 5.3, likely 4.2 to 6.4
Ecosyste.ms finds 17,579 dependent repositories and 1,975 dependent packages, the strongest reported repository count in this peer set. Four-week installs rose from 6.83 million to 13.88 million, a 2.03× ratio that trails the 4.1× catalog median and Awilix's 3.26×. This suggests a loss of relative ground, though indirect installs, incomplete dependency coverage, and the repository move make new adoption hard to measure.
- dependents: 17,579 repositories and 1,975 npm packages in a partial index.
- npm downloadsLast4Weeks and downloadsSame4WeeksYearAgo: 13.88 million versus 6.83 million installs.
- medianDownloadsRatio: The catalog median is 4.1× year over year.
- peers: TSyringe has far more installs and fewer indexed dependent repositories. Awilix installs grew 3.26×.
- github stars and bluesky posts: 12,050 historical stars and one recent Bluesky link to the old repository.
- theia-ide.org/docs/services_and_contributions: Theia is one route by which projects can install Inversify indirectly.
Vouched for6.3
Who stands behind it being good?
Claude Opus 5.5: 6.0, likely 4.0 to 7.0
Well-known projects such as Eclipse Theia build on it, and independent comparisons often call it the most complete container. There is no survey data for DI containers, and recent independent write-ups are mixed: some users have moved on because of its type-safety limits.
- Eclipse Theia: Theia's IDE framework is built on InversifyJS.
- leapcell.io/blog/dependency-injection-beyond-nestjs-a-deep-dive-into-tsyringe-and-inversifyjs: Independent deep dive that treats Inversify as a main option.
- dev.to/ayoub-chrigui/i-was-sick-of-inversifyjs-after-3-years-in-production-so-i-built-a-better-di-container-4kb6: Critical 2026 production report.
GPT-6.2 Sol: 6.5, likely 5.3 to 7.6
Eclipse Theia uses Inversify to wire its services and extensions, and Eclipse Sprotty moved its diagram framework to v8. Theia still declares v6, so its experience mainly supports the library's track record. User reports are mixed, and broad satisfaction or retention data for v8 is lacking.
- theia-ide.org/docs/services_and_contributions: Theia documents Inversify as part of its core architecture.
- github.com/eclipse-theia/theia/blob/master/packages/core/package.json: Theia core declares Inversify ^6.2.2.
- github.com/eclipse-sprotty/sprotty/blob/main/packages/sprotty/package.json: Sprotty declares Inversify ~8.2.
- reddit.com/r/typescript/comments/1lbfv3u/which_di_library: Longtime use reports mention flexible wiring, circular dependencies, and decorator friction.
Safe6.8
How safe is it to depend on?
Claude Opus 5.5: 7.0, likely 6.0 to 8.0
It has no advisories ever, the MIT licence, and only 3 dependencies, all from the same inversify org. The 3.1 Scorecard was read on the old repo, which gets no commits now, so it says little about the monorepo. Weak checks such as code review, token permissions and pinned dependencies are still a mild concern, as is release publishing by a few npm collaborators.
- advisories total: 0 advisories.
- scorecard score: 3.1 on the old repo, with Code-Review, Token-Permissions and Pinned-Dependencies at 0.
- npm dependencies: 3 dependencies, all from the inversify org.
GPT-6.2 Sol: 6.5, likely 5.2 to 7.7
The package has an MIT licence, three direct dependencies from the same project, and zero OSV advisories in the bundle. The 3.1 OpenSSF Scorecard is for the old repository, where code review, token permissions, and dependency pinning scored zero. The active repository has no published security policy, and the v8.3 release workflow publishes with an npm token, leaving some uncertainty around release controls.
- advisories: Zero OSV advisories in the collector snapshot.
- scorecard: Legacy repository scored 3.1, with weak review and workflow checks.
- raw.githubusercontent.com/inversify/monorepo/main/packages/container/libraries/inversify/package.json: MIT licence and three direct dependencies maintained in the monorepo.
- github.com/inversify/monorepo/security: GitHub reports no security policy or published advisories.
- raw.githubusercontent.com/inversify/monorepo/inversify%408.3.0/.github/workflows/publish.yaml: The tagged workflow uses GitHub Actions, Changesets, and an npm token.
Good
- It has the richest feature set in the category: named, tagged and contextual bindings, scopes, lifecycle hooks, modules, async resolution and plugins.
- It is very actively developed in the inversify monorepo, with inversify 8.3.0 and core 15.1.0 published in November 2026.
- It has the largest dependents count in the category (17,579 repos), and it has a long record with no published advisories.
- There is a growing ecosystem around it: HTTP adapters for Express, Fastify and Hono, validation packages and a dispose plugin.
Bad
- Breaking majors come often. v7 and v8 renamed sync and async methods back and forth, v8 is ESM-only, and v8 removed Provider.
- String and symbol tokens with @inject are not checked against parameter types, so mismatches fail at runtime.
- It needs decorators and reflect-metadata style setup, which is heavier than Awilix's plain-function approach.
- Download growth is below the median, and the old GitHub repo's metrics and Scorecard no longer reflect where the work happens.
The numbers
- npm downloads, 4 weeks
- 14M ×2.0 in a year
- GitHub stars
- 12k
- Commits, 12 months
- 0
- npm version
- 8.3.0 Nov 2026
- Versions, 12 months
- 16
- Advisories, 24 months
- 0 of 0 ever
- OpenSSF Scorecard
- 3.1 out of 10, Nov 2026
- Licence
- MIT
Read on 21 November 2026 from GitHub (inversify/InversifyJS), npm (inversify), OSV and the OpenSSF Scorecard.