Skip to content

nicoulaj/broom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NAME

broom - a disk cleaning utility for developers

SYNOPSIS

broom [option...] [directory]

DESCRIPTION

broom recursively looks for projects inside a directory and cleans them by removing build artifacts (eg: by invoking "make clean"), optimizing version control system files (eg: by invoking "git gc"), etc.

OPTIONS

-n, --dry-run

Only show commands that would be executed instead of actually performing them.

-t TOOLS, --tools=TOOLS

Comma-separated list of tools to run the cleanup for. The available tools are: make, rake, python, ant, mvn, gradle, buildr, sbt, ninja, scons, waf, rant, git, bundle, vagrant , cargo and makepkg. By default, all tools are used.

-v, --verbose

Be more verbose. Pass this option several times to see debug info.

-s, --stats

Print disk space gained.

--noconfirm

Do not ask for confirmation before performing actions that may result in potential data loss (eg: destroying Vagrant boxes).

-q, --quiet

Be less verbose. Pass this option several times to remove all output.

-h, --help

Show usage information and exit.

--version

Show version information and exit.

EXAMPLES

To perform cleanup in the current working directory:

broom

To perform cleanup in your projects folder:

broom ~/projects

To perform cleanup in your projects folder, with all logging on:

broom -vvv ~/projects

To show what commands would be performed, without running them:

broom -n ~/projects

To perform cleanup only for git and make projects:

broom -t git,make ~/projects

FILES

broom allows to define default execution parameters in the ~/.broomrc file. Here is an example of ~/.broomrc file:

# Use dry run mode by default.
DRY_RUN=true

# Only show warnings and errors.
LOG_LEVEL=0

# Show statistics.
STATS=true

# Run in projects directory.
DIRECTORY=~/projects

# Only look for some specific kind of projects.
TOOLS=(make python ant git)

INSTALLING

Using packages

System Installation instructions
Debian / Ubuntu broom repository
Fedora / CentOS / RHEL / Scientific Linux broom repository
OpenSUSE / SLE broom repository
Arch Linux AUR
Building from sources

git clone https://github.com/nicoulaj/broom.git
cd broom
make
sudo make install