feat(deps): add fish-deps unified dependency management command #17

Merged
rootiest merged 21 commits from feat/fish-deps into main 2026-05-19 03:53:52 +00:00
Owner

Summary

  • Introduces fish-deps with four subcommands: status, install, update, and sync
  • Replaces check_fish_deps (now a thin wrapper) with a full install/update system
  • Dependency catalog uses parallel arrays (_fdc_bins, _fdc_tiers, _fdc_cargo, _fdc_pm, _fdc_special) — one source of truth for all tools
  • Adds yay as a supported AUR helper alongside paru; all AUR-wrapper functions (upgrade, pkg, search, parur) fall back to yay when paru is absent
  • Demotes paru from required to recommended; paru install is gated on pacman presence (silently skipped on non-Arch systems)
  • Adds uv and cargo as managed required dependencies, listed before fish in the catalog so both are available before the fish source build
  • Builds fish from source via git clone + git tag --list 'fish-*' + uv run cargo install --path . — avoids the stale distro package and the bogus fish crate on crates.io
  • fish-deps status shows ⚠ with version string when fish < 4.0 is detected
  • fish-deps install prompts to upgrade fish when the installed version is below 4.0
  • fish-deps update prefers git+cargo source build for fish; falls back to system PM when cargo or uv are unavailable; uses uv self update for uv
  • Adds lazydocker (official curl script) and wakatime (GitHub binary download with arch detection) as managed install/update methods
  • Fixes Fish 4.x test -a/-o incompatibilities and function autoloading (one file per function)
  • Fixes fzf: drops focus/resize bind on older fzf builds
  • Fixes starship update: sh -s -- --yes correctly passes the flag to the piped script
  • README: uv and cargo added to Required table; fish upgrade path updated; dependency management section documents install method priority and uv/cargo prerequisites

Install method priority

uv (curl) → cargo (rustup) → git+cargo source build (fish only) → cargo install (other Rust tools) → system PM (paru/yay/pacman/apt/brew/…) → curl installer (starship) → git clone (fzf) → pipx (Python tools)

When multiple methods are available the user is prompted to choose; the preferred method is always option 1.

Manual Verification Checklist

  • fish-deps status — prints colored ✓/✗/⚠ output grouped into Required / Integrations / Recommended tiers
  • fish-deps status on a machine with fish < 4.0 — shows ⚠ with the current version and "upgrade to 4.0+ required"
  • check_fish_deps — still works and produces identical output (delegates to fish-deps status)
  • On a machine missing a Rust tool (e.g. bat): run fish-deps install, confirm cargo is offered as option 1 and system PM as option 2
  • On a non-Arch machine (no pacman): run fish-deps install, confirm paru is silently skipped with no prompt
  • fish-deps install on a machine with fish < 4.0 — prompts "Upgrade fish?" and offers git+cargo source build (requires uv + cargo)
  • fish-deps install when uv is missing — offers curl installer for uv first, then proceeds to fish build
  • fish-deps update — updates uv via uv self update, cargo via rustup update, fish via git+cargo source build, fzf via fzf-update, lazydocker via official script, wakatime via GitHub binary download
  • fish-deps update on a machine without uv/cargo — falls back to system PM for fish
  • fish-deps sync — installs missing deps then updates installed ones
