repo stringlengths 5 92 | file_url stringlengths 80 287 | file_path stringlengths 5 197 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:37:27 2026-01-04 17:58:21 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/services/commands/restart.rb | Library/Homebrew/services/commands/restart.rb | # typed: strict
# frozen_string_literal: true
require "services/cli"
module Homebrew
module Services
module Commands
module Restart
# NOTE: The restart command is used to update service files
# after a package gets updated through `brew upgrade`.
# This works by removing the old fi... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/command.rb | Library/Homebrew/cmd/command.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "commands"
module Homebrew
module Cmd
class Command < AbstractCommand
cmd_args do
description <<~EOS
Display the path to the file being used when invoking `brew` <cmd>.
EOS
named_args :comma... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/gist-logs.rb | Library/Homebrew/cmd/gist-logs.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "formula"
require "install"
require "system_config"
require "stringio"
require "socket"
module Homebrew
module Cmd
class GistLogs < AbstractCommand
include Install
cmd_args do
description <<~EOS
Uploa... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/readall.rb | Library/Homebrew/cmd/readall.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "readall"
require "env_config"
module Homebrew
module Cmd
class ReadallCmd < AbstractCommand
cmd_args do
description <<~EOS
Import all items from the specified <tap>, or from all installed taps if none is pr... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/vendor-install.rb | Library/Homebrew/cmd/vendor-install.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "shell_command"
module Homebrew
module Cmd
class VendorInstall < AbstractCommand
include ShellCommand
cmd_args do
description <<~EOS
Install Homebrew's portable Ruby.
EOS
named_args :... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/update-reset.rb | Library/Homebrew/cmd/update-reset.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "shell_command"
module Homebrew
module Cmd
class UpdateReset < AbstractCommand
include ShellCommand
cmd_args do
description <<~EOS
Fetch and reset Homebrew and all tap repositories (or any specified <... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/source.rb | Library/Homebrew/cmd/source.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "formula"
module Homebrew
module Cmd
class Source < AbstractCommand
cmd_args do
description <<~EOS
Open a <formula>'s source repository in a browser, or open
Homebrew's own repository if no argumen... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/bundle.rb | Library/Homebrew/cmd/bundle.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
module Homebrew
module Cmd
class Bundle < AbstractCommand
cmd_args do
usage_banner <<~EOS
`bundle` [<subcommand>]
Bundler for non-Ruby dependencies from Homebrew, Homebrew Cask, Mac App Store, Visual Stud... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/--repository.rb | Library/Homebrew/cmd/--repository.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "shell_command"
module Homebrew
module Cmd
class Repository < AbstractCommand
include ShellCommand
sig { override.returns(String) }
def self.command_name = "--repository"
cmd_args do
description <<... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/desc.rb | Library/Homebrew/cmd/desc.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "descriptions"
require "search"
require "description_cache_store"
module Homebrew
module Cmd
class Desc < AbstractCommand
cmd_args do
description <<~EOS
Display <formula>'s name and one-line description.
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/update.rb | Library/Homebrew/cmd/update.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "shell_command"
module Homebrew
module Cmd
class Update < AbstractCommand
include ShellCommand
cmd_args do
description <<~EOS
Fetch the newest version of Homebrew and all formulae from GitHub using `g... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/doctor.rb | Library/Homebrew/cmd/doctor.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "diagnostic"
require "cask/caskroom"
module Homebrew
module Cmd
class Doctor < AbstractCommand
cmd_args do
description <<~EOS
Check your system for potential problems. Will exit with a non-zero status
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/tap-info.rb | Library/Homebrew/cmd/tap-info.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
module Homebrew
module Cmd
class TapInfo < AbstractCommand
cmd_args do
description <<~EOS
Show detailed information about one or more <tap>s.
If no <tap> names are provided, display brief statistics for al... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/uses.rb | Library/Homebrew/cmd/uses.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "formula"
require "cask/caskroom"
require "dependencies_helpers"
module Homebrew
module Cmd
# `brew uses foo bar` returns formulae that use both foo and bar
# If you want the union, run the command twice and concatenate the res... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/--caskroom.rb | Library/Homebrew/cmd/--caskroom.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
module Homebrew
module Cmd
class Caskroom < AbstractCommand
sig { override.returns(String) }
def self.command_name = "--caskroom"
cmd_args do
description <<~EOS
Display Homebrew's Caskroom path.
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/reinstall.rb | Library/Homebrew/cmd/reinstall.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "formula_installer"
require "development_tools"
require "messages"
require "install"
require "reinstall"
require "cleanup"
require "cask/utils"
require "cask/macos"
require "cask/reinstall"
require "upgrade"
require "api"
module Homebrew... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/migrate.rb | Library/Homebrew/cmd/migrate.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "migrator"
require "cask/migrator"
module Homebrew
module Cmd
class Migrate < AbstractCommand
cmd_args do
description <<~EOS
Migrate renamed packages to new names, where <formula> are old names of
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/completions.rb | Library/Homebrew/cmd/completions.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "completions"
module Homebrew
module Cmd
class CompletionsCmd < AbstractCommand
cmd_args do
description <<~EOS
Control whether Homebrew automatically links external tap shell completion files.
Read... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/shellenv.rb | Library/Homebrew/cmd/shellenv.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "shell_command"
module Homebrew
module Cmd
class Shellenv < AbstractCommand
include ShellCommand
cmd_args do
description <<~EOS
Valid shells: bash|csh|fish|pwsh|sh|tcsh|zsh
Print export sta... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/home.rb | Library/Homebrew/cmd/home.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "formula"
module Homebrew
module Cmd
class Home < AbstractCommand
cmd_args do
description <<~EOS
Open a <formula> or <cask>'s homepage in a browser, or open
Homebrew's own homepage if no argument i... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/cleanup.rb | Library/Homebrew/cmd/cleanup.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "cleanup"
module Homebrew
module Cmd
class CleanupCmd < AbstractCommand
cmd_args do
days = Homebrew::EnvConfig::ENVS[:HOMEBREW_CLEANUP_MAX_AGE_DAYS]&.dig(:default)
description <<~EOS
Remove stale loc... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/options.rb | Library/Homebrew/cmd/options.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "formula"
require "options"
module Homebrew
module Cmd
class OptionsCmd < AbstractCommand
cmd_args do
description <<~EOS
Show install options specific to <formula>.
EOS
switch "--compact",
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/outdated.rb | Library/Homebrew/cmd/outdated.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "formula"
require "keg"
require "cask/caskroom"
require "api"
module Homebrew
module Cmd
class Outdated < AbstractCommand
cmd_args do
description <<~EOS
List installed casks and formulae that have an updated... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/update-report.rb | Library/Homebrew/cmd/update-report.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "migrator"
require "formulary"
require "cask/cask_loader"
require "cask/migrator"
require "descriptions"
require "cleanup"
require "description_cache_store"
require "settings"
require "reinstall"
module Homebrew
module Cmd
class Up... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | true |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/log.rb | Library/Homebrew/cmd/log.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "fileutils"
module Homebrew
module Cmd
class Log < AbstractCommand
include FileUtils
cmd_args do
description <<~EOS
Show the `git log` for <formula> or <cask>, or show the log for the Homebrew reposit... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/pin.rb | Library/Homebrew/cmd/pin.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "formula"
module Homebrew
module Cmd
class Pin < AbstractCommand
cmd_args do
description <<~EOS
Pin the specified <formula>, preventing them from being upgraded when
issuing the `brew upgrade` <for... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/docs.rb | Library/Homebrew/cmd/docs.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
module Homebrew
module Cmd
class Docs < AbstractCommand
cmd_args do
description <<~EOS
Open Homebrew's online documentation at <#{HOMEBREW_DOCS_WWW}> in a browser.
EOS
end
sig { override.void }
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/uninstall.rb | Library/Homebrew/cmd/uninstall.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "keg"
require "formula"
require "diagnostic"
require "migrator"
require "cask/cask_loader"
require "cask/exceptions"
require "cask/installer"
require "cask/uninstall"
require "uninstall"
module Homebrew
module Cmd
class UninstallCm... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/which-formula.rb | Library/Homebrew/cmd/which-formula.rb | # typed: strict
# frozen_string_literal: true
# License: MIT
# The license text can be found in Library/Homebrew/command-not-found/LICENSE
require "abstract_command"
require "api"
require "shell_command"
module Homebrew
module Cmd
class WhichFormula < AbstractCommand
ENDPOINT = "internal/executables.txt"... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/command-not-found-init.rb | Library/Homebrew/cmd/command-not-found-init.rb | # typed: strict
# frozen_string_literal: true
# License: MIT
# The license text can be found in Library/Homebrew/command-not-found/LICENSE
require "abstract_command"
require "utils/shell"
module Homebrew
module Cmd
class CommandNotFoundInit < AbstractCommand
cmd_args do
description <<~EOS
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/--prefix.rb | Library/Homebrew/cmd/--prefix.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "fileutils"
module Homebrew
module Cmd
class Prefix < AbstractCommand
include FileUtils
UNBREWED_EXCLUDE_FILES = %w[.DS_Store].freeze
UNBREWED_EXCLUDE_PATHS = %w[
*/.keepme
.github/*
bin/b... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/postinstall.rb | Library/Homebrew/cmd/postinstall.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "sandbox"
require "formula_installer"
module Homebrew
module Cmd
class Postinstall < AbstractCommand
cmd_args do
description <<~EOS
Rerun the post-install steps for <formula>.
EOS
named_args... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/--taps.rb | Library/Homebrew/cmd/--taps.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "shell_command"
module Homebrew
module Cmd
class Taps < AbstractCommand
include ShellCommand
sig { override.returns(String) }
def self.command_name = "--taps"
cmd_args do
description <<~EOS
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/autoremove.rb | Library/Homebrew/cmd/autoremove.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "cleanup"
module Homebrew
module Cmd
class Autoremove < AbstractCommand
cmd_args do
description <<~EOS
Uninstall formulae that were only installed as a dependency of another formula and are now no longer nee... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/--env.rb | Library/Homebrew/cmd/--env.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "extend/ENV"
require "build_environment"
require "utils/shell"
module Homebrew
module Cmd
class Env < AbstractCommand
sig { override.returns(String) }
def self.command_name = "--env"
cmd_args do
descripti... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/mcp-server.rb | Library/Homebrew/cmd/mcp-server.rb | # typed: strong
# frozen_string_literal: true
require "abstract_command"
require "shell_command"
module Homebrew
module Cmd
class McpServerCmd < AbstractCommand
# This is a shell command as MCP servers need a faster startup time
# than a normal Homebrew Ruby command allows.
include ShellComman... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/tab.rb | Library/Homebrew/cmd/tab.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "formula"
require "tab"
module Homebrew
module Cmd
class TabCmd < AbstractCommand
cmd_args do
description <<~EOS
Edit tab information for installed formulae or casks.
This can be useful when you w... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/untap.rb | Library/Homebrew/cmd/untap.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
module Homebrew
module Cmd
class Untap < AbstractCommand
cmd_args do
description <<~EOS
Remove a tapped formula repository.
EOS
switch "-f", "--force",
description: "Untap even if form... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/missing.rb | Library/Homebrew/cmd/missing.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "formula"
require "tab"
require "diagnostic"
module Homebrew
module Cmd
class Missing < AbstractCommand
cmd_args do
description <<~EOS
Check the given <formula> kegs for missing dependencies. If no <formula>... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/search.rb | Library/Homebrew/cmd/search.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "formula"
require "missing_formula"
require "descriptions"
require "search"
module Homebrew
module Cmd
class SearchCmd < AbstractCommand
PACKAGE_MANAGERS = T.let({
alpine: ->(query) { "https://pkgs.alpinelinux.org/... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/nodenv-sync.rb | Library/Homebrew/cmd/nodenv-sync.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "formula"
module Homebrew
module Cmd
class NodenvSync < AbstractCommand
cmd_args do
description <<~EOS
Create symlinks for Homebrew's installed NodeJS versions in `~/.nodenv/versions`.
Note that o... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/link.rb | Library/Homebrew/cmd/link.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "caveats"
require "unlink"
module Homebrew
module Cmd
class Link < AbstractCommand
cmd_args do
description <<~EOS
Symlink all of <formula>'s installed files into Homebrew's prefix.
This is done aut... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/help.rb | Library/Homebrew/cmd/help.rb | # typed: strong
# frozen_string_literal: true
require "abstract_command"
require "help"
module Homebrew
module Cmd
class HelpCmd < AbstractCommand
cmd_args do
description <<~EOS
Outputs the usage instructions for `brew` <command>.
Equivalent to `brew --help` <command>.
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/info.rb | Library/Homebrew/cmd/info.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "missing_formula"
require "caveats"
require "options"
require "formula"
require "keg"
require "tab"
require "json"
require "utils/spdx"
require "deprecate_disable"
require "api"
module Homebrew
module Cmd
class Info < AbstractComma... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/upgrade.rb | Library/Homebrew/cmd/upgrade.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "formula_installer"
require "install"
require "upgrade"
require "cask/utils"
require "cask/upgrade"
require "cask/macos"
require "api"
require "reinstall"
module Homebrew
module Cmd
class UpgradeCmd < AbstractCommand
cmd_args... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/--cache.rb | Library/Homebrew/cmd/--cache.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "fetch"
require "cask/download"
module Homebrew
module Cmd
class Cache < AbstractCommand
include Fetch
sig { override.returns(String) }
def self.command_name = "--cache"
cmd_args do
description <<~... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/tap.rb | Library/Homebrew/cmd/tap.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "tap"
module Homebrew
module Cmd
class TapCmd < AbstractCommand
cmd_args do
usage_banner "`tap` [<options>] [<user>`/`<repo>] [<URL>]"
description <<~EOS
Tap a formula repository.
If no arg... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/fetch.rb | Library/Homebrew/cmd/fetch.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "formula"
require "fetch"
require "cask/download"
require "download_queue"
module Homebrew
module Cmd
class FetchCmd < AbstractCommand
include Fetch
FETCH_MAX_TRIES = 5
cmd_args do
description <<~EOS
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/unpin.rb | Library/Homebrew/cmd/unpin.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "formula"
module Homebrew
module Cmd
class Unpin < AbstractCommand
cmd_args do
description <<~EOS
Unpin <formula>, allowing them to be upgraded by `brew upgrade` <formula>.
See also `pin`.
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/unlink.rb | Library/Homebrew/cmd/unlink.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "unlink"
module Homebrew
module Cmd
class UnlinkCmd < AbstractCommand
cmd_args do
description <<~EOS
Remove symlinks for <formula> from Homebrew's prefix. This can be useful
for temporarily disabli... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/commands.rb | Library/Homebrew/cmd/commands.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
module Homebrew
module Cmd
class CommandsCmd < AbstractCommand
cmd_args do
description <<~EOS
Show lists of built-in and external commands.
EOS
switch "-q", "--quiet",
description: "Li... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/deps.rb | Library/Homebrew/cmd/deps.rb | # typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true
require "abstract_command"
require "formula"
require "cask/caskroom"
require "dependencies_helpers"
module Homebrew
module Cmd
class Deps < AbstractCommand
include DependenciesHelpers
cmd_args do
description <<~EO... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/--version.rb | Library/Homebrew/cmd/--version.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "shell_command"
module Homebrew
module Cmd
class Version < AbstractCommand
include ShellCommand
sig { override.returns(String) }
def self.command_name = "--version"
cmd_args do
description <<~EOS
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/list.rb | Library/Homebrew/cmd/list.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "metafiles"
require "formula"
require "cli/parser"
require "cask/list"
require "system_command"
require "tab"
module Homebrew
module Cmd
class List < AbstractCommand
include SystemCommand::Mixin
cmd_args do
des... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/unalias.rb | Library/Homebrew/cmd/unalias.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "aliases/aliases"
module Homebrew
module Cmd
class Unalias < AbstractCommand
cmd_args do
description <<~EOS
Remove aliases.
EOS
named_args :alias, min: 1
end
sig { override.void... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/pyenv-sync.rb | Library/Homebrew/cmd/pyenv-sync.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "formula"
module Homebrew
module Cmd
class PyenvSync < AbstractCommand
cmd_args do
description <<~EOS
Create symlinks for Homebrew's installed Python versions in `~/.pyenv/versions`.
Note that old... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/config.rb | Library/Homebrew/cmd/config.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "system_config"
module Homebrew
module Cmd
class Config < AbstractCommand
cmd_args do
description <<~EOS
Show Homebrew and system configuration info useful for debugging. If you file
a bug report, ... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/alias.rb | Library/Homebrew/cmd/alias.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "aliases/aliases"
module Homebrew
module Cmd
class Alias < AbstractCommand
cmd_args do
usage_banner "`alias` [`--edit`] [<alias>|<alias>=<command>]"
description <<~EOS
Show an alias's command. If no ... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/casks.rb | Library/Homebrew/cmd/casks.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "shell_command"
# This Ruby command exists to allow generation of completions for the Bash
# version. It is not meant to be run.
module Homebrew
module Cmd
class Casks < AbstractCommand
include ShellCommand
cmd_args do... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/analytics.rb | Library/Homebrew/cmd/analytics.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
module Homebrew
module Cmd
class Analytics < AbstractCommand
cmd_args do
description <<~EOS
Control Homebrew's anonymous aggregate user behaviour analytics.
Read more at <https://docs.brew.sh/Analytics>.
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/install.rb | Library/Homebrew/cmd/install.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "cask/config"
require "cask/installer"
require "cask/upgrade"
require "cask_dependent"
require "missing_formula"
require "formula_installer"
require "development_tools"
require "install"
require "cleanup"
require "upgrade"
module Homebr... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/--cellar.rb | Library/Homebrew/cmd/--cellar.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
module Homebrew
module Cmd
class Cellar < AbstractCommand
sig { override.returns(String) }
def self.command_name = "--cellar"
cmd_args do
description <<~EOS
Display Homebrew's Cellar path. *Default:* `$... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/setup-ruby.rb | Library/Homebrew/cmd/setup-ruby.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "shell_command"
module Homebrew
module Cmd
class SetupRuby < AbstractCommand
include ShellCommand
cmd_args do
description <<~EOS
Installs and configures Homebrew's Ruby. If `command` is passed, it wil... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/services.rb | Library/Homebrew/cmd/services.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "services/system"
require "services/commands/list"
require "services/commands/cleanup"
require "services/commands/info"
require "services/commands/restart"
require "services/commands/run"
require "services/commands/start"
require "service... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/update-if-needed.rb | Library/Homebrew/cmd/update-if-needed.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "shell_command"
module Homebrew
module Cmd
class UpdateIfNeeded < AbstractCommand
include ShellCommand
cmd_args do
description <<~EOS
Runs `brew update --auto-update` only if needed.
This is... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/formulae.rb | Library/Homebrew/cmd/formulae.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "shell_command"
module Homebrew
module Cmd
class Formulae < AbstractCommand
include ShellCommand
cmd_args do
description "List all locally installable formulae including short names."
end
end
end
en... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/developer.rb | Library/Homebrew/cmd/developer.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
module Homebrew
module Cmd
class Developer < AbstractCommand
cmd_args do
description <<~EOS
Control Homebrew's developer mode. When developer mode is enabled,
`brew update` will update Homebrew to the late... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/leaves.rb | Library/Homebrew/cmd/leaves.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "formula"
require "cask_dependent"
module Homebrew
module Cmd
class Leaves < AbstractCommand
cmd_args do
description <<~EOS
List installed formulae that are not dependencies of another installed formula or c... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cmd/rbenv-sync.rb | Library/Homebrew/cmd/rbenv-sync.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "formula"
module Homebrew
module Cmd
class RbenvSync < AbstractCommand
cmd_args do
description <<~EOS
Create symlinks for Homebrew's installed Ruby versions in `~/.rbenv/versions`.
Note that older... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/gems/mechanize-2.14.0/lib/mechanize/version.rb | Library/Homebrew/vendor/gems/mechanize-2.14.0/lib/mechanize/version.rb | # frozen_string_literal: true
class Mechanize
VERSION = "2.14.0"
end
| ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/gems/mechanize-2.14.0/lib/mechanize/http/content_disposition_parser.rb | Library/Homebrew/vendor/gems/mechanize-2.14.0/lib/mechanize/http/content_disposition_parser.rb | # frozen_string_literal: true
# coding: BINARY
require 'strscan'
require 'time'
class Mechanize::HTTP
ContentDisposition = Struct.new :type, :filename, :creation_date,
:modification_date, :read_date, :size, :parameters
end
##
# Parser Content-Disposition headers that loosely follows RFC 2183.
#
# Beyond RFC 21... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/bundler/setup.rb | Library/Homebrew/vendor/bundle/bundler/setup.rb | require 'rbconfig'
module Kernel
remove_method(:gem) if private_method_defined?(:gem)
def gem(*)
end
private :gem
end
unless defined?(Gem)
module Gem
def self.ruby_api_version
RbConfig::CONFIG["ruby_version"]
end
def self.extension_api_version
if 'no' == RbConfig::CONFIG['ENABLE_SHA... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/base64-0.3.0/lib/base64.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/base64-0.3.0/lib/base64.rb | # frozen_string_literal: true
#
# \Module \Base64 provides methods for:
#
# - \Encoding a binary string (containing non-ASCII characters)
# as a string of printable ASCII characters.
# - Decoding such an encoded string.
#
# \Base64 is commonly used in contexts where binary data
# is not allowed or supported:
#
# - Im... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/warning-1.5.0/lib/warning.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/warning-1.5.0/lib/warning.rb | require 'monitor'
module Warning
module Processor
# Map of symbols to regexps for warning messages to ignore.
IGNORE_MAP = {
ambiguous_slash: /: warning: ambiguous first argument; put parentheses or a space even after [`']\/' operator\n\z|: warning: ambiguity between regexp and two divisions: wrap rege... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/ruby-macho-4.1.0/lib/macho.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/ruby-macho-4.1.0/lib/macho.rb | # frozen_string_literal: true
require "open3"
require_relative "macho/utils"
require_relative "macho/structure"
require_relative "macho/view"
require_relative "macho/headers"
require_relative "macho/load_commands"
require_relative "macho/sections"
require_relative "macho/macho_file"
require_relative "macho/fat_file"
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/ruby-macho-4.1.0/lib/macho/sections.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/ruby-macho-4.1.0/lib/macho/sections.rb | # frozen_string_literal: true
module MachO
# Classes and constants for parsing sections in Mach-O binaries.
module Sections
# type mask
SECTION_TYPE_MASK = 0x000000ff
# attributes mask
SECTION_ATTRIBUTES_MASK = 0xffffff00
# user settable attributes mask
SECTION_ATTRIBUTES_USR_MASK = 0xff0... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/ruby-macho-4.1.0/lib/macho/macho_file.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/ruby-macho-4.1.0/lib/macho/macho_file.rb | # frozen_string_literal: true
require "forwardable"
module MachO
# Represents a Mach-O file, which contains a header and load commands
# as well as binary executable instructions. Mach-O binaries are
# architecture specific.
# @see https://en.wikipedia.org/wiki/Mach-O
# @see FatFile
class MachOFile
ex... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/ruby-macho-4.1.0/lib/macho/tools.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/ruby-macho-4.1.0/lib/macho/tools.rb | # frozen_string_literal: true
module MachO
# A collection of convenient methods for common operations on Mach-O and Fat
# binaries.
module Tools
# @param filename [String] the Mach-O or Fat binary being read
# @return [Array<String>] an array of all dylibs linked to the binary
def self.dylibs(filenam... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/ruby-macho-4.1.0/lib/macho/exceptions.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/ruby-macho-4.1.0/lib/macho/exceptions.rb | # frozen_string_literal: true
module MachO
# A generic Mach-O error in execution.
class MachOError < RuntimeError
end
# Raised when a Mach-O file modification fails.
class ModificationError < MachOError
end
# Raised when codesigning fails. Certain environments
# may want to rescue this to treat it as... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/ruby-macho-4.1.0/lib/macho/view.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/ruby-macho-4.1.0/lib/macho/view.rb | # frozen_string_literal: true
module MachO
# A representation of some unspecified Mach-O data.
class MachOView
# @return [MachOFile] that this view belongs to
attr_reader :macho_file
# @return [String] the raw Mach-O data
attr_reader :raw_data
# @return [Symbol] the endianness of the data (`:... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/ruby-macho-4.1.0/lib/macho/utils.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/ruby-macho-4.1.0/lib/macho/utils.rb | # frozen_string_literal: true
module MachO
# A collection of utility functions used throughout ruby-macho.
module Utils
# Rounds a value to the next multiple of the given round.
# @param value [Integer] the number being rounded
# @param round [Integer] the number being rounded with
# @return [Integ... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/ruby-macho-4.1.0/lib/macho/fat_file.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/ruby-macho-4.1.0/lib/macho/fat_file.rb | # frozen_string_literal: true
require "forwardable"
module MachO
# Represents a "Fat" file, which contains a header, a listing of available
# architectures, and one or more Mach-O binaries.
# @see https://en.wikipedia.org/wiki/Mach-O#Multi-architecture_binaries
# @see MachOFile
class FatFile
extend Forw... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/ruby-macho-4.1.0/lib/macho/structure.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/ruby-macho-4.1.0/lib/macho/structure.rb | # frozen_string_literal: true
module MachO
# A general purpose pseudo-structure. Described in detail in docs/machostructure-dsl.md.
# @abstract
class MachOStructure
# Constants used for parsing MachOStructure fields
module Fields
# 1. All fields with empty strings and zeros aren't used
# t... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/ruby-macho-4.1.0/lib/macho/headers.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/ruby-macho-4.1.0/lib/macho/headers.rb | # frozen_string_literal: true
module MachO
# Classes and constants for parsing the headers of Mach-O binaries.
module Headers
# big-endian fat magic
# @api private
FAT_MAGIC = 0xcafebabe
# little-endian fat magic
# @note This is defined for completeness, but should never appear in ruby-macho c... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/ruby-macho-4.1.0/lib/macho/load_commands.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/ruby-macho-4.1.0/lib/macho/load_commands.rb | # frozen_string_literal: true
module MachO
# Classes and constants for parsing load commands in Mach-O binaries.
module LoadCommands
# load commands added after OS X 10.1 need to be bitwise ORed with
# LC_REQ_DYLD to be recognized by the dynamic linker (dyld)
# @api private
LC_REQ_DYLD = 0x80000000... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | true |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/plist-3.7.2/lib/plist.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/plist-3.7.2/lib/plist.rb | # encoding: utf-8
# = plist
#
# This is the main file for plist. Everything interesting happens in
# Plist and Plist::Emit.
#
# Copyright 2006-2010 Ben Bleything and Patrick May
# Distributed under the MIT License
#
require 'cgi'
require 'stringio'
require_relative 'plist/generator'
require_relative 'plist/parser'
r... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/plist-3.7.2/lib/plist/version.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/plist-3.7.2/lib/plist/version.rb | # encoding: utf-8
module Plist
VERSION = '3.7.2'.freeze
end
| ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/plist-3.7.2/lib/plist/parser.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/plist-3.7.2/lib/plist/parser.rb | # encoding: utf-8
# = plist
#
# Copyright 2006-2010 Ben Bleything and Patrick May
# Distributed under the MIT License
#
# Plist parses Mac OS X xml property list files into ruby data structures.
#
# === Load a plist file
# This is the main point of the library:
#
# r = Plist.parse_xml(filename_or_xml)
module Plist
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/plist-3.7.2/lib/plist/generator.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/plist-3.7.2/lib/plist/generator.rb | # encoding: utf-8
# = plist
#
# Copyright 2006-2010 Ben Bleything and Patrick May
# Distributed under the MIT License
#
module Plist
# === Create a plist
# You can dump an object to a plist in one of two ways:
#
# * <tt>Plist::Emit.dump(obj)</tt>
# * <tt>obj.to_plist</tt>
# * This requires that you mixi... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/sorbet-runtime.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/sorbet-runtime.rb | # frozen_string_literal: true
# typed: true
# This file is hand-crafted to encode the dependencies. They load the whole type
# system since there is such a high chance of it being used, using an autoloader
# wouldn't buy us any startup time saving.
# Namespaces without any implementation
module T; end
module T::Helpe... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/generic.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/generic.rb | # frozen_string_literal: true
# typed: true
# Use as a mixin with extend (`extend T::Generic`).
module T::Generic
include T::Helpers
include Kernel
### Class/Module Helpers ###
def [](*types)
self
end
def type_member(variance=:invariant, &blk)
T::Types::TypeMember.new(variance)
end
def type... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/struct.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/struct.rb | # frozen_string_literal: true
# typed: true
class T::InexactStruct
include T::Props
include T::Props::Serializable
include T::Props::Constructor
end
class T::Struct < T::InexactStruct
def self.inherited(subclass)
super(subclass)
T::Private::ClassUtils.replace_method(subclass.singleton_class, :inherite... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/sig.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/sig.rb | # frozen_string_literal: true
# typed: strict
# Used as a mixin to any class so that you can call `sig`.
# Docs at https://sorbet.org/docs/sigs
module T::Sig
module WithoutRuntime
# At runtime, does nothing, but statically it is treated exactly the same
# as T::Sig#sig. Only use it in cases where you can't u... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/utils.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/utils.rb | # frozen_string_literal: true
# typed: true
module T::Utils
module Private
def self.coerce_and_check_module_types(val, check_val, check_module_type)
# rubocop:disable Style/CaseLikeIf
if val.is_a?(T::Types::Base)
if val.is_a?(T::Private::Types::TypeAlias)
val.aliased_type
el... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/boolean.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/boolean.rb | # typed: strict
# frozen_string_literal: true
module T
# T::Boolean is a type alias helper for the common `T.any(TrueClass, FalseClass)`.
# Defined separately from _types.rb because it has a dependency on T::Types::Union.
Boolean = T.type_alias { T.any(TrueClass, FalseClass) }
end
| ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/abstract_utils.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/abstract_utils.rb | # frozen_string_literal: true
# typed: true
module T::AbstractUtils
Methods = T::Private::Methods
# Returns whether a module is declared as abstract. After the module is finished being declared,
# this is equivalent to whether it has any abstract methods that haven't been implemented
# (because we validate th... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/helpers.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/helpers.rb | # frozen_string_literal: true
# typed: true
# Use as a mixin with extend (`extend T::Helpers`).
# Docs at https://sorbet.org/docs/
module T::Helpers
extend T::Sig
Private = T::Private
### Class/Module Helpers ###
def abstract!
if defined?(super)
# This is to play nicely with Rails' AbstractControl... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/_types.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/_types.rb | # frozen_string_literal: true
# typed: true
# This is where we define the shortcuts, so we can't use them here
# _____
# |_ _| _ _ __ ___ ___
# | || | | | '_ \ / _ \/ __|
# | || |_| | |_) | __/\__ \
# |_| \__, | .__/ \___||___/
# |___/|_|
#
# Docs at https://sorbet.org/docs/sigs
#
# Types that you... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/configuration.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/configuration.rb | # typed: true
# frozen_string_literal: true
module T::Configuration
# Announces to Sorbet that we are currently in a test environment, so it
# should treat any sigs which are marked `.checked(:tests)` as if they were
# just a normal sig.
#
# If this method is not called, sigs marked `.checked(:tests)` will n... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/enum.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/enum.rb | # frozen_string_literal: true
# typed: strict
# Enumerations allow for type-safe declarations of a fixed set of values.
#
# Every value is a singleton instance of the class (i.e. `Suit::SPADE.is_a?(Suit) == true`).
#
# Each value has a corresponding serialized value. By default this is the constant's name converted
# ... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.