Build from Source

Clone the repository and build Shrinkr locally.

Build from Source

Requirements

  • macOS (Apple Silicon or Intel — Intel builds run via Rosetta 2)
  • Go 1.21+
  • libvips (installed via Homebrew)

Steps

# Clone
git clone https://github.com/idrewlong/shrinkr_cli
cd shrinkr_cli

# Install libvips dependency
brew install vips

# Build binary in current directory
make build

# Or install globally to $GOPATH/bin
make install

The Makefile targets:

TargetCommandDescription
buildmake buildBuilds ./shrinkr binary in the project directory
installmake installRuns go install . — installs to $GOPATH/bin
cleanmake cleanRemoves the ./shrinkr binary and dist/ folder
runmake runRuns go run . ../images for local testing