feat: extract bundled Nushell plugins by default in setup nu - #133
feat: extract bundled Nushell plugins by default in setup nu#133kiro-agent[bot] wants to merge 5 commits into
Conversation
Change default behavior of `numan setup nu` to extract the full release archive (nu + all bundled plugins) into tools/nushell/<version>/. The 512 MiB cap is already sufficient for the ~279 MiB archives. Add `--minimal` flag to restore the old behavior (extract only the nu binary, skip plugins). After extraction in full mode, scan the version directory for nu_plugin_* binaries and write lockfile entries with origin "bundled:nu". These plugins become discoverable and activatable via `numan activate` without requiring a registry install flow. Update `numan list` to display "(bundled with Nu)" tag for entries with origin "bundled:nu", matching the existing nupm import tag pattern. Key changes: - src/state/lockfile.rs: add BUNDLED_NU_ORIGIN constant - src/cmd/setup.rs: add --minimal flag to NuSetupArgs - src/nu/bootstrap.rs: conditional extract config, copy all extracted files, discover_bundled_plugins function, thread minimal through install chain - src/cmd/list.rs: bundled origin tag display - tests: unit and integration coverage for both modes
…om version dir Address review feedback for bundled plugin extraction: 1. discover_bundled_plugins now skips entries that already exist with a non-bundled origin, preserving user registry installs over automatic bundled extraction. Existing bundled entries are still updated. 2. copy_extracted_files now only copies files matching the nu_plugin_* prefix, keeping the version directory clean (no README, LICENSE, etc.). 3. Added tests: collision with registry entry is skipped, collision with existing bundled entry is updated, and non-plugin archive files are excluded from the version directory.
|
User kiro-agent[bot] does not have write permissions |
1 similar comment
|
User kiro-agent[bot] does not have write permissions |
|
/oc review |
|
I've completed a thorough review of PR #133. Here is my analysis. Review: PR #133 — Extract bundled Nushell plugins by default in
|
|
/oc fix |
|
fatal: could not read Username for 'https://github.com': No such device or address |
Co-authored-by: tonythethompson <tonythethompson@users.noreply.github.com>

Summary
Changes
numan setup nuto extract the full official Nushell release archive (nu + all bundled plugins like polars, query, formats, gstat, inc) instead of filtering to just thenubinary.Background
PR #101 added an include filter to skip bundled plugins because the 279 MiB uncompressed archive tripped the old 256 MiB bomb cap. The cap was raised to 512 MiB (sufficient), but the include filter remained — leaving a UX gap where users expect the same plugins they'd get from a manual Nushell install.
Changes
numan setup nunow extracts everything intotools/nushell/<version>/--minimalflag: Escape hatch that restores the old nu-binary-only behavior for users who want lean installsdiscover_bundled_plugins()scans fornu_plugin_*binaries, computes SHA256, and writes lockfile entries withorigin: "bundled:nu"numan listshows(bundled with Nu)tag for these entriespayload_path + executable_pathresolution — no changes needed to activateCollision safety
If a plugin already exists in the lockfile from a registry install (non-bundled origin), the discovery pass skips it rather than overwriting.
Files changed
src/state/lockfile.rs—BUNDLED_NU_ORIGINconstantsrc/cmd/setup.rs—--minimalflag threadingsrc/nu/bootstrap.rs— conditional extract,copy_extracted_files,discover_bundled_pluginssrc/cmd/list.rs— display tagsrc/cmd/nu_pin_offer.rs— constructor updatetests/setup_nu_test.rs— 5 new integration testsVerification
cargo clippy -- -D warningscleancargo fmt --checkcleanNon-blocking follow-ups
write_active_versionanddiscover_bundled_plugins