Automic VaultAutomic Vault

brew

使用 Homebrew 安装 opal

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

安装

其他安装命令

macOS

Homebrew已验证 · 100%
brew install opal

local Homebrew formula metadata

概览

软件包摘要

Ruby to JavaScript transpiler

命令和别名

  • opal
  • opal-build
  • opal-repl

历史

项目历史与用法

Opal is a Ruby-to-JavaScript source-to-source compiler with a Ruby core library and standard-library subset implemented for JavaScript runtimes. It sits in the compile-to-JavaScript lineage, but its package-nerd identity is unusually Ruby-centric: developers install it as a Ruby gem, write Ruby, and emit JavaScript for browsers, Node.js, and other JavaScript environments.

项目历史

RubyGems records Opal versions back to January 22, 2010, and the project reached the 1.0.0 milestone on May 12, 2019 after years of production use and compatibility work. The 1.0 release emphasized a redesigned class and module hierarchy that more closely followed MRI Ruby, support for Module.prepend, better source maps, improved errors, and broader Ruby 2.4/2.5 feature coverage.

Later 1.x releases continued the same theme: Opal 1.2 described the project as a Ruby compiler, runtime, and idiomatic Ruby API for Browser, Node, and other JavaScript environments, and announced near-complete Ruby 3.0 feature support. Opal 1.6 focused on MRI compatibility, freezing, control-flow correctness, Windows improvements, parallel compilation, and Opal-RSpec 1.0.

采用历史

Opal's adoption path has been through Ruby's packaging and web-application ecosystem rather than through npm-first JavaScript tooling. Its official site links Rack, Rails, CLI, and library guides, and the README points developers toward Rails, jQuery, Sinatra, Rack, CDN, and related usage patterns.

The project has been distributed as the opal RubyGem for more than a decade, with RubyGems listing more than one hundred published versions. That long gem history is important for packagers because it shows Opal evolving as a Ruby ecosystem package while targeting JavaScript as the runtime artifact.

使用方式

Developers use the opal CLI to compile Ruby source into JavaScript, or use Opal.compile and Opal::Builder from Ruby code to generate runtime bundles and applications. The README also documents browser-side use through opal-parser and script tags that evaluate Ruby code inside an HTML page.

The package is useful when a team wants Ruby syntax, Ruby libraries that can run under Opal's compatibility subset, or Ruby DSLs on the front end without switching entirely to JavaScript. The tradeoff is that compatibility with MRI Ruby is an ongoing engineering project, so users often care about the exact Opal version and supported Ruby feature set.

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

Opal is a tidy example of a language package whose install surface and target runtime are different ecosystems. For package nerds, it raises familiar questions about transitive Ruby dependencies, generated JavaScript artifacts, CDN distribution, source maps, browser support, and compatibility claims across Ruby and JavaScript versions.

Its executables, opal, opal-build, and opal-repl, make it feel like a compiler toolchain inside Homebrew even though many users encounter it first as a gem. That dual identity is the interesting bit: package managers expose it as a CLI, while application developers often treat it as a build-stage bridge.

时间线

  • 2010: RubyGems lists the first opal gem versions.
  • 2013: the GitHub project license notice covers Adam Beynon and Opal contributors from 2013 onward.
  • 2019: Opal 1.0.0 was released with major runtime and compatibility changes.
  • 2021: Opal 1.2 announced broad Ruby 3.0 feature support.
  • 2022: Opal 1.6 and Opal-RSpec 1.0 improved MRI compatibility, testing, and compile performance.

Related projects

  • Opal's related ecosystem includes opal-browser, Opal-RSpec, Rack/Rails integration, and JavaScript library ports that let Ruby code interact with browser and Node APIs. The project also depends conceptually on MRI Ruby behavior and parser compatibility, because much of its value comes from matching Ruby semantics while producing JavaScript.

安全态势

风险级别:yellow

generalized runtime or code generation signal.

风险分类器

yellow 风险 · 中 置信度 · runtime

原因

  • generalized runtime or code generation signal

信号

  • text:repl

安装行为

  • formula 元数据中未记录 Homebrew post-install 钩子。
  • Homebrew bottle 元数据适用于 6 个平台目标。
  • 安装时包含 1 个运行时依赖。

建议审查

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

可执行文件

已安装的可执行文件

命令类型暴露范围备注
opalcli全局可执行文件
opal-buildcli全局可执行文件
opal-replcli全局可执行文件

新鲜度

版本和新鲜度

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

页面生成时间2026-07-25
管理器版本1.8.3
管理器更新时间2026-06-22
本地数据OK
上游not checked
检测到的最新版本未检测到

https://github.com/opal/opal

安装元数据

软件包元数据

软件包键brew:opal
版本1.8.3
软件包管理器Homebrew
软件包管理器页面https://formulae.brew.sh/formula/opal
主页https://opalrb.com/
仓库https://github.com/opal/opal
上游文档https://github.com/opal/opal#readme
许可证MIT
源码归档https://github.com/opal/opal.git
最后更新2026-06-22T14:05:41-07:00
Pulseupdated
依赖ruby
Bottle可用 (于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux)
Homebrew post-install未定义
服务未声明

注册表事实

源数据库详情

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

来源线索

由仓库数据生成

此页面由 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
  • package relationship graph
  • package version freshness
  • package-page enrichment