Elestia Open Source Ratings
7.4

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.

WebsiteGitHubnpm

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

Dependency injection

  1. 7.5Awilix
  2. 7.4InversifyJS
  3. 6.3Needle DI
  4. 5.2injection-js
  5. 5.2TSyringe
  6. 4.7Brandi
  7. 3.1TypeDI
Compare all 7 on six scores