## Summary - Introduces `fish-deps` with four subcommands: `status`, `install`, `update`, and `sync` - Replaces `check_fish_deps` (now a thin wrapper) with a full install/update system - Dependency catalog uses parallel arrays (`_fdc_bins`, `_fdc_tiers`, `_fdc_cargo`, `_fdc_pm`, `_fdc_special`) — one source of truth for all tools - Adds `yay` as a supported AUR helper alongside `paru`; all AUR-wrapper functions (`upgrade`, `pkg`, `search`, `parur`) fall back to `yay` when `paru` is absent - Demotes `paru` from required to recommended; paru install is gated on `pacman` presence (silently skipped on non-Arch systems) - Adds `uv` and `cargo` as managed required dependencies, listed before `fish` in the catalog so both are available before the fish source build - Builds fish from source via `git clone + git tag --list 'fish-*' + uv run cargo install --path .` — avoids the stale distro package and the bogus `fish` crate on crates.io - `fish-deps status` shows ⚠ with version string when fish < 4.0 is detected - `fish-deps install` prompts to upgrade fish when the installed version is below 4.0 - `fish-deps update` prefers git+cargo source build for fish; falls back to system PM when cargo or uv are unavailable; uses `uv self update` for uv - Adds `lazydocker` (official curl script) and `wakatime` (GitHub binary download with arch detection) as managed install/update methods - Fixes Fish 4.x `test -a`/`-o` incompatibilities and function autoloading (one file per function) - Fixes fzf: drops `focus/resize` bind on older fzf builds - Fixes starship update: `sh -s -- --yes` correctly passes the flag to the piped script - README: `uv` and `cargo` added to Required table; fish upgrade path updated; dependency management section documents install method priority and uv/cargo prerequisites ## Install method priority `uv` (curl) → `cargo` (rustup) → `git+cargo source build` (fish only) → `cargo install` (other Rust tools) → system PM (`paru`/`yay`/`pacman`/`apt`/`brew`/…) → curl installer (starship) → git clone (fzf) → `pipx` (Python tools) When multiple methods are available the user is prompted to choose; the preferred method is always option 1. ## Manual Verification Checklist - [x] `fish-deps status` — prints colored ✓/✗/⚠ output grouped into Required / Integrations / Recommended tiers - [x] `fish-deps status` on a machine with fish < 4.0 — shows ⚠ with the current version and "upgrade to 4.0+ required" - [x] `check_fish_deps` — still works and produces identical output (delegates to `fish-deps status`) - [x] On a machine missing a Rust tool (e.g. `bat`): run `fish-deps install`, confirm cargo is offered as option 1 and system PM as option 2 - [x] On a non-Arch machine (no `pacman`): run `fish-deps install`, confirm `paru` is silently skipped with no prompt - [x] `fish-deps install` on a machine with fish < 4.0 — prompts "Upgrade fish?" and offers git+cargo source build (requires uv + cargo) - [x] `fish-deps install` when uv is missing — offers curl installer for uv first, then proceeds to fish build - [x] `fish-deps update` — updates uv via `uv self update`, cargo via `rustup update`, fish via git+cargo source build, fzf via `fzf-update`, lazydocker via official script, wakatime via GitHub binary download - [x] `fish-deps update` on a machine without uv/cargo — falls back to system PM for fish - [x] `fish-deps sync` — installs missing deps then updates installed ones
rootiest added 17 commits 2026-05-19 03:07:11 +00:00
Older fzf (pre-0.62) does not support the focus and resize events in
bind actions, causing a startup error when --fish or the bundled
integration is sourced. Split the FZF_DEFAULT_OPTS preview block into
an if/else: newer fzf gets the dynamic bg-transform bind with wrap-word;
older fzf gets a static preview window with plain wrap and no event bind.
Introduces `fish-deps` with four subcommands:
- status: colored installed/missing report per tier (required/integrations/recommended)
- install: interactively install each missing dep, prompts method when multiple exist
- update: update all installed deps using their preferred method
- sync: install missing then update installed

Install method priority: cargo (Rust tools get latest crate) > system PM
(paru/pacman/apt/brew/pkg/dnf/yum) > git clone (fzf via fzf-update) >
curl installer (starship, fisher) > pipx (wakatime).

Splits into focused helper files:
- _fish_deps_catalog.fish: parallel-array dep catalog with tiers, cargo crates, PM names, special install keys
- _fish_deps_pm.fish: PM detection and install/upgrade helpers
- _fish_deps_status.fish: tier-grouped colored status display
- _fish_deps_install.fish: per-dep interactive install with method selection
- _fish_deps_update.fish: per-dep update using known install method

check_fish_deps becomes a thin wrapper delegating to `fish-deps status`.
README updated with Dependency Management section.
yay uses the same -S --noconfirm interface as paru. Detection priority
is paru > yay > pacman so paru is preferred when both are present.
When installing paru itself via paru-build special, yay -S paru is
offered as a method when yay is available, in addition to the
makepkg-from-source fallback.
Installed deps show a green ✓. Missing required/integration deps show
a red ✗. Missing recommended deps show a yellow ⚠ since they are
optional, distinguishing severity at a glance.
paru is an AUR helper only available on Arch-based distros and is not
required for the config to function. Moved to recommended tier alongside
yay. README updated accordingly.
upgrade, pkg, search, and parur now detect paru first, then yay, and
print a clear error if neither is installed. Removes the hard dependency
on paru specifically across all AUR-wrapper functions.
Split _fish_deps_pm.fish into one file per function so Fish can
autoload each by name (_fish_deps_detect_pm, _fish_deps_pm_install,
_fish_deps_pm_upgrade). A single file with multiple functions only
autoloads under the filename, leaving the others unreachable.

