> For the complete documentation index, see [llms.txt](https://www.techwithtyler.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.techwithtyler.dev/coding-and-cli-tooling/cli-tools/homebrew.md).

# Homebrew

Tips and tricks for working with the best package manager for MacOS!

## Installation

Most recent instructions on [brew.sh ](https://www.techwithtyler.dev/coding-and-cli-tooling/cli-tools/www.brew.sh)

{% code overflow="wrap" %}

```bash
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```

{% endcode %}

***

## Commands

### Find app

{% code overflow="wrap" %}

```bash
brew search visual-studio-code

==> Casks
visual-studio                     visual-studio-code ✔              visual-studio-code@insiders
```

{% endcode %}

### Get app info

{% code overflow="wrap" %}

```bash
brew info awscli       
      
==> awscli: stable 2.17.27 (bottled), HEAD
Official Amazon AWS command-line interface
https://aws.amazon.com/cli/
```

{% endcode %}

### Install app

{% code overflow="wrap" %}

```bash
brew install awscli
```

{% endcode %}

### List installed apps

{% code overflow="wrap" %}

```bash
brew list     
                
==> Formulae
awscli			icu4c			mpfr			python@3.12
```

{% endcode %}

***

## macOS apps

Homebrew can manage macOS apps from the App Store! You just need to install `mas` first.

Refer to the [mas documentation](https://github.com/mas-cli/mas) for more info.

{% code overflow="wrap" %}

```bash
brew install mas
```

{% endcode %}

### Find app

```
mas search upnote

1398373917  UpNote: notes, diary, journal  (9.5.2)
1312926037  stoic. journal & mental health (2024.27)
1566998257  UpNote Web Clipper             (1.2.1)
```

### Get app info&#x20;

{% code overflow="wrap" %}

```bash
mas info 1398373917

UpNote: notes, diary, journal 9.5.2 [0.0]
By: UpNote Company Limited
```

{% endcode %}

### Install app

```
mas install 1398373917
```

### List installed apps

{% code overflow="wrap" %}

```bash
mas list

1352778147  Bitwarden  (2024.6.4)
1398373917  UpNote     (9.5.2)
```

{% endcode %}

***

## Brew Bundles & Brewfiles

A Brew Bundle is a Brewfile containing all of the apps you wish to install — including apps installed via the Mac App Store (if `mas` was used) and even VS Code extensions!&#x20;

This is super useful when reimaging or moving to another system.&#x20;

### Generate Brewfile

This creates the `Brewfile` within the current directory.

{% code overflow="wrap" %}

```bash
brew bundle dump
```

{% endcode %}

### Install Bundle

This installs apps from `Brewfile`&#x20;

{% code overflow="wrap" %}

```bash
# uses Brewfile in the current directory
brew bundle install

# uses Brewfile stored elsewhere
brew bundle install --file /path/to/Brewfile
```

{% endcode %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://www.techwithtyler.dev/coding-and-cli-tooling/cli-tools/homebrew.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
