The update-packages.sh script automates updating custom packages in the pkgs/ directory.
- Automatically detects package type (Go, NPM, Python)
- Creates backup git commits before updates
- Updates package versions and hashes automatically
- Supports updating all packages or specific ones
- Easy rollback with git
# List all available packages
nix run .#update-packages -- --list
# Update all packages
nix run .#update-packages
# Update a specific package
nix run .#update-packages -- opencode
# Update without creating backup commit
nix run .#update-packages -- --no-commit claude-code
# Show help
nix run .#update-packages -- --help# Enter dev shell for required tools
nix develop
# List all available packages
./update-packages.sh --list
# Update all packages
./update-packages.sh
# Update a specific package
./update-packages.sh opencode
# Update without creating backup commit
./update-packages.sh --no-commit claude-code
# Show help
./update-packages.sh --help- Go packages: Fetches latest GitHub release/tag, updates version and hash
- NPM packages: Gets latest version from npm registry, updates package-lock.json if present
- Python packages: Uses nix-update for unstable packages, or GitHub releases for others
# Revert all uncommitted changes
git reset --hard HEAD
# Revert to backup commit
git reset --hard HEAD~1Edit update-packages.sh and add a new update function following the existing patterns.