Expand description
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.
Re-exports§
pub use catalog::Catalog;pub use catalog::CatalogEntry;pub use catalog::CatalogOrigin;pub use dedup::DedupOptions;pub use dedup::DedupPlan;pub use dedup::DedupReport;pub use dedup::LinkStrategy;pub use dedup::UndoReport;pub use download::Progress;pub use error::Error;pub use error::ErrorKind;pub use error::Result;pub use hw::Gpu;pub use hw::Hardware;pub use paths::ShelfPaths;pub use recommend::Backend;pub use recommend::InstalledRef;pub use recommend::RecommendReport;pub use recommend::Recommendation;pub use recommend::Upgrade;pub use recommend::RECOMMEND_APP_ID;pub use registry::AppRef;pub use registry::Ecosystem;pub use registry::GgufMeta;pub use registry::Location;pub use registry::LocationRole;pub use registry::ModelEntry;pub use registry::ModelId;pub use registry::Registry;pub use registry::Source;pub use scan::ScanEnv;pub use shelf::DupGroup;pub use shelf::GcReport;pub use shelf::HashMode;pub use shelf::ModelQuery;pub use shelf::ModelSpec;pub use shelf::OpenOptions;pub use shelf::ProvisionOutcome;pub use shelf::PullOptions;pub use shelf::RecommendOptions;pub use shelf::RemoveOutcome;pub use shelf::ScanOptions;pub use shelf::ScanReport;pub use shelf::Shelf;pub use shelf::SkippedFile;pub use update::UpdateInfo;pub use update::UpdateOptions;pub use update::UpdateReport;
Modules§
- catalog
- The live model catalog behind recommendations.
- dedup
- Deduplication: replace redundant model copies with hardlinks to the canonical store blob.
- download
- Model acquisition: Hugging Face Hub client with resumable, verified downloads.
- error
- Error types with stable, FFI-friendly discriminant codes.
- gguf
- Minimal GGUF header/metadata reader.
- hw
- Hardware detection for model recommendations.
- identity
- Content-based model identity: full hashing, quick fingerprints, and a stat-keyed cache that avoids re-hashing unchanged multi-gigabyte files.
- paths
- Shelf home resolution and the standard directory layout.
- recommend
- Hardware-aware model recommendation.
- registry
- The registry: loading, saving, and safely mutating
registry.json. - scan
- Ecosystem scanners: find every local LLM model file on the machine.
- shelf
- The
Shelf: the main entry point of the SDK. - store
- The shared content-addressed blob store (
<home>/blobs/sha256-<hex>). - update
- Update checks: compare local content hashes against the current state of each model’s Hugging Face source — without downloading anything.
Functions§
- version
- Returns the version of the modelshelf library.