Skip to content

jstreitb/baa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

29 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ‘ BAA πŸ‘

The universal Linux package manager updater.

One command. One password. Every package manager updated.


Important

YOU HAVE TO UPDATE MANUALLY! I broke the update script, so you have to update manually this update. In this version it's functioning again. Sorry!


Important

Shepherd is now BAA! The project has been renamed. Please update your software to the latest version: all commands now start with baa instead of shepherd.


Release License Go Stars


demo

Quick Install

curl -sSfL https://raw.githubusercontent.com/jstreitb/baa/main/install.sh | bash

Security Note: You can verify the installer script before running it by downloading it first, reading it, or checking its checksum against the release assets.

To update BAA itself to the latest version, simply run:

baa --update

To uninstall BAA from your system, run:

baa --uninstall

Or build from source:

git clone https://github.com/jstreitb/baa.git
cd baa && make build
sudo mv baa /usr/local/bin/

How It Works

$ baa
  1. Detects installed package managers automatically
  2. Asks for your sudo password once (masked, secure)
  3. Updates everything sequentially with a live animated TUI
  4. Shows a summary of what succeeded and failed

That's it. No config files, no complicated setup.

Command-Line Flags

Flag Description
--update Updates baa to the latest version
--uninstall Uninstalls baa from your system
--credits Shows the credits and exit
--version Prints the current version
--help Shows the help message

Supported Package Managers

Manager Detected via Sudo Non-Interactive Flags
apt apt-get βœ“ DEBIAN_FRONTEND=noninteractive, --force-confold
pacman pacman βœ“ --noconfirm
flatpak flatpak βœ— -y --noninteractive
snap snap βœ“ β€”

Adding a new manager? It's a single file. See CONTRIBUTING.md.

Features

πŸ” Auto-Detection

Probes $PATH for every supported package manager β€” no configuration needed.

πŸ”’ Secure by Design

Password stored as []byte, zeroed after use, delivered via stdin pipe. Never appears in process args or logs.

πŸ€– Fully Autonomous

Non-interactive flags handle everything. No "Press Y to continue" interruptions.

πŸ›Ÿ Interactive Fallback

If a manager needs user input (e.g. a dpkg config prompt), BAA suspends the TUI and drops you into the raw terminal. Resume is automatic.

🎨 Beautiful TUI

Catppuccin Macchiato theme, ASCII sheep animation, live command output, styled summary screen.

⚑ Fast & Lightweight

Single static binary. No runtime dependencies. ~3 MB.

Security

BAA takes security seriously:

Measure Implementation
Password storage []byte β€” never a Go string
Memory cleanup Explicit zeroing with for i := range pw { pw[i] = 0 }
Password delivery Piped via stdin to sudo -S
Process args Password never appears in CLI arguments
Environment Env vars passed through sudo -- env to reach child processes
Goroutine copies Each copy is independently zeroed after use

Architecture

baa/
β”œβ”€β”€ cmd/baa/main.go           # Entry point
β”œβ”€β”€ internal/
β”‚   β”œβ”€β”€ ui/                        # Bubbletea TUI (model, views, styles, components)
β”‚   β”œβ”€β”€ pkgmanager/                # PackageManager interface + implementations
β”‚   └── utils/                     # Secure sudo execution, error sanitization
β”œβ”€β”€ install.sh                     # One-line installer
β”œβ”€β”€ .goreleaser.yml                # Release automation
└── Makefile

Built with the Charmbracelet ecosystem:

πŸ‘ The Flock

BAA is a community-driven project. A huge thank you to the amazing people who help guide the herd!




Contributing

Contributions are welcome! Please read the Contributing Guide before getting started.

AI Assistance

"If you can't beat them, join them."

This project was architected and developed with the support of AI Assistance.

License

MIT β€” go build something great.




Made with πŸ‘ by jstreitb and the flock.