Architecture
Architecture
Quiver is a single-crate Rust CLI. The codebase is intentionally split into focused modules under src/.
High-level flow
nupackage.toml
-> resolver
-> installer
-> .nu-env/modules
-> quiver.lockAt install time, the flow is:
- Parse
nupackage.toml. - Resolve module and plugin dependencies to exact commits.
- Fetch repository data and release assets as needed.
- Materialize modules into
.nu-env/modules/or the global modules directory. - Compute deterministic SHA-256 checksums.
- Write
quiver.lockorconfig.lock.
Source modules
main.rs: dispatches CLI subcommandscli.rs: clap-based command definitionsmanifest.rs: manifest parsing and validationlockfile.rs: lockfile parsing and serializationresolver.rs: dependency resolution and conflict detectioninstaller.rs: install/update orchestration, plugin fetch/build flow,.nu-envgenerationgit.rs: git fetch, clone, ref, and export behaviorchecksum.rs: directory hashingconfig.rs: global configuration and install path helpersnu.rs: Nushell version requirement parsingerror.rs: shared error types
Runtime paths
- Git cache:
~/.local/share/quiver/installs/git/ - Shared plugins:
~/.local/share/quiver/installs/plugins/ - Shared Nushell versions:
~/.local/share/quiver/installs/nu_versions/ - Project modules:
.nu-env/modules/ - Global modules: platform config dir under
nushell/vendor/quiver/modules/
Design constraints
- Dependencies are git-based rather than registry-based.
- Conflicting dependency resolutions are treated as errors.
- Lockfiles pin commits and checksums for reproducibility.
- Standard user-facing output goes to stderr, leaving stdout available for structured output and generated hooks.