# Needle DI: 6.3 out of 10

Reasonable, with limits. 3rd of 7 in [Dependency injection](https://elestia.ai/opensource/di/index.md).

Needle DI is a small, type-safe DI container. It uses native ECMAScript decorators and needs neither reflect-metadata nor experimentalDecorators. Its API is clean and modern and it keeps getting small releases. Its user base is still tiny, and almost no one outside the project has validated it, so it is a reasonable pick for small, modern TypeScript codebases but not yet a safe default.

**Best for:** TypeScript or JavaScript projects that want Angular-style inject() with native decorators and no reflect-metadata, and that accept a young, single-maintainer library.

## Scores

- **Overall: 6.3** (likely 5.2 to 7.3)
  - Claude Opus 5.5 (5.5): Technically it is one of the most modern options. It uses native decorators, needs no reflect-metadata, has strong types and keeps getting releases, while InversifyJS, TSyringe and TypeDI have seen almost no commits. Its tiny user base, missing outside validation and single maintainer make it riskier than Awilix, which is active and widely used. It is a reasonable choice with real limits.
  - GPT-6.2 Sol (7.0): Needle DI is a strong pick for new ESM projects that want typed injection without reflection or extra runtime dependencies. Awilix is a better default for Node.js services that need explicit lifetimes and automatic resource cleanup. Needle DI's recent fixes and growing use support choosing it today, with single-maintainer release ownership and unsettled child-container behavior leaving some uncertainty.
- **Needed by many: 4.3** (likely 3.2 to 5.5)
  - Claude Opus 5.5 (4.5): Many JS/TS projects never need a DI container, and backend or large-app TypeScript teams are its main users. Needle DI works with any framework and runtime, so it covers the whole category. The category itself is a clear but medium-sized niche.
  - GPT-6.2 Sol (4.1): A standalone container helps when an app has enough services that manual wiring becomes cumbersome. Needle DI works across Node.js, Deno, and browsers, but its ESM-only design and the built-in containers in frameworks such as NestJS narrow its audience. The survey gives framework context, while the share of developers who need a standalone container remains an estimate.
- **Helps a lot: 6.9** (likely 5.8 to 7.9)
  - Claude Opus 5.5 (6.5): The design is modern: native decorators, an inject() function and full type inference, with no reflect-metadata. Async, child containers, multi, lazy and optional injection are all documented. The 2026 releases fixed several concurrency bugs in async resolution, which shows that edge cases are still being found. There is no page on scopes or testing, and the small community means fewer known patterns than Awilix or Inversify have.
  - GPT-6.2 Sol (7.2): Version 1.2.1 offers typed tokens, lazy and async providers, and a documented API with examples for coding agents. Async code needs explicit container access once it leaves the synchronous injection context, and child containers can duplicate auto-bound singletons. Awilix has richer lifetime and cleanup controls. Needle DI's relative performance and the reliability of AI-generated code remain lightly tested in public.
- **Holds up over time: 5.6** (likely 4.2 to 7.0)
  - Claude Opus 5.5 (5.0): It had 5 releases and 20 commits in the last year, and 1.0 shipped in April 2025 with no breaking changes since. Only 19 issues have ever been closed, and 5 are open, so the issue load is light. One person, with no sponsor, appears to do most of the work, which makes it a risk to depend on. The ecosystem is moving towards native decorators, and that works in its favour.
  - GPT-6.2 Sol (6.2): Needle DI shipped five releases and made 20 commits over the past year, with recent fixes for async resolution and a TypeScript regression. The public release history shows one releaser, and Replit's sponsorship request has no public funding confirmation. A proposed change to child-container defaults could require a major upgrade, and Awilix has a stronger recent maintenance record.
- **Used widely: 3.1** (likely 1.8 to 4.4)
  - Claude Opus 5.5 (2.5): It had about 105k downloads in the last 4 weeks, up from about 9k a year ago. That ratio of about 11.7 is far above the 4.1 median, so it is gaining ground, but from a very small base. With 142 stars, no dependents count and no posts, it reaches a small fraction of what InversifyJS, TSyringe or Awilix reach. Part of the downloads may come from a few packages that depend on it.
  - GPT-6.2 Sol (3.6): Four-week npm downloads rose from 8,978 to 104,814, or 11.7 times the prior year, well above the catalog median of 4.1. The install base is still small next to Awilix and InversifyJS, and some installs come through packages such as ZeltJS. The missing ecosyste.ms count and limited public attention leave the number of direct adopters uncertain.
- **Vouched for: 3.9** (likely 2.7 to 5.3)
  - Claude Opus 5.5 (2.0): We found no named production users, no survey mentions, no independent comparisons and no Hacker News or Bluesky discussion. Web searches for the name mostly return Uber's Swift Needle or other packages with the same name. Its quality rests on its own docs alone.
  - GPT-6.2 Sol (5.8): Replit publicly reported depending on Needle DI, and ZeltJS uses it for its built-in container. An independent React starter documents request scoping and test overrides in practice. Public evidence about the scale of production use, comparative performance, and developer satisfaction remains limited.
- **Safe: 7.7** (likely 6.3 to 8.7)
  - Claude Opus 5.5 (7.5): It has zero runtime dependencies, no known advisories and an MIT licence. Releases run through release-please. There is no Scorecard data, and one maintainer controls publishing, which keeps it below the top of the scale.
  - GPT-6.2 Sol (7.8): The MIT-licensed package has zero runtime dependencies and no recorded OSV advisories. GitHub Actions publishes the package, and JSR reports a signed build. A single visible releaser, the lack of a published security policy, and the missing OpenSSF Scorecard limit confidence in the release and response process.

## Good

- Uses native ECMAScript decorators and inject(), so it needs no reflect-metadata and no experimentalDecorators or emitDecoratorMetadata.
- Has zero runtime dependencies, a small bundle and injection tokens that can be tree-shaken.
- Covers the advanced cases: async factories, child containers, multi-injection, lazy and optional injection, and unbind.
- Infers types fully from tokens, and publishes llms.txt docs that help AI agents write correct code.

## Bad

- One maintainer does most of the work, and no company sponsors it.
- Its user base is tiny next to InversifyJS, TSyringe or Awilix, and there are few community answers or examples.
- We found no independent reviews, benchmarks or named production users.
- Its docs have no page on scopes or testing, and recent releases still fix edge cases in async resolution.

## The numbers

- Downloads, 4 weeks: 105k
- In a year: ×12
- GitHub stars: 142
- Commits, 12 months: 20
- Last npm release: Sept 2026
- Advisories, 24 months: 0
- Licence: MIT
- GitHub: https://github.com/needle-di/needle-di
- npm: https://www.npmjs.com/package/@needle-di/core

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.