Replace all `test -a`/`test -o` binary operators with `; and`/`; or`
chains throughout _fish_deps_install and _fish_deps_update. Fish 4.x
removed support for -a/-o in test, causing the "unexpected argument"
errors seen on Debian.

Also consolidate paru/yay cases in pm_install and pm_upgrade since
both helpers use identical flags.
Catalog: clear paru's pm and special install entries so it appears in
status but fish-deps install skips it (it's a package manager, not a
managed dep).

Install: cargo is now always attempted first for Rust tools. When cargo
is absent but a crate exists, a note is printed suggesting rustup.
When only one method is available the chosen method is shown so the user
can see whether cargo or the system PM is being used. Method prompt now
shows the default label inline for clarity.

Removed dead paru-build switch case from the install executor.
On Arch-based systems (pacman present), paru-build offers yay or
makepkg as install methods. On non-Arch systems neither pacman nor yay
exist, so no methods are built and the dep is silently skipped — no
prompt shown to the user.
cargo is now the second entry in the catalog (after fish) so it is
installed before any Rust tool that depends on it. Install preference:
rustup installer (curl | sh) first, system PM as fallback. Update
runs rustup update when rustup is available.

The rustup-installer special is evaluated before the system PM in the
method list so it is always option 1 / the default for cargo.
Fish 4.x is a Rust rewrite published to crates.io as 'fish'. Added the
crate to the catalog so fish-deps update will run cargo install --force
fish to upgrade it. A yellow restart reminder is printed after the
upgrade since the new binary won't take effect until the shell restarts.

README warning updated to mention cargo install fish as the upgrade
path for users stuck on Fish 3.x.
After the rustup installer runs, add the cargo bin dir to PATH in the
current session so subsequent installs in the same fish-deps run can
find cargo without a shell restart. Checks CARGO_HOME/bin first (set
in config.fish), then falls back to the rustup default ~/.cargo/bin.
Warns the user if cargo still isn't detectable after the path update.
lazydocker: prefer the official install_update_linux.sh curl script over
system PM. The same script handles updates, so fish-deps update re-runs it.

wakatime: replace pipx with a direct binary download from github releases.
Detects architecture (amd64/arm64/arm) via uname -m, downloads the zip,
extracts the binary to ~/.config/wakatime/wakatime, chmods it, and
symlinks it to ~/.local/bin/wakatime. fish-deps update re-downloads and
replaces the binary in place.

Both new specials are added to the preferred-method block so they appear
before the system PM and are the default when prompted.
rootiest added 1 commit 2026-05-19 03:17:58 +00:00
fish-deps status now shows ⚠ with the current version when fish < 4.0.
fish-deps install prompts to upgrade fish when the installed version is
below 4.0, using the same install methods (cargo/PM) and printing a
restart reminder on success.
rootiest added 1 commit 2026-05-19 03:29:59 +00:00
Adds a git-cargo-fish install method that clones fish-shell, checks out
the latest tag, and runs `uv run --no-managed-python cargo install --path .`.
This is offered first in `fish-deps install` (requires cargo + uv) and
used automatically by `fish-deps update`, falling back to the system PM
when cargo or uv are absent.

Removes the stale `cargo install fish` README note (that crate is a
library, not the shell binary).
rootiest added 1 commit 2026-05-19 03:34:54 +00:00
uv is now listed first in the catalog (before cargo and fish) so it is
installed automatically before the fish source build is attempted.
Install uses the official curl script; update uses `uv self update`.

Catalog order is now: uv → cargo → fish → … ensuring prerequisites are
in place before any dependent install method runs.

README updated: uv and cargo added to the Required table, warning callout
and dependency management note reflect the automatic install flow.
rootiest added 1 commit 2026-05-19 03:46:40 +00:00
git tag --list 'fish-*' replaces for-each-ref so old pre-Rust tags like
pre_whitespace_fix (which have no Cargo.toml) are never selected.

starship update: sh -s -- --yes correctly passes --yes to the piped
install script instead of treating it as a filename for sh to open.
rootiest merged commit 0e766b3326 into main 2026-05-19 03:53:52 +00:00
rootiest deleted branch feat/fish-deps 2026-05-19 03:53:52 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: rootiest/fish-config#17