From 40bc70411b62b13d029c417a09f95aec3f332e65 Mon Sep 17 00:00:00 2001 From: xnoto Date: Fri, 13 Feb 2026 15:20:41 -0700 Subject: [PATCH 1/3] feat: add Brewfile, pre-commit hooks, and CI lint workflow - Add Brewfile with top-level formulae, casks, and taps from current system - Add pre-commit config with trailing-whitespace, end-of-file-fixer, check-merge-conflict, and conventional-pre-commit hooks - Add GitHub Actions lint workflow that runs pre-commit and validates Brewfile syntax on PRs and pushes to main --- .github/workflows/lint.yml | 23 +++++ .pre-commit-config.yaml | 18 ++++ Brewfile | 181 +++++++++++++++++++++++++++++++++++++ 3 files changed, 222 insertions(+) create mode 100644 .github/workflows/lint.yml create mode 100644 .pre-commit-config.yaml create mode 100644 Brewfile diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..b6c8bdf --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,23 @@ +name: Lint + +on: + pull_request: + push: + branches: [main] + +jobs: + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.x" + - uses: pre-commit/action@v3.0.1 + + brewfile-syntax: + runs-on: macos-latest + steps: + - uses: actions/checkout@v4 + - name: Validate Brewfile syntax + run: brew bundle list --file=Brewfile diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..e7c7af9 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,18 @@ +default_install_hook_types: + - pre-commit + - commit-msg + +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v5.0.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-merge-conflict + + - repo: https://github.com/compilerla/conventional-pre-commit + rev: v4.3.0 + hooks: + - id: conventional-pre-commit + stages: [commit-msg] + args: [feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert] diff --git a/Brewfile b/Brewfile new file mode 100644 index 0000000..a8a8416 --- /dev/null +++ b/Brewfile @@ -0,0 +1,181 @@ +# vim: set ft=ruby: +# +# Brewfile - macOS Homebrew packages +# +# Usage: +# brew bundle # Install everything +# brew bundle check # Verify all deps are installed +# brew bundle cleanup # Remove packages not in this file +# brew bundle cleanup --force # Actually uninstall unlisted packages +# brew bundle dump # Generate Brewfile from installed packages +# +# This file only lists top-level formulae (not transitive dependencies). +# Homebrew resolves and installs dependencies automatically. +# +# Organization: +# 1. Taps (third-party repositories) +# 2. Formulae by category +# 3. Casks by category +# + +############################################################################### +# Taps +############################################################################### + +# AeroSpace tiling window manager +tap "nikitabobko/tap" + +# Bun JavaScript runtime +tap "oven-sh/bun" + +# krunkit lightweight VM runner +tap "slp/krunkit" + +############################################################################### +# Formulae - Development Tools +############################################################################### + +# Bun: incredibly fast JavaScript runtime, bundler, transpiler, and package manager +brew "bun" + +# Node.js: open-source, cross-platform JavaScript runtime environment +# Note: also used as a dependency by many tools +brew "node" + +# uv: extremely fast Python package installer and resolver, written in Rust +brew "uv" + +# pre-commit: framework for managing multi-language pre-commit hooks +brew "pre-commit" + +# Vim: Vi 'workalike' with many additional features +brew "vim" + +# OpenCode: AI coding agent, built for the terminal +brew "opencode" + +############################################################################### +# Formulae - Infrastructure & Containers +############################################################################### + +# Podman: tool for managing OCI containers and pods (Docker alternative) +brew "podman" + +# podman-compose: alternative to docker-compose using podman +brew "podman-compose" + +# krunkit: CLI to start Linux VMs using libkrun (macOS Hypervisor framework) +brew "krunkit" + +# kubernetes-cli (kubectl): Kubernetes command-line interface +brew "kubernetes-cli" + +############################################################################### +# Formulae - System & Terminal +############################################################################### + +# tmux: terminal multiplexer +brew "tmux" + +# htop: improved top (interactive process viewer) +brew "htop" + +# ripgrep: search tool like grep, but faster +brew "ripgrep" + +# GnuPG: GNU Privacy Guard for encryption and signing +brew "gnupg" + +# chezmoi: manage dotfiles across multiple machines, securely +brew "chezmoi" + +############################################################################### +# Casks - Development +############################################################################### + +# Alacritty: GPU-accelerated terminal emulator +cask "alacritty" + +# Cursor: AI-powered code editor +cask "cursor" + +# Podman Desktop: GUI for managing containers and images +cask "podman-desktop" + +############################################################################### +# Casks - Browsers +############################################################################### + +# Google Chrome: web browser +cask "google-chrome" + +############################################################################### +# Casks - Communication +############################################################################### + +# Discord: voice and text chat +cask "discord" + +# Slack: team communication and collaboration +cask "slack" + +# Microsoft Teams: meeting, chat, call, and collaboration +cask "microsoft-teams" + +# Thunderbird: customizable email client by Mozilla +cask "thunderbird" + +############################################################################### +# Casks - Productivity +############################################################################### + +# Microsoft Word: word processor +cask "microsoft-word" + +# Microsoft PowerPoint: presentation software +cask "microsoft-powerpoint" + +# Microsoft Outlook: email client +cask "microsoft-outlook" + +# Notion: write, plan, collaborate, and get organised +cask "notion" + +# Linear: app to manage software development and track bugs +cask "linear-linear" + +############################################################################### +# Casks - Utilities & System +############################################################################### + +# AeroSpace: i3-like tiling window manager for macOS +cask "aerospace" + +# Bitwarden: open-source password manager +cask "bitwarden" + +# Yubico Authenticator: TOTP and HOTP code generator for YubiKeys +cask "yubico-authenticator" + +# DisplayLink: drivers for DisplayLink docks, adapters, and monitors +cask "displaylink" + +############################################################################### +# Casks - Creative & Media +############################################################################### + +# GIMP: free and open-source image editor +cask "gimp" + +# Paintbrush: simple image editor +cask "paintbrush" + +############################################################################### +# Casks - Gaming & Compatibility +############################################################################### + +# Steam: video game digital distribution service +cask "steam" + +# CrossOver: run Windows software on macOS +cask "crossover" From e4cf896b095f04c491108efb19e441dd5d4fe176 Mon Sep 17 00:00:00 2001 From: xnoto Date: Fri, 13 Feb 2026 15:40:04 -0700 Subject: [PATCH 2/3] feat: add Makefile for install/sync and update Brewfile to match system state - Add Makefile with install (default) and sync targets - Regenerate Brewfile via brew bundle dump --describe for ground truth - Update README with usage and workflow documentation --- Brewfile | 222 ++++++++++++++---------------------------------------- Makefile | 19 +++++ README.md | 29 ++++++- 3 files changed, 103 insertions(+), 167 deletions(-) create mode 100644 Makefile diff --git a/Brewfile b/Brewfile index a8a8416..54c661d 100644 --- a/Brewfile +++ b/Brewfile @@ -1,181 +1,71 @@ -# vim: set ft=ruby: -# -# Brewfile - macOS Homebrew packages -# -# Usage: -# brew bundle # Install everything -# brew bundle check # Verify all deps are installed -# brew bundle cleanup # Remove packages not in this file -# brew bundle cleanup --force # Actually uninstall unlisted packages -# brew bundle dump # Generate Brewfile from installed packages -# -# This file only lists top-level formulae (not transitive dependencies). -# Homebrew resolves and installs dependencies automatically. -# -# Organization: -# 1. Taps (third-party repositories) -# 2. Formulae by category -# 3. Casks by category -# - -############################################################################### -# Taps -############################################################################### - -# AeroSpace tiling window manager tap "nikitabobko/tap" - -# Bun JavaScript runtime tap "oven-sh/bun" - -# krunkit lightweight VM runner tap "slp/krunkit" - -############################################################################### -# Formulae - Development Tools -############################################################################### - -# Bun: incredibly fast JavaScript runtime, bundler, transpiler, and package manager -brew "bun" - -# Node.js: open-source, cross-platform JavaScript runtime environment -# Note: also used as a dependency by many tools -brew "node" - -# uv: extremely fast Python package installer and resolver, written in Rust -brew "uv" - -# pre-commit: framework for managing multi-language pre-commit hooks -brew "pre-commit" - -# Vim: Vi 'workalike' with many additional features -brew "vim" - -# OpenCode: AI coding agent, built for the terminal +# Manage your dotfiles across multiple diverse machines, securely +brew "chezmoi" +# GNU Privacy Guard (OpenPGP) +brew "gnupg" +# Improved top (interactive process viewer) +brew "htop" +# Kubernetes command-line interface +brew "kubernetes-cli" +# AI coding agent, built for the terminal brew "opencode" - -############################################################################### -# Formulae - Infrastructure & Containers -############################################################################### - -# Podman: tool for managing OCI containers and pods (Docker alternative) +# Tool for managing OCI containers and pods brew "podman" - -# podman-compose: alternative to docker-compose using podman +# Alternative to docker-compose using podman brew "podman-compose" - -# krunkit: CLI to start Linux VMs using libkrun (macOS Hypervisor framework) -brew "krunkit" - -# kubernetes-cli (kubectl): Kubernetes command-line interface -brew "kubernetes-cli" - -############################################################################### -# Formulae - System & Terminal -############################################################################### - -# tmux: terminal multiplexer +# Framework for managing multi-language pre-commit hooks +brew "pre-commit" +# Terminal multiplexer brew "tmux" - -# htop: improved top (interactive process viewer) -brew "htop" - -# ripgrep: search tool like grep, but faster -brew "ripgrep" - -# GnuPG: GNU Privacy Guard for encryption and signing -brew "gnupg" - -# chezmoi: manage dotfiles across multiple machines, securely -brew "chezmoi" - -############################################################################### -# Casks - Development -############################################################################### - -# Alacritty: GPU-accelerated terminal emulator +# Extremely fast Python package installer and resolver, written in Rust +brew "uv" +# Vi 'workalike' with many additional features +brew "vim" +# Incredibly fast JavaScript runtime, bundler, transpiler and package manager - all in one. +brew "oven-sh/bun/bun" +# A CLI tool to start Linux KVM or macOS Hypervisor framework virtual machines using the libkrun platform. +brew "slp/krunkit/krunkit" +# AeroSpace is an i3-like tiling window manager for macOS +cask "nikitabobko/tap/aerospace" +# GPU-accelerated terminal emulator cask "alacritty" - -# Cursor: AI-powered code editor +# Desktop password and login vault +cask "bitwarden" +# Tool to run Windows software +cask "crossover" +# Write, edit, and chat about your code with AI cask "cursor" - -# Podman Desktop: GUI for managing containers and images -cask "podman-desktop" - -############################################################################### -# Casks - Browsers -############################################################################### - -# Google Chrome: web browser -cask "google-chrome" - -############################################################################### -# Casks - Communication -############################################################################### - -# Discord: voice and text chat +# Voice and text chat software cask "discord" - -# Slack: team communication and collaboration -cask "slack" - -# Microsoft Teams: meeting, chat, call, and collaboration +# Drivers for DisplayLink docks, adapters and monitors +cask "displaylink" +# Free and open-source image editor +cask "gimp" +# Web browser +cask "google-chrome" +# App to manage software development and track bugs +cask "linear-linear" +# Email client +cask "microsoft-outlook" +# Presentation software +cask "microsoft-powerpoint" +# Meet, chat, call, and collaborate in just one place cask "microsoft-teams" - -# Thunderbird: customizable email client by Mozilla -cask "thunderbird" - -############################################################################### -# Casks - Productivity -############################################################################### - -# Microsoft Word: word processor +# Word processor cask "microsoft-word" - -# Microsoft PowerPoint: presentation software -cask "microsoft-powerpoint" - -# Microsoft Outlook: email client -cask "microsoft-outlook" - -# Notion: write, plan, collaborate, and get organised +# App to write, plan, collaborate, and get organised cask "notion" - -# Linear: app to manage software development and track bugs -cask "linear-linear" - -############################################################################### -# Casks - Utilities & System -############################################################################### - -# AeroSpace: i3-like tiling window manager for macOS -cask "aerospace" - -# Bitwarden: open-source password manager -cask "bitwarden" - -# Yubico Authenticator: TOTP and HOTP code generator for YubiKeys -cask "yubico-authenticator" - -# DisplayLink: drivers for DisplayLink docks, adapters, and monitors -cask "displaylink" - -############################################################################### -# Casks - Creative & Media -############################################################################### - -# GIMP: free and open-source image editor -cask "gimp" - -# Paintbrush: simple image editor +# Image editor cask "paintbrush" - -############################################################################### -# Casks - Gaming & Compatibility -############################################################################### - -# Steam: video game digital distribution service +# Browse, manage, inspect containers and images +cask "podman-desktop" +# Team communication and collaboration software +cask "slack" +# Video game digital distribution service cask "steam" - -# CrossOver: run Windows software on macOS -cask "crossover" +# Customizable email client +cask "thunderbird" +# Application for generating TOTP and HOTP codes +cask "yubico-authenticator" diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..56d6ee4 --- /dev/null +++ b/Makefile @@ -0,0 +1,19 @@ +.DEFAULT_GOAL := install + +.PHONY: install sync + +## Install all packages from Brewfile +install: + brew bundle --file=Brewfile + +## Regenerate Brewfile from currently installed packages +sync: + brew bundle dump --describe --force --file=Brewfile + @echo "" + @if git diff --quiet Brewfile 2>/dev/null; then \ + echo "Brewfile is already up to date."; \ + else \ + echo "Brewfile updated. Changes:"; \ + echo ""; \ + git diff Brewfile; \ + fi diff --git a/README.md b/README.md index e844cd8..7fb2896 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,29 @@ # brewfile -MacOS Homebrew packages, used with `brew bundle` + +macOS Homebrew packages, managed with `brew bundle`. + +## Usage + +```sh +make # Install all packages from Brewfile +make install # Same as above +make sync # Regenerate Brewfile from installed packages +``` + +## Workflow + +Install packages on a new machine: + +```sh +git clone +cd brewfile +make +``` + +After installing or removing packages via `brew`, sync the Brewfile: + +```sh +make sync # Overwrites Brewfile, shows diff +git diff # Review changes +git commit # Commit when satisfied +``` From 0895c7f2582319cc48e60f5523e1fd044c189850 Mon Sep 17 00:00:00 2001 From: xnoto Date: Fri, 13 Feb 2026 15:41:37 -0700 Subject: [PATCH 3/3] refactor: make default target validate instead of install - Default target (make/make check/make test) validates Brewfile syntax - make install now depends on check, matching make && make install workflow --- Makefile | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 56d6ee4..1f72a08 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,16 @@ -.DEFAULT_GOAL := install +.DEFAULT_GOAL := check -.PHONY: install sync +.PHONY: check test install sync + +## Validate Brewfile syntax and check dependencies +check: + brew bundle list --file=Brewfile >/dev/null + +## Alias for check +test: check ## Install all packages from Brewfile -install: +install: check brew bundle --file=Brewfile ## Regenerate Brewfile from currently installed packages