Skip to content
Merged
10 changes: 7 additions & 3 deletions crates/toride-apps/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,13 @@ manifest.
manager argv from a registry `App` plus a host `Target` — no I/O,
fixture-testable.
- The `Backend` trait with executed implementations for Homebrew,
Flatpak, distro managers (apt, dnf, pacman, apk), npm, cargo, pipx,
uv, mise-delegated tools, and direct downloads — install, uninstall,
update, status, version queries, and pinning.
Flatpak, snap, distro managers (apt, dnf, pacman, apk), npm, cargo,
pipx, uv, mise-delegated tools, and direct downloads: install,
uninstall, update, status, and version queries. Pinning is
Homebrew-only; the trait default refuses it for every other backend.
Snap has no registry `InstallMethod` routing to it yet: its
install/remove/refresh plans are built at the operation seam, and
records carry the snap name for uninstall and update replay.
- The `Apps` facade: ensure-installed (optionally at a version) and
uninstall, each with a per-item batch verb
(`ensure_installed_many` / `uninstall_many`), update with dry-run,
Expand Down
313 changes: 297 additions & 16 deletions crates/toride-apps/src/apps.rs

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions crates/toride-apps/src/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ pub enum BackendId {
Homebrew,
/// Linux Flatpak — remotes and refs (`flatpak`).
Flatpak,
/// Linux Snap packages, through snapd (`snap`).
Snap,
/// A distro's native package manager, selected by family (`apt`, `dnf`,
/// `pacman`, `apk`).
Distro(DistroFamily),
Expand All @@ -72,6 +74,7 @@ impl std::fmt::Display for BackendId {
match self {
Self::Homebrew => f.write_str("homebrew"),
Self::Flatpak => f.write_str("flatpak"),
Self::Snap => f.write_str("snap"),
// Families render lowercase (`distro-debian`); the wildcard keeps
// future families displayable without touching this crate.
Self::Distro(family) => {
Expand Down
2 changes: 2 additions & 0 deletions crates/toride-apps/src/backends/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ pub mod homebrew;
pub mod mise;
pub mod npm;
pub mod pipx;
pub mod snap;
pub mod uv;

pub use cargo::CargoBackend;
Expand All @@ -28,4 +29,5 @@ pub use homebrew::HomebrewBackend;
pub use mise::MiseBackend;
pub use npm::NpmBackend;
pub use pipx::PipxBackend;
pub use snap::SnapBackend;
pub use uv::UvBackend;
Loading
Loading