Commit graph

126 commits

Author SHA1 Message Date
Vito Castellano
41c37be2c6
ci: remove deprecated macOS-13 Intel runner
macOS-13 runners are retired. Apple Silicon (macos-14) provides
sufficient macOS coverage.
2025-12-29 23:18:05 +01:00
Vito Castellano
75ad954791
fix(install): use sudo for apt-get when not running as root
GitHub Actions runners are not root, so apt-get needs sudo.
Detect if running as non-root and use sudo when available.
2025-12-29 23:14:51 +01:00
Vito Castellano
4be99a16b5
fix(ci): properly detect and remove pre-installed Homebrew
GitHub Actions runners have Homebrew pre-installed but not in PATH.
Check for directory existence, not just command availability.
Force remove all Homebrew directories to ensure clean state.
2025-12-29 23:13:31 +01:00
Vito Castellano
298c59327d
fix(ci): use --help instead of --version for compatibility
The --version flag is not yet in the released version (2.1.1).
Use 'which bbrew' and 'bbrew --help' to verify installation.
2025-12-29 23:10:46 +01:00
Vito Castellano
9b518f1dda
ci: add workflow to test install script on macOS and Linux
Tests:
- Linux (Ubuntu) fresh install
- macOS Apple Silicon (M1) fresh install
- macOS Intel fresh install
- Upgrade path (Homebrew already installed)

Triggered on changes to install.sh or workflow file.
2025-12-29 23:06:39 +01:00
Vito Castellano
4b07d8f33f
fix(install): always install deps before Homebrew on Linux
- Move dependency installation to install_homebrew() to ensure it runs
- Add NONINTERACTIVE=1 to skip 'Press ENTER' prompt
2025-12-29 22:50:44 +01:00
Vito Castellano
2d66b3c404
fix(install): auto-install Linux dependencies (git, build-essential)
Homebrew requires git and build tools on Linux. The script now
automatically installs them via apt-get/dnf/pacman before
attempting the Homebrew installation.
2025-12-29 22:49:10 +01:00
Vito Castellano
4e5a655b15
feat: add one-liner install script
Add install.sh that installs Homebrew (if needed) + Bold Brew in one command:
  curl -fsSL .../install.sh | bash

Features:
- Detects OS (macOS/Linux) and architecture
- Installs Homebrew if not present
- Configures PATH for Homebrew
- Installs or upgrades Bold Brew
- Colorful output with ASCII banner

Also updates README and website with quick install instructions.
2025-12-29 22:45:44 +01:00
Vito Castellano
c9d107d028
docs(website): add Brewfile Mode blog post and update features
Some checks are pending
Quality / golangci-lint (push) Waiting to run
Quality / Build (push) Waiting to run
Quality / Build-1 (push) Waiting to run
Security / Go Vulnerability Check (push) Waiting to run
Security / Security Scanner (push) Waiting to run
- Add new blog post about Brewfile Mode and remote URL support
- Add Brewfile Mode and Remote Brewfiles feature cards to homepage
- Add Brewfile Mode FAQ entry
- Update manifest.json to include Linux support
- Add Brewfile tag to blog sidebar
- Update Bold Brew 2.0 post: tap management is now implemented
2025-12-29 17:08:38 +01:00
Vito Castellano
4f1e0d3b7c
docs: add remote Brewfile support to README 2025-12-29 16:53:39 +01:00
Vito Castellano
f4e9c32987
feat(brewfile): add remote Brewfile support via HTTPS URLs
Users can now load Brewfiles from remote URLs:
  bbrew -f https://example.com/Brewfile

