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..54c661d --- /dev/null +++ b/Brewfile @@ -0,0 +1,71 @@ +tap "nikitabobko/tap" +tap "oven-sh/bun" +tap "slp/krunkit" +# 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" +# Tool for managing OCI containers and pods +brew "podman" +# Alternative to docker-compose using podman +brew "podman-compose" +# Framework for managing multi-language pre-commit hooks +brew "pre-commit" +# Terminal multiplexer +brew "tmux" +# 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" +# 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" +# Voice and text chat software +cask "discord" +# 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" +# Word processor +cask "microsoft-word" +# App to write, plan, collaborate, and get organised +cask "notion" +# Image editor +cask "paintbrush" +# Browse, manage, inspect containers and images +cask "podman-desktop" +# Team communication and collaboration software +cask "slack" +# Video game digital distribution service +cask "steam" +# 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..1f72a08 --- /dev/null +++ b/Makefile @@ -0,0 +1,26 @@ +.DEFAULT_GOAL := check + +.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: check + 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 +```