self-update
Update the Mithrandir CLI from git.
Usage
sh
mithrandir self-updateDescription
Updates the CLI to the latest version by:
- Checking git repository status
- Fetching and pulling latest changes
- Installing dependencies (
bun install) - Rebuilding the CLI (
bun run build) - Verifying the
/usr/local/bin/mithrandirsymlink
Notes
- Requires root privileges
- Handles sudo context correctly (uses
SUDO_USERfor git and bun operations) - Re-creates the symlink if missing