# InversifyJS: 7.4 out of 10

A strong pick. 2nd of 7 in [Dependency injection](https://elestia.ai/opensource/di/index.md).

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

- **Overall: 7.4** (likely 6.4 to 8.4)
  - Claude Opus 5.5 (7.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): 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 many: 4.2** (likely 3.2 to 5.3)
  - Claude Opus 5.5 (4.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): 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 lot: 7.6** (likely 6.6 to 8.6)
  - Claude Opus 5.5 (7.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): 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 time: 7.1** (likely 6.0 to 8.2)
  - Claude Opus 5.5 (7.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): 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 widely: 6.2** (likely 5.1 to 7.2)
  - Claude Opus 5.5 (7.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.
  - GPT-6.2 Sol (5.3): 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.
- **Vouched for: 6.3** (likely 4.7 to 7.3)
  - Claude Opus 5.5 (6.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): 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.
- **Safe: 6.8** (likely 5.6 to 7.9)
  - Claude Opus 5.5 (7.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.
  - GPT-6.2 Sol (6.5): 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

- Downloads, 4 weeks: 14M
- In a year: ×2.0
- GitHub stars: 12k
- Commits, 12 months: 0
- Last npm release: Nov 2026
- Advisories, 24 months: 0
- Licence: MIT
- GitHub: https://github.com/inversify/InversifyJS
- npm: https://www.npmjs.com/package/inversify

Scores run from 0 to 10 and are the mean of the scores of AI reviewers (Claude Opus 5.5, GPT-6.2 Sol), made on 22 November 2026 from GitHub, npm, OSV, OpenSSF Scorecard, ecosyste.ms, Hacker News and Bluesky data and a web search. The ecosyste.ms count of repositories that use a project is far too low for projects that grew in the last few years, and some reviews quote it. Overall is the reviewers' own judgement for a new project today, not an average of the parts. An AI wrote them and can be wrong.
