Automic VaultAutomic Vault

brew

使用 Homebrew, Nix 安装 needle

查看 needle 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

安装

其他安装命令

macOS

Homebrew已验证 · 100%
brew install needle

local Homebrew formula metadata

Linux

Nix已验证 · 92%
nix profile install nixpkgs#needle

nixpkgs package indexes · pkgs/by-name/ne/needle/package.nix · 来源: api.github.com

概览

软件包摘要

Compile-time safe Swift dependency injection framework with real code

命令和别名

  • needle

历史

项目历史与用法

Needle is Uber's Swift dependency-injection system. Its distinguishing idea is to make dependency wiring explicit, hierarchical, and code-generated so missing or invalid dependencies fail at compile time instead of becoming runtime container lookups.

项目历史

The public GitHub repository was created on 2018-04-06. The README frames Needle against Swift DI libraries such as Cleanse and Swinject, while comparing its compile-time generated graph more closely to Dagger on the JVM. The project goals call out high reliability, code generation performance for multi-million-line codebases, and compatibility with iOS architectures including RIBs and MVx.

Needle ships both a runtime framework, NeedleFoundation, and the `needle` generator executable packaged by Homebrew. Its release process documentation explicitly includes publishing to CocoaPods and Homebrew, which matches its split identity as both a Swift package/library and a developer tool installed into build phases.

采用历史

Needle's primary adoption channel is iOS application architecture, especially large Swift apps where runtime service locators are too loose and hand-wired dependency trees become noisy. Swift Package Index listed the package as in development for 8 years, with 42 releases and 42 contributors when checked in 2026, and the GitHub API showed 2,006 stars and 160 forks on 2026-07-01.

Homebrew is important because teams usually need the generator binary in local and CI builds. Homebrew's formula page showed stable version 0.25.1 and 1,766 installs over 365 days, 70 over 90 days, and 17 over 30 days when checked on 2026-07-01.

使用方式

In practice, developers add NeedleFoundation to a Swift app, model scopes as `Component` types, express dependencies as Swift protocols, then run `needle generate` to emit a generated file that wires the graph. The generator is commonly invoked from an Xcode build phase or CI step so dependency graph mistakes become compilation errors.

Needle is attractive to package nerds because the Homebrew formula is not the library itself; it is the code-generation tool that makes the library's safety story work. That puts it in the same operational family as SwiftGen, Sourcery, and other source-generation CLIs that become part of a build pipeline.

为什么软件包爱好者会关心

Needle is a notable example of a company-scale mobile architecture tool packaged for general use. It shows how a Swift library can require a separately installed command-line generator, and why Homebrew remains relevant even for ecosystems that also use Swift Package Manager or CocoaPods.

时间线

  • 2018-04-06: Public GitHub repository created.
  • 2019: Community tutorials and comparisons began presenting Needle as Uber's compile-time-safe Swift DI option.
  • 2024-08: GitHub releases page listed v0.25.1 with Swift 6-related release notes.
  • 2026-07-01: Homebrew formula stable version observed as 0.25.1.

Related projects

  • NeedleFoundation
  • Swinject
  • Cleanse
  • Dagger
  • Uber RIBs

安全态势

风险级别:绿色

narrow executable package without higher-risk signals.

风险分类器

绿色 风险 · 低 置信度 · appliance

原因

  • narrow executable package without higher-risk signals

信号

  • metadata:no-higher-risk-signals

安装行为

  • formula 元数据中未记录 Homebrew post-install 钩子。
  • Homebrew bottle 元数据适用于 6 个平台目标。

建议审查

在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。

可执行文件

已安装的可执行文件

命令类型暴露范围备注
needlecli全局可执行文件

新鲜度

版本和新鲜度

这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。

页面生成时间2026-07-25
管理器版本0.25.1
管理器更新时间
本地数据OK
上游当前
检测到的最新版本v0.25.1

https://github.com/uber/needle

  • 信息No package-manager update timestamp was available.低 置信度

安装元数据

软件包元数据

软件包键brew:needle
版本0.25.1
软件包管理器Homebrew
软件包管理器页面https://formulae.brew.sh/formula/needle
主页https://github.com/uber/needle
仓库https://github.com/uber/needle
上游文档https://github.com/uber/needle#readme
许可证Apache-2.0
源码归档https://github.com/uber/needle/archive/refs/tags/v0.25.1.tar.gz
Bottle可用 (于 arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, sonoma, ventura)
Homebrew post-install未定义
服务未声明

注册表事实

源数据库详情

Source DatabaseHomebrew formula API
Taphomebrew/core
Full Nameneedle
Version Scheme0
Revision0
Requirements
  • macos
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyno
URL Keys
  • stable

源数据库匹配

其他软件包管理器记录

匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。

Nix95%

needle

nix profile install nixpkgs#needle
  • normalized package name match
  • 匹配方式:Needle
nixpkgs package indexes · api.github.com · nixpkgs package indexes: pkgs/by-name/ne/needle/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

来源线索

由仓库数据生成

此页面由 av-webscripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。

使用的来源

  • Geiger risk classifier
  • Nucleus package database
  • av.db category and tag curation
  • cross-ecosystem install command graph
  • curated package history
  • external package-manager database matches
  • package relationship graph
  • package version freshness
  • package-page enrichment