https://github.com/piersolenski/brewfile.nvim
Manage your Homebrew Brewfile directly from Neovim
https://github.com/piersolenski/brewfile.nvim
brewfile dependency-manager homebrew lua neovim neovim-plugin nvim nvim-lua nvim-plugin
Last synced: about 1 month ago
JSON representation
Manage your Homebrew Brewfile directly from Neovim
- Host: GitHub
- URL: https://github.com/piersolenski/brewfile.nvim
- Owner: piersolenski
- Created: 2025-08-08T14:54:26.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2025-08-17T00:14:18.000Z (about 2 months ago)
- Last Synced: 2025-08-30T02:42:28.310Z (about 1 month ago)
- Topics: brewfile, dependency-manager, homebrew, lua, neovim, neovim-plugin, nvim, nvim-lua, nvim-plugin
- Language: Lua
- Homepage:
- Size: 67.4 KB
- Stars: 10
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-neovim-sorted - piersolenski/brewfile.nvim
README
# ๐บ brewfile.nvim
Manage your [Homebrew](https://brew.sh/) [Brewfile](https://docs.brew.sh/Brew-Bundle-and-Brewfile) directly from Neovim!
If you're on macOS and use [Homebrew](https://brew.sh/) (and if you're not, please strongly consider doing so!), you probably have a [Brewfile](https://docs.brew.sh/Brew-Bundle-and-Brewfile) to manage your packages declaratively. `brewfile.nvim` lets you manage your that Brewfile from within your favourite editor, giving you even less reasons to leave Vim or go outside. Why get Vitamin D when you can be installing and uninstalling apps, casks, and extensions at blazingly fast speeds?
## โจ Features
- **Install/uninstall packages** - Just position your cursor on any line in your Brewfile and hit your keybind
- **Auto-dumps Brewfile after changes** - Keeps your Brewfile in sync automatically
- **Package info** - Get detailed package information
- **Safety first** - Optional confirmation prompts for destructive actions## ๐ฆ Package Support
This plugin supports managing packages from a variety of sources:
- **Homebrew**: Standard `brew` packages.
- **Cask**: `cask` packages for GUI applications.
- **Mac App Store**: `mas` packages for App Store applications (Requires [mas-cli](https://github.com/mas-cli/mas)).
- **VSCode**: `vscode` extensions (Requires [Visual Studio Code](https://code.visualstudio.com/)).## ๐ฉ Installation
```lua
-- Lazy
{
"piersolenski/brewfile.nvim",
opts = {
-- Auto-dump Brewfile after brew commands finish
dump_on_change = true,
-- Show confirmation prompts for uninstall actions
confirmation_prompt = true,
},
keys = {
{
"bi",
function()
require("brewfile").install()
end,
desc = "Brew install package",
mode = { "n" },
},
{
"br",
function()
require("brewfile").dump()
end,
desc = "Dump Brewfile and refresh the buffer",
mode = { "n" },
},
{
"bo",
function()
require("brewfile").open_homepage()
end,
desc = "Open package homepage",
mode = { "n" },
},
{
"bd",
function()
require("brewfile").uninstall()
end,
desc = "Brew uninstall package",
mode = { "n" },
},
{
"bD",
function()
require("brewfile").force_uninstall()
end,
desc = "Brew force uninstall package",
mode = { "n" },
},
{
"bI",
function()
require("brewfile").info()
end,
desc = "Brew package info",
mode = { "n" },
},
{
"bu",
function()
require("brewfile").upgrade()
end,
desc = "Brew upgrade package",
mode = { "n" },
}
}
}
```## ๐ Usage
```sh
# Position cursor on any line in your Brewfile
brew "neovim" -- bi to upgrade, bd to uninstall
cask "firefox" -- Works with casks too!
mas "Xcode", id: 497799835 -- Even Mac App Store apps!
```## ๐จโ๐ฉโ๐งโ๐ฆ Related projects
- **[gx.nvim](https://github.com/chrishrb/gx.nvim)** - Open Brewfile links in browser
- **[package-info.nvim](https://github.com/vuki656/package-info.nvim)** - Similar functionality for npm packages## ๐ค About the author
As well as a passionate Vim enthusiast, I am a Full Stack Developer and Technical Lead from London, UK.
Whether it's to discuss a project, talk shop or just say hi, I'd love to hear from you!
- [Website](https://www.piersolenski.com/)
- [CodePen](https://codepen.io/piers)
- [LinkedIn](https://www.linkedin.com/in/piersolenski/)