🔨 Building

Two ways to build — standard Go or a fully static Docker binary

🐹 Go Build standard

Requires Go 1.21+. Produces a native binary for your platform in seconds. Best for local development.

🐳 Docker Build static

No Go required. Produces a fully static Linux/amd64 binary with no libc dependency. Runs anywhere.

🐹 Standard Build
Requirement: Go 1.21 or later. Check with go version.
build from source
# clone the repo
$ git clone https://github.com/binRick/pal && cd pal

# build
$ go build -o pal .

# install to PATH
$ sudo mv pal /usr/local/bin/

# verify
$ pal -h
optimized build (smaller binary)
$ go build -trimpath -ldflags="-s -w" -o pal .
~2.5 MB (palettes embedded)
🐳 Static Binary via Docker
No Go required. Uses golang:1.21-alpine image with CGO_ENABLED=0. The output binary has zero dynamic library dependencies.
build.sh
$ ./build.sh
🐳 Building static pal binary via Docker...
✅ Built: /path/to/pal/pal
   Size:  2.5M
pal: ELF 64-bit LSB executable, x86-64, statically linked
build.sh source
#!/usr/bin/env bash
set -euo pipefail

docker run --rm \
  -v "$(pwd)":/src \
  -w /src \
  -e CGO_ENABLED=0 \
  -e GOOS=linux \
  -e GOARCH=amd64 \
  golang:1.21-alpine \
  go build \
    -trimpath \
    -ldflags="-s -w -extldflags=-static" \
    -o pal .
📁 Project Structure
pal/
├── main.go CLI — parse, apply, export, embed
├── go.mod module: github.com/binRick/pal
├── build.sh Docker static build script
├── docs/
│ ├── banner.svg hero banner
│ ├── demo.svg terminal demo
│ └── palettes.svg palette showcase grid
└── palettes/
├── paleta/ 169 themes (19-line hex format)
└── kfc/dark/ 251 themes (key=value format)
📊 Environment
VariableValueEffect
CGO_ENABLED0Disable cgo — required for fully static binary
GOOSlinux / darwin / windowsTarget OS
GOARCHamd64 / arm64Target architecture
✅ Verification
confirm it works
$ pal list | wc -l
420

$ pal list | grep dracula
base16-dracula
dracula-dark

$ pal dracula-dark && echo "applied"
applied

# check static linking (Linux)
$ file pal
pal: ELF 64-bit LSB executable, x86-64, statically linked, stripped