# 使用 Homebrew 安装 truffle

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

## 安装

```sh
sudo av install brew:truffle
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install truffle
```

  证据: local Homebrew formula metadata

## 软件包事实

- **软件包键:** brew:truffle
- **软件包管理器:** Homebrew
- **版本:** 5.11.5
- **来源摘要:** Development environment, testing framework and asset pipeline for Ethereum
- **主页:** <https://trufflesuite.com>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- truffle (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 5.11.5
## 项目历史与用法

Truffle was one of the defining early Ethereum developer tools: a CLI, testing framework, migration system, and asset pipeline for Solidity and EVM application work.

### 项目历史

Truffle emerged in the early Ethereum tooling era, before the modern Hardhat and Foundry landscape had settled. The Truffle team's own comparison with Hardhat says Truffle was released first, was initially written in CoffeeScript, and was rewritten to ES6 JavaScript in 2015.

The project became the center of a broader Truffle Suite. Its README describes a developer environment with contract compilation, linking, deployment, Mocha/Chai testing, build pipelines, migrations, network management, an interactive console, and script execution inside a Truffle environment.

By the late 2010s and early 2020s, Truffle was closely associated with Ganache, Drizzle, boxes, the debugger, and other Ethereum developer tools. A Truffle retreat post described the team's mission as building useful tools for blockchain technologies and listed Truffle 4.0, Ganache, Drizzle, and other roadmap items.

Consensys announced on September 21, 2023 that Truffle and Ganache would be sunset, with migration guidance toward Hardhat, Foundry, Remix, Thirdweb, OpenZeppelin, and other ecosystem tools. The announcement said support would continue for about 90 days and that the codebases would remain public archives starting December 20, 2023. GitHub now marks the repository archived and read-only.

### 采用历史

Truffle became popular because it wrapped the messy early Ethereum development workflow into one project directory and one CLI. Developers could initialize a project, compile contracts, run migrations, start a local chain, and run tests without wiring every piece by hand.

Its adoption was reinforced by npm global installation, Homebrew packaging, Truffle Boxes, and documentation that targeted full dapp workflows. For several years, 'truffle init', 'truffle compile', 'truffle migrate', and 'truffle test' were common muscle-memory commands for Ethereum developers.

The later sunset did not erase that role; it marked a transition in the ecosystem. Consensys explicitly acknowledged that Truffle and Ganache had enabled many Ethereum projects and then directed users toward maintained successors.

### 使用方式

A typical Truffle workflow starts in an empty project with 'truffle init', then uses 'truffle compile', 'truffle migrate', and 'truffle test' to compile, deploy, and test smart contracts. More advanced projects configure networks, compilers, migrations, dashboards, and external scripts in a Truffle config file.

For package nerds, Truffle is notable because it is a Node-based CLI distributed through npm but also available through Homebrew. It represents the era when global developer CLIs became the installable control plane for blockchain project scaffolding.

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

Truffle is historically significant because many Ethereum starter projects, tutorials, CI jobs, and developer machines assumed the truffle executable existed. Even after the sunset, packages and archived docs remain useful for maintaining older Solidity projects.

Its Homebrew formula is a fossil record of web3 tooling's first mainstream package-manager phase: install a global CLI, create a project skeleton, and let the tool orchestrate compilers, local chains, migrations, and tests.

### 时间线

- 2015: Truffle is rewritten to ES6 JavaScript, according to the Truffle team's Hardhat comparison.
- 2017: Truffle team materials discuss Truffle 4.0, Ganache, Drizzle, and a broader suite roadmap.
- 2023-09-21: Consensys announces the sunset of Truffle and Ganache and a Hardhat partnership.
- 2023-12-20: Consensys says Truffle and Ganache codebases will remain available as public archives.
- 2024-02-26: GitHub marks the Truffle repository archived and read-only.

### Related projects

- Ganache provided the local blockchain simulator commonly paired with Truffle workflows.
- Hardhat, Foundry, Remix, Thirdweb, and OpenZeppelin are named by Consensys as migration or ecosystem alternatives.
- Drizzle was part of the broader Truffle Suite for frontend contract interaction.

### 来源

- <https://archive.trufflesuite.com/blog/first-ever-truffle-retreat/>
- <https://archive.trufflesuite.com/blog/truffle-vs-hardhat-breaking-down-the-difference-between-ethereums-top-development-environments/>
- <https://archive.trufflesuite.com/docs/truffle/>
- <https://consensys.io/blog/consensys-announces-the-sunset-of-truffle-and-ganache-and-new-hardhat>
- <https://github.com/ConsenSys-archive/truffle>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: truffle-config.js, truffle.js

## Combined YAML source

View the package source record on GitHub. [combined/truffle.yml](https://github.com/mxcl/pkgdb/blob/main/combined/truffle.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- cross-ecosystem install command graph