Remote files are downloaded to a temp file and auto-cleaned on exit.
Only HTTPS URLs are supported for security.
2025-12-29 16:52:26 +01:00
Vito Castellano
ca20863f4c
fix(ui): improve Details panel visual hierarchy
- Add dim separator lines under section titles
- Move Homepage above Description section
- Remove redundant status icon from title
- Fix 'macOS Application' to 'Desktop Application' (platform-agnostic)
- Keep yellow bold titles for better contrast
2025-12-29 16:30:58 +01:00
Vito Castellano
e0c12cea5a
fix(ui): improve table layout and truncate long versions
- Truncate version strings to max 15 chars with ellipsis
- Adjust layout proportions: left 75%, right 25%
- Prevents overly wide version columns from breaking layout
2025-12-29 16:10:42 +01:00
Vito Castellano
473f91e2c7
docs(examples): add themed Brewfile examples
- Add all.brewfile with comprehensive package collection
- Add ide.Brewfile with IDE/editor focused packages
- Remove test.brewfile (was for development testing)
2025-12-29 16:03:01 +01:00
Vito Castellano
78f9a024e4
docs: update screenshots with new Brewfile mode and refresh existing
- Add bbrew-brewfile-screenshot.png for Brewfile mode
- Remove obsolete bbrew-main-screenshot.png
- Update bbrew-installed-screenshot.png
- Update bbrew-search-screenshot.png
2025-12-29 16:00:08 +01:00
Vito Castellano
8b3988ffde
docs: update README with accurate shortcuts, CLI options and screenshots
- Add CLI Options section with -v/--version and -h/--help flags
- Fix keyboard shortcuts (Ctrl+R is Remove All, not Refresh)
- Add missing shortcuts: ?, Ctrl+A, Ctrl+R for Brewfile mode
- Remove outdated 'What's New in v2.0.0' section
- Remove non-existent docs link
- Update project structure description
- Replace bbrew-main-screenshot with bbrew-brewfile-screenshot
- Reorder screenshots: Installed, Search, Brewfile mode
2025-12-29 15:58:10 +01:00
Vito Castellano
95c5453aa1
fix(lint): update golangci config to Go 1.25 and enable test linting
- Update go version from 1.20 to 1.25 to match project
- Enable linting for test files (tests: true)
2025-12-29 15:39:02 +01:00
Vito Castellano
fa7996453f
feat(cli): add --version and --help flags
Add -v/--version flag to display version information.
Add custom --help message with usage examples.
Improve CLI user experience with clear documentation.
2025-12-29 15:32:34 +01:00
Vito Castellano
6e541cf05d
fix(ui): rename column header from '↓ (90d)' to 'Downloads'
More descriptive and cleaner column name for the downloads count.
2025-12-29 15:11:12 +01:00
Vito Castellano
e234487ac9
refactor(services): restructure and simplify service layer (#46)
* refactor(services): split brew.go into focused modules

Reorganize the services package for better maintainability:
- brew.go: Interface and struct definitions
- data.go: Data loading, caching, and tap package management
- cache.go: Low-level cache I/O helpers
- packages.go: Package retrieval (GetFormulae, GetPackages)
- operations.go: Package operations (install, update, remove)
- parser.go: Brewfile parsing
- brewfile.go: Brewfile-specific app logic (extracted from app.go)

This reduces the largest file from 1124 to 322 lines and improves
separation of concerns across the codebase.

* refactor(services): introduce DataProvider pattern for data loading

Extract data loading logic into a dedicated DataProvider service that
handles all data retrieval operations (formulae, casks, analytics, cache).
BrewService now delegates to DataProvider via interface for better
testability and separation of concerns.

Also centralizes cache file name constants in dataprovider.go for
maintainability.

* refactor(services): centralize data in DataProvider and improve naming consistency

Move all data-related fields and retrieval methods from BrewService to DataProvider, making BrewService focused solely on brew operations. Rename formula fields (all, installed, remote, analytics) to be consistent with cask naming convention (allFormulae, installedFormulae, etc.). Remove redundant data.go and packages.go files.

* refactor(services): consolidate code and fix shared dependencies

- IOService now receives BrewService as parameter instead of creating new instance
- Move API URL constants from brew.go to dataprovider.go (now private)
- Move getCacheDir to cache.go where it belongs
- Remove unused GetPrefixPath from BrewService interface
- Consolidate Brewfile parsing into brewfile.go as standalone function
- Delete parser.go (logic merged into brewfile.go)

* fix(brewfile): prevent duplicate packages in list after refresh

Add duplicate detection checks in loadBrewfilePackages to ensure each package appears only once in the Brewfile package list, even when refreshing after install/remove operations.

* refactor(services): extract search methods to dedicated file

Move search(), setResults(), and forceRefreshResults() from app.go
to search.go for better code organization and separation of concerns.

* refactor(services): remove dead code and unify helpers

Remove unused methods and fields:
- GetFormulae(), IsPackageInstalled() from DataProvider
- InstallAllPackages(), RemoveAllPackages() from BrewService
- allFormulae, allCasks fields from DataProvider

Unify GetInstalledCaskNames and GetInstalledFormulaNames with
a common getInstalledNames helper to reduce code duplication.

* docs(brewfile): add package documentation with execution sequence

Document Brewfile mode functionality including parsing, tap installation,
and package loading. Add execution sequence diagram and note that methods
are only active in Brewfile mode (bbrew -f <file>).

* refactor(services): move fetchFromAPI to dataprovider

Move HTTP fetch function from cache.go to dataprovider.go where it
belongs semantically. cache.go now contains only cache I/O operations.

* refactor(dataprovider): improve method naming consistency

Rename Load* methods to Get* with forceRefresh parameter for clarity:
- LoadInstalledFormulae → GetInstalledFormulae
- LoadRemoteFormulae → GetRemoteFormulae
- LoadTapPackages → GetTapPackages (and similar)

Rename Get* methods that execute commands to Fetch* for accuracy:
- GetInstalledCaskNames → FetchInstalledCaskNames
- GetInstalledFormulaNames → FetchInstalledFormulaNames

Replace forceDownload parameter with forceRefresh throughout.

* refactor(input): rename io.go to input.go and simplify code

Rename IOService/IOAction to InputService/InputAction for semantic
correctness (io in Go refers to file I/O, not keyboard input).

Simplify handleFilterEvent with helper methods: isFilterActive(),
setFilterActive(), updateFilterUI() reducing ~30 lines of repetitive code.

Extract handleBatchPackageOperation() helper for InstallAll/RemoveAll
operations, reducing ~90 lines of duplicate code with a configurable
batchOperation struct.

* refactor(filters): replace 4 booleans with FilterType enum

Replace showOnlyInstalled, showOnlyOutdated, showOnlyLeaves, showOnlyCasks
with a single activeFilter field of type FilterType.

Add FilterNone constant for no active filter state.
Simplify handleFilterEvent to simple toggle logic.
Extract applyFilter method with clean switch statement.
Remove redundant isFilterActive and setFilterActive helpers.

* refactor(brew): merge operations.go into brew.go

Consolidate all BrewService methods into a single file.
Add section comments to organize code into logical groups:
- Core info (GetBrewVersion)
- Package operations (Update/Install/Remove)
- Tap support (InstallTap/IsTapInstalled)
- Internal helpers (executeCommand)

* fix(dataprovider): suppress gosec G107 false positive

The URL passed to http.Get comes from internal constants (Homebrew API URLs),
not from user input.
2025-12-29 14:32:25 +01:00
Vito Castellano
5e893fe950
feat(ui): add help screen with keyboard shortcuts overlay (#44)
Some checks are pending
Quality / golangci-lint (push) Waiting to run
Quality / Build (push) Waiting to run
Quality / Build-1 (push) Waiting to run
Security / Go Vulnerability Check (push) Waiting to run
Security / Security Scanner (push) Waiting to run
* feat(legend): add HideFromLegend flag to reduce legend size

Hide Back and Quit actions from legend bar as they are intuitive keys. This prepares for a more compact legend with a dedicated help screen.

* feat(ui): add help screen with keyboard shortcuts overlay

Add a help modal accessible via '?' key that displays all keyboard shortcuts organized by category (Navigation, Filters, Actions, Brewfile). Reduce legend bar clutter by hiding less common actions and showing only essential shortcuts. Add HideFromLegend flag to IOAction struct for flexible legend management.
2025-12-28 19:38:54 +01:00
Vito Castellano
c933f00d00
feat(brewfile): add tap support with auto-installation and caching (#43)
Some checks are pending
Quality / golangci-lint (push) Waiting to run
Quality / Build (push) Waiting to run
Quality / Build-1 (push) Waiting to run
Security / Go Vulnerability Check (push) Waiting to run
Security / Security Scanner (push) Waiting to run
Add support for parsing and installing taps from Brewfile entries. Taps are automatically installed at startup before updating Homebrew data. Tap package information is cached for faster subsequent startups. Also fixes thread safety issues with UI notifications in background goroutines and improves error handling for brew command execution.
2025-12-28 12:45:21 +01:00
Arjun Pathak
453e8bfc8f
fix: update filter counter in case a filter returns nothing (#42)
Some checks are pending
Quality / golangci-lint (push) Waiting to run
Quality / Build (push) Waiting to run
Quality / Build-1 (push) Waiting to run
Security / Go Vulnerability Check (push) Waiting to run
Security / Security Scanner (push) Waiting to run
Co-authored-by: Arjun Pathak <arjun.pathak@nielsen.com>
2025-12-27 23:20:36 +01:00
Vito Castellano
e6af61716d
feat: add comprehensive caching for instant startup (#40)
Some checks failed
Quality / golangci-lint (push) Has been cancelled
Quality / Build (push) Has been cancelled
Quality / Build-1 (push) Has been cancelled
Security / Go Vulnerability Check (push) Has been cancelled
Security / Security Scanner (push) Has been cancelled
v2.1.1
- Cache all Homebrew data (installed packages, remote formulae/casks, analytics)
- Reduce startup time from 1-2s to ~50-100ms with populated cache
- Add cache validation to prevent corrupted data usage
- Make boot process resilient to cache corruption and network failures
- Background update ensures data freshness after startup

Cache files stored in ~/Library/Caches/bbrew/ following XDG standards:
- installed.json, installed-casks.json (local packages)
- formula.json, cask.json (remote packages)
- analytics.json, cask-analytics.json (download stats)

The app now starts instantly using cached data, then updates in background
without blocking the UI. Falls back gracefully if cache is corrupted or
network is unavailable.
2025-11-25 00:45:48 +01:00
Vito Castellano
6d10e0beab
feat: improve UI color scheme for better readability across terminal themes
Some checks are pending
Quality / golangci-lint (push) Waiting to run
Quality / Build (push) Waiting to run
Quality / Build-1 (push) Waiting to run
Security / Go Vulnerability Check (push) Waiting to run
Security / Security Scanner (push) Waiting to run
v2.1.0
Updates the UI theme system and improves visual consistency and accessibility across different terminal themes. The main changes include refactoring how colors are handled, updating component styles for better visibility, and ensuring that global styles adapt to the user's terminal settings.
2025-11-23 19:09:32 +01:00
Vito Castellano
aeee3b93b1
feat: add Brewfile mode for curated package collections (#37)
* feat: add Brewfile mode for curated package collections

This commit introduces Brewfile mode, allowing users to launch bbrew with
a curated list of packages using the -f flag. When a Brewfile is provided,
the application displays only those packages, enabling themed collections
like IDE choosers or developer tool sets.

The implementation includes a Brewfile parser for brew and cask entries,
automatic filtering of the package catalog, and a refactored API with the
IsBrewfileMode() method for cleaner code. Critical bugs were fixed including
a synchronization issue between the displayed table and the filtered packages
array that caused incorrect package selection.

This feature is designed for Project Bluefin integration, providing curated
package experiences where users can browse predefined collections. Includes
example Brewfiles and comprehensive documentation.

* feat: add Install All functionality for Brewfile mode

Add ctrl+a keybinding to install all packages from a Brewfile at once,
available exclusively in Brewfile mode.

* feat: add Remove All for Brewfile mode

Add ctrl+r keybinding to batch remove all installed packages from
Brewfile with real-time progress counter. Validates packages are
installed before proceeding and skips non-installed packages.
Available only in Brewfile mode
2025-11-23 18:54:56 +01:00
Vito Castellano
e22b82cc67
chore: add binary artifact (#38)
Some checks failed
Quality / golangci-lint (push) Has been cancelled
Quality / Build (push) Has been cancelled
Quality / Build-1 (push) Has been cancelled
Security / Go Vulnerability Check (push) Has been cancelled
Security / Security Scanner (push) Has been cancelled
Build and upload test binaries for Linux (amd64) and macOS (arm64)
as GitHub Actions artifacts. These are only accessible via PR checks
and expire after 7 days, allowing reviewers to test without building
from source.
2025-11-22 01:24:34 +01:00
renner
750caac75b
docs: add aurora (#34)
Some checks failed
Quality / golangci-lint (push) Has been cancelled
Quality / Build (push) Has been cancelled
Security / Go Vulnerability Check (push) Has been cancelled
Security / Security Scanner (push) Has been cancelled
2025-10-30 16:43:58 +01:00
Vito Castellano
ed036296a0
docs: update website with v2.0 features and cross-platform support
Some checks failed
Quality / golangci-lint (push) Has been cancelled
Quality / Build (push) Has been cancelled
Security / Go Vulnerability Check (push) Has been cancelled
Security / Security Scanner (push) Has been cancelled
Comprehensive website update to reflect Bold Brew 2.0 capabilities and official Project Bluefin partnership.
2025-10-13 23:14:42 +02:00
Vito Castellano
e4ee1b90ab
docs: comprehensive README update with v2.0.0 features and Project Bluefin recognition
Major documentation overhaul highlighting new capabilities and official adoption
2025-10-13 22:27:19 +02:00
Vito Castellano
f5320c1000
docs: update README with v2.0.0 features and improvements
Comprehensive README update to reflect new capabilities and improvements
2025-10-13 22:19:34 +02:00
Vito Castellano
4146504511
fix: updated security event permission
Some checks are pending
Quality / golangci-lint (push) Waiting to run
Quality / Build (push) Waiting to run
Security / Go Vulnerability Check (push) Waiting to run
Security / Security Scanner (push) Waiting to run
2025-10-13 21:41:43 +02:00
Vito Castellano
6c80585431
chore: release version 2.0.0 - Cask support and XDG compliance (#30) v2.0.0
* feat: add leaves filter to show explicitly installed packages (#25)

Add new filter [L] to display only "leaf" packages - those installed
explicitly by the user and not as dependencies of other packages.

* refactor: Migrate to Podman with OCI Containerfile and enhanced Makefile (#26)

* refactor: migrate from Docker to Podman with OCI Containerfile

Replace Docker with Podman for better security and OCI compliance.
Switch from Dockerfile to standard Containerfile format.

* chore: upgrade Go from 1.24 to 1.25

Update Go version to 1.25 to support latest goreleaser v2 and benefit from improved performance and language features.

* refactor: migrate to Podman and enhance Makefile

Replace Docker with Podman and upgrade Makefile with help system and new developer-friendly targets.

* chore: upgrade to Go 1.25 and golangci-lint v2.5.0

Update Go to 1.25 and golangci-lint to v2.5.0 for better tooling support.

* feat: add security scanning with govulncheck and gosec (#27)

Add comprehensive security scanning to the project with vulnerability checks and static analysis tools.

* feat: Add complete Casks support with unified UI (#28)

* feat(cask): add backend support for Homebrew casks

Implement complete backend infrastructure for managing Homebrew casks alongside formulae, preparing for unified UI.

* feat(cask): add complete Homebrew casks support with unified UI

Implement full backend and UI support for managing Homebrew casks alongside formulae in a unified interface.

* fix(cask): parse cask analytics correctly

Fix cask analytics not being displayed (showing 0 for all casks).

* feat(cask): add complete Homebrew casks support with unified UI

Implement full backend and UI support for managing Homebrew casks alongside formulae in a unified interface.

* fix: create copy to avoid implicit memory aliasing

* feat: implement XDG Base Directory Specification with github.com/adrg/xdg (#29)

Implement XDG Base Directory Specification using the github.com/adrg/xdg package for robust cross-platform support.
2025-10-13 21:26:18 +02:00
Vito Castellano
edae4d747e
added docker support and updated go version to the 1.24 version
Some checks failed
Quality / golangci-lint (push) Has been cancelled
Quality / Build (push) Has been cancelled
2025-06-26 17:44:43 +02:00
Vito
5546ad1b33
feat: general improvement and removed command service (#20) v1.8.0
* improved quality code and add general logic fix

* feat: removed command service
2025-06-26 15:43:26 +02:00
Vito
78eb621275
feat: added linux build support (#19)
Some checks are pending
Quality / golangci-lint (push) Waiting to run
Quality / Build (push) Waiting to run
2025-06-25 22:26:54 +02:00
Vito
f514bc3a30
feat: io service refactoring (#18)
Some checks are pending
Quality / golangci-lint (push) Waiting to run
Quality / Build (push) Waiting to run
* refactored io legend and handler

* implmented dedicated IOService

* refactored and fixed io service

* fixed quality issues

* fix general and copilot issues
2025-06-25 17:26:35 +02:00
Tarun Nahak
672d3982fd
feat(14): move formatting logic to Details ui component (#15)
Some checks failed
Quality / golangci-lint (push) Has been cancelled
Quality / Build (push) Has been cancelled
v1.7.1
* refactored move formatting logic to Details ui component

* refactored the setContent for details formatting and remove setFormula

* refactor: clean up LocalPath handling and improve details formatting
2025-06-09 22:28:54 +02:00
Vito Castellano
27a678af97
fix: updated brew descriptor
Some checks failed
Quality / golangci-lint (push) Has been cancelled
Quality / Build (push) Has been cancelled
2025-06-07 23:35:20 +02:00
Vito
a3b6b81a2c
feat(12): cache formulajson (#13)
Some checks are pending
Quality / golangci-lint (push) Waiting to run
Quality / Build (push) Waiting to run
v1.7.0
* moved update homebrew command

* refactored brew service to support formulae cache file

* fix copilot suggestion
2025-06-07 15:29:12 +02:00
Vito
14e2048105
feat: Improvements to package filtering and locally installed packages (#11)
Some checks failed
Quality / golangci-lint (push) Has been cancelled
Quality / Build (push) Has been cancelled
v1.6.0
* feat: improve locally installed filter

* feat: improved filtering outdated packages

* fix: added installed filters also in the main view
2025-06-05 00:22:29 +02:00
Vito Castellano
ef45a7b918
new blog content 2025-04-13 22:39:01 +02:00
Vito Castellano
47978a2710
added back-to-top functionality 2025-03-30 03:11:20 +02:00
Vito Castellano
63688157f9
fixed menu 2025-03-30 03:07:28 +02:00
Vito Castellano
421da9e27f
added site content generator 2025-03-30 01:05:41 +01:00
Vito Castellano
e5beb9426a
add missing breadcrumb 2025-03-29 17:05:13 +01:00
Vito Castellano
ab623b4de3
fix blog section 2025-03-29 17:01:29 +01:00
Vito Castellano
e81beacdea
add blog 2025-03-29 16:53:21 +01:00
kypkk
b9c0ab75a9
feat: filter outdated package (#9) v1.5.0
* feat: filter by update available package

* fix: variable name to Outdated packages and fix some io conditions
2025-03-16 00:23:35 +01:00
Vito Castellano
cb5708b2dc
update screenshots v1.4.0 2025-03-03 23:20:45 +01:00