{"id":15681692,"url":"https://github.com/dchakro/brewlog","last_synced_at":"2025-05-07T09:42:58.799Z","repository":{"id":184280566,"uuid":"284806802","full_name":"dchakro/brewlog","owner":"dchakro","description":"Run homebrew commands while simultanously logging to a file","archived":false,"fork":false,"pushed_at":"2024-08-12T18:47:02.000Z","size":51,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-19T20:53:56.828Z","etag":null,"topics":["homebrew","logging"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dchakro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-03T21:03:29.000Z","updated_at":"2024-08-12T18:44:14.000Z","dependencies_parsed_at":"2024-06-17T18:47:17.400Z","dependency_job_id":"c638e40c-7726-4090-8979-c0fe3b42097a","html_url":"https://github.com/dchakro/brewlog","commit_stats":null,"previous_names":["dchakro/brewlog"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dchakro%2Fbrewlog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dchakro%2Fbrewlog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dchakro%2Fbrewlog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dchakro%2Fbrewlog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dchakro","download_url":"https://codeload.github.com/dchakro/brewlog/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252852593,"owners_count":21814385,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["homebrew","logging"],"created_at":"2024-10-03T16:58:40.744Z","updated_at":"2025-05-07T09:42:58.778Z","avatar_url":"https://github.com/dchakro.png","language":"Shell","funding_links":["https://paypal.me/robocopAlpha"],"categories":[],"sub_categories":[],"readme":"[![GitHub license](https://img.shields.io/github/license/dchakro/brewlog)](https://github.com/dchakro/brewlog/blob/master/LICENSE)\n[![GitHub issues](https://img.shields.io/github/issues/dchakro/brewlog)](https://github.com/dchakro/brewlog/issues)\n[![GitHub last commit (branch)](https://img.shields.io/github/last-commit/dchakro/brewlog/master.svg)](https://github.com/dchakro/brewlog/branches)\n[![Bash](https://img.shields.io/badge/Made%20with-Bash-blueviolet)](https://www.gnu.org/software/bash/)\n\n# brewlog\n\n### Why?\n\nI wrote [ `brewlog`](https://github.com/dchakro/brewlog/) to patch a minor but IMHO a significant shortcoming I feel [homebrew](https://brew.sh/) has had for a very long time; and that is the ability to log what homebrew does, more specifically maintain a log of user-executed `brew` activity. IMO it didn't have to be something very sophisticated i.e. integration with system-log, etc.. So, I worked on an idea I found about from [this particular issue](https://github.com/Homebrew/legacy-homebrew/issues/10430) and developed `brewlog`. \n\n\n\n### Why bother with a log file, when brew is so stable?\n\nYes, `brew` is generally very stable, but occasionally it breaks compatibility when it is upgrading some packages and removes some “obsolete” versions. Generally this is fine, but in certain cases the user wants to retain those packages for compatibility with something else. I recently faced [a problem](https://github.com/brewsci/homebrew-base/issues/29) due to this. While `brewlog` can’t prevent something like this from happening, but it logs `brew` activity so it is much easier to troubleshoot (by identifying what package(s) were added/removed).\n\n\n\n### What can `brewlog` do ?\n\n`brewlog` is simple solution that can:\n\n+ `log` [`brew`](https://brew.sh/) activity (`STDOUT` and `STDERR`) to a logfile (default: `~/Logs/brew.log`)\n  + because brewlog is a a new command (and not an alias), the user still retains the freedom to run `brew [command] [formula]` in case they do not want to log some brew activity.\n+ `tail` the `brew.log` file to display selected number of lines.\n+ `archive` the brew.log file (user has to explicitly invoke this command to archive).\n  + The `brew.log` is removed during archiving, a new log file is created on the next run of `brewlog`.\n\nNow you're easily able to track the changes made to your system while running `brew upgrade`or `brew cleanup`.\n\n\n\n### How to use\n\n#### a) Install from source\n\nThe script [`install.sh`](https://github.com/dchakro/brewlog/blob/master/install.sh) automatically picks the place to install brewlog by detecting the location where the `brew` binary is placed in your system `$PATH`.\n\n```sh\n# Install\ncurl -sSL 'https://raw.githubusercontent.com/dchakro/brewlog/master/install.sh' | bash\n# Show help\nbrewlog --help\n```\n\n#### b) Install from binary\n\n1. Download the binary from the [latest release](https://github.com/dchakro/brewlog/releases/latest) (should run on *nix with a [homebrew](https://brew.sh/) installation).\n2. `mv brewlog /usr/local/bin/brewlog` or to some other place that is in your `$PATH`.\n3. Familiarize yourself by running `brewlog —help`.\n\n#### c) Install from source with modifications\n\n```sh\n# download\ncurl -OJL 'https://raw.githubusercontent.com/dchakro/brewlog/master/install.sh'\n# Review/Modify code\nbat install.sh\nnano install.sh\n# Install\nsh install.sh | bash\n# Show help\nbrewlog --help\n```\n\n\n\n#### Examples using brewlog\n\n```sh\n# Running homebrew commands\nbrewlog install ffmpeg\nbrewlog info ffmpeg\nbrewlog outdated\n\n# Tail the log file\nbrewlog tail\nbrewlog tail -n 5\n\n# archive the current log file\nbrewlog archive\n\n# Even complex brew commands work with brewlog\nbrewlog list --multiple --versions\nbrew deps ffmpeg | xargs brewlog uninstall ----ignore-dependencies\n\n# Writing package and cask dependency tree\nbrewlog tree                                                                                  \npackage and cask dependency tree updated. Find it here: ~/Logs/brew_tree.txt\n```\n\n\n\n### `brewlog —help` listing parameters and examples:\n\n```\nbrewlog - allows you to log your homebrew/linuxbrew operations to a file.\nUsage:\n   brewlog [brew command] [arguments to homebrew]\ne.g.\n   brewlog install ffmpeg, invokes \"brew install ffmpeg\" and writes output to a log file.\n\nOPTIONS:\n    --help         Show help\n    --brew-help    Show brew commands (alias to \"brew help\")\n    version        Show brewlog version info\n    tree           Write the dependency tree of all installed packages \u0026 casks to a file\n    archive        Archives the current log file as .xz (gzip as fallback if xz not found)\n    find [TERM]\t   grep the TERM in the logfile.\n    tail [-n INT]  Show the last \"INT\" lines from the log file.\n                                  (default: last 15 lines)\n\nHomebrew/Linuxbrew Function examples:\n  brewlog install [formula]     \t\tInstall formula\n  brewlog uninstall [formula]   \t\tUninstall formula\n  brewlog deps [formula]        \t\tShow dependencies for [formula]\n  brewlog uses --installed [formula]    Show items listing [formula] as a dependency\n  brewlog outdated              \t\tShow outdated formulae\n  brewlog upgrade [formula]     \t\tUpgrade all (or entered) brew formula\n  ... ... ...\n     Find out more homebrew commands by running \"brew --help\".\n```\n\nIf you found `brewlog` useful consider adding a star ‘✩' to this repo.\n\n[![PayPal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://paypal.me/robocopAlpha) \n\n### Notice about the command `brew log`:\n\n+ Not to be confused with `brew log` which shows the commit history (similar to `git log`). \n+ I'm open to a new name, but for now as I personally don’t use `brew log`, I had no “merge conflicts” in my brain while assigning  `brewlog` to achive my desired result of logging brew output :) [*IMHO* `brew history` *might have been a better name for* `brew log`]\n\n\n\n© Deepankar Chakroborty, 2020. All rights reserved. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdchakro%2Fbrewlog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdchakro%2Fbrewlog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdchakro%2Fbrewlog/lists"}