modelshelf 0.1.0

A shared local LLM model registry: discover, deduplicate, download, and update models across desktop apps.
Documentation
//! modelshelf — a shared local LLM model registry.
//!
//! modelshelf lets desktop applications cooperate around a single on-disk
//! convention (the "shelf"): a JSON registry of every local LLM model, a
//! content-addressed shared store, and advisory file locks. No daemon.
//!
//! See `docs/SPEC.md` in the repository for the on-disk convention that this
//! crate implements.

#![deny(missing_docs)]

pub mod catalog;
pub mod dedup;
pub mod download;
pub mod error;
pub mod gguf;
pub mod hw;
pub mod identity;
pub mod paths;
pub mod recommend;
pub mod registry;
pub mod scan;
pub mod shelf;
pub mod store;
pub(crate) mod time_util;
pub mod update;

pub use catalog::{Catalog, CatalogEntry, CatalogOrigin};
pub use dedup::{DedupOptions, DedupPlan, DedupReport, LinkStrategy, UndoReport};
pub use download::Progress;
pub use error::{Error, ErrorKind, Result};
pub use hw::{Gpu, Hardware};
pub use paths::ShelfPaths;
pub use recommend::{
    Backend, InstalledRef, RecommendReport, Recommendation, Upgrade, RECOMMEND_APP_ID,
};
pub use registry::{
    AppRef, Ecosystem, GgufMeta, Location, LocationRole, ModelEntry, ModelId, Registry, Source,
};
pub use scan::ScanEnv;
pub use shelf::{
    DupGroup, GcReport, HashMode, ModelQuery, ModelSpec, OpenOptions, ProvisionOutcome,
    PullOptions, RecommendOptions, RemoveOutcome, ScanOptions, ScanReport, Shelf, SkippedFile,
};
pub use update::{UpdateInfo, UpdateOptions, UpdateReport};

/// Returns the version of the modelshelf library.
pub fn version() -> &'static str {
    env!("CARGO_PKG_VERSION")
}

#[cfg(test)]
mod tests {
    #[test]
    fn version_is_nonempty() {
        assert!(!super::version().is_empty());
    }
}