50 Commits

Author SHA1 Message Date
Jesús Pérez
2b3e574e3d # Summary
fix: help system integration, build process optimization, and plugin rebuild efficiency

## Detailed Description

This commit addresses critical issues in the help system discoverability, build process robustness, and plugin rebuild efficiency.

### 1. Help System Integration (New Feature)

**Issue**: Version-update module recipes were not discoverable
- Not shown in `just help modules`
- Not referenced in `just help`
- Not included in help navigation system
- Users had to manually run `just --list` to find update commands

**Solution**:
- Added version-update module to all help outputs
- Updated `justfiles/help.just` to document all 30+ version-update recipes
- Created new `just commands` recipe as discoverable alias for `just --list`
- Integrated version-update into help-all workflow

**Impact**:
- Version-update commands now fully discoverable via help system
- Users can find update commands with: `just help modules`, `just help`, `just commands`
- Improved overall help system navigation

**Files Modified**:
- `justfiles/help.just` (+23 lines)
  - Added version-update module to help sections
  - Added to modules list
  - Added to help-all workflow
  - New `commands` recipe showing all recipes by group

### 2. Build Process Fixes (Phase 3: Bin Archives)

#### 2a. Plugin Archive Collection Bug

**Issue**: "No plugins found to package" warning in Phase 3
- Collected 26 plugin binaries but reported 0
- Archive creation skipped because count was wrong

**Root Cause**: `each` command returns null, so `| length` returned 0
```nushell
#  OLD - each returns null
let plugin_count = (ls nu_plugin_*/target/release/nu_plugin_* | each {|p|
    cp $p.name $"($temp_dir)/"
} | length)  # Returns 0!
```

**Solution**: Separated counting from copying with proper filtering
```nushell
#  NEW - count before operations
let plugins_to_copy = (ls nu_plugin_*/target/release/nu_plugin_* | where type == "file")
let plugin_count = ($plugins_to_copy | length)
```

**Impact**:
- Now correctly collects and reports 26 plugins
- Filters out .d dependency files automatically
- Warning eliminated

#### 2b. Tar Archive Path Handling

**Issue**: Tar command failing silently with relative paths in subshell
- `cd $temp_dir` changes context unpredictably
- Relative path `../$archive_name` fails in subshell
- Archive file not created despite exit code 0

**Root Cause**: Shell context and relative path issues in Nushell `do` block

**Solution**: Used `tar -C` with absolute paths instead of `cd`
```nushell
#  OLD - unreliable context switching
do {
    cd $temp_dir
    tar -czf ../$archive_name .
}

#  NEW - absolute paths, no context switching
tar -C $temp_dir -czf $archive_path .
```

**Additional Improvements**:
- Absolute path construction using `pwd | path join`
- Better error diagnostics with exit code and stderr output
- File verification after creation

**Impact**:
- Tar archives now created successfully
- Robust path handling across platforms
- Clear error messages for debugging

#### 2c. File Size Calculation Type Error

**Issue**: Runtime error when calculating archive size
```
Error: The '/' operator does not work on values of type 'list<filesize>'
```

**Root Cause**: `ls` returns list of records, so `.size` was a list
```nushell
#  OLD - returns list<filesize>
(ls $archive_path).size / 1024 / 1024

#  NEW - returns filesize
(ls $archive_path | get 0.size) / 1024 / 1024
```

**Impact**:
- Proper file size calculation in MB
- No more type errors

**Files Modified**:
- `scripts/create_full_distribution.nu` (+58 lines, refactored plugin collection)
  - Fixed plugin counting logic
  - Improved path handling with absolute paths
  - Enhanced error diagnostics

### 3. Plugin Rebuild Optimization

**Issue**: All plugins marked for rebuild even when dependencies unchanged
- Step 4 (`update_all_plugins.nu`) touched all Cargo.toml files at 01:00:32
- Step 5 saw all files as "newer" than binaries
- Marked ALL plugins for rebuild, though cargo only rebuilt changed ones

**Root Cause**: Script always saved files, even when no changes made
```nushell
#  OLD - always saves, touching file timestamp
$updated_content | to toml | save -f $cargo_toml
```

**Solution**: Only save if content actually changed
```nushell
#  NEW - compare before writing
let original_toml = $content | to toml
let new_toml = $updated_content | to toml

if $original_toml != $new_toml {
    $updated_content | to toml | save -f $cargo_toml
}
```

**Impact**:
- Unchanged files preserve original timestamps
- Only plugins with actual dependency changes are rebuilt
- Efficient rebuild process with accurate file modification detection

**Files Modified**:
- `scripts/update_all_plugins.nu` (+12 lines, added content comparison)
  - Only touches files with real changes
  - Preserves timestamps for efficiency
  - Clearer logic and comments

### 4. Documentation

**Files Modified**:
- `CHANGELOG.md` (+56 lines)
  - Added comprehensive 2025-10-19 entry
  - Documented all fixes with root causes
  - Listed files modified and impact summary

## Technical Details

### Nushell Patterns Used

1. **Proper List Handling**:
   - `ls` returns list of records, access with `| get 0.size`
   - Filter with `where type == "file"` to exclude metadata

2. **Absolute Path Construction**:
   - `pwd | append "path" | path join` for cross-platform paths
   - Safer than string concatenation with `/`

3. **Content Comparison**:
   - Compare TOML string representation before saving
   - Preserves file timestamps for efficiency

4. **Error Diagnostics**:
   - Capture `stderr` from commands
   - Report exit codes and error messages separately

## Testing

- [x] Help system shows version-update module
- [x] `just commands` displays all recipes by group
- [x] Phase 3 bin archive creation works
- [x] Plugin collection reports correct count (26)
- [x] Tar archives created successfully
- [x] File size calculated correctly
- [x] Plugin rebuild only touches changed files
- [x] CHANGELOG updated with all changes

## Files Changed

```
38 files changed, 2721 insertions(+), 2548 deletions(-)

Core Changes:
- justfiles/help.just                  (+23)  Help system integration
- scripts/create_full_distribution.nu  (+58)  Build process fixes
- scripts/update_all_plugins.nu        (+12)  Rebuild optimization
- CHANGELOG.md                         (+56)  Documentation

Dependency Updates:
- All plugin Cargo.toml and Cargo.lock files (version consistency)
```

## Breaking Changes

None. These are bug fixes and optimizations that maintain backward compatibility.

## Migration Notes

No migration needed. Improvements are transparent to users.

## Related Issues

- Help system discoverability
- Build process Phase 3 failures
- Unnecessary plugin rebuilds
- Build process reliability

## Checklist

- [x] Changes follow Rust/Nushell idioms
- [x] Code is well-commented
- [x] Error handling is comprehensive
- [x] Documentation is updated
- [x] All changes tested
- [x] No breaking changes introduced
2025-10-19 01:17:13 +01:00
Jesús Pérez
be62c8701a feat: Add ARGUMENTS documentation and interactive update mode
- Add `show-arguments` recipe documenting all version update commands
- Add `complete-update-interactive` recipe for manual confirmations
- Maintain `complete-update` as automatic mode (no prompts)
- Update `update-help` to reference new recipes and modes
- Document 7-step workflow and step-by-step differences

Changes:
- complete-update: Automatic mode (recommended for CI/CD)
- complete-update-interactive: Interactive mode (with confirmations)
- show-arguments: Complete documentation of all commands and modes
- Both modes share same 7-step workflow with different behavior in Step 4
2025-10-19 00:05:16 +01:00
Jesús Pérez
d3853f3155 chore: fix full collect and build
Some checks failed
Build and Test / Validate Setup (push) Has been cancelled
Build and Test / Build (darwin-amd64) (push) Has been cancelled
Build and Test / Build (darwin-arm64) (push) Has been cancelled
Build and Test / Build (linux-amd64) (push) Has been cancelled
Build and Test / Build (windows-amd64) (push) Has been cancelled
Build and Test / Build (linux-arm64) (push) Has been cancelled
Build and Test / Security Audit (push) Has been cancelled
Build and Test / Package Results (push) Has been cancelled
Build and Test / Quality Gate (push) Has been cancelled
Nightly Build / Check for Changes (push) Has been cancelled
Nightly Build / Validate Setup (push) Has been cancelled
Nightly Build / Nightly Build (darwin-amd64) (push) Has been cancelled
Nightly Build / Nightly Build (darwin-arm64) (push) Has been cancelled
Nightly Build / Nightly Build (linux-amd64) (push) Has been cancelled
Nightly Build / Nightly Build (windows-amd64) (push) Has been cancelled
Nightly Build / Nightly Build (linux-arm64) (push) Has been cancelled
Nightly Build / Create Nightly Pre-release (push) Has been cancelled
Nightly Build / Notify Build Status (push) Has been cancelled
Nightly Build / Nightly Maintenance (push) Has been cancelled
2025-09-24 21:28:50 +01:00
Jesús Pérez
41455c5b3e feat: Add complete Nushell full distribution system
Some checks failed
Build and Test / Validate Setup (push) Has been cancelled
Build and Test / Build (darwin-amd64) (push) Has been cancelled
Build and Test / Build (darwin-arm64) (push) Has been cancelled
Build and Test / Build (linux-amd64) (push) Has been cancelled
Build and Test / Build (windows-amd64) (push) Has been cancelled
Build and Test / Build (linux-arm64) (push) Has been cancelled
Build and Test / Security Audit (push) Has been cancelled
Build and Test / Package Results (push) Has been cancelled
Build and Test / Quality Gate (push) Has been cancelled
## Major Features Added

- **Complete distribution infrastructure**: Build, package, and distribute Nushell binary alongside plugins
- **Zero-prerequisite installation**: Bootstrap installers work on fresh systems without Rust/Cargo/Nushell
- **Cross-platform support**: Linux, macOS, Windows (x86_64, ARM64)
- **Self-contained packages**: Everything needed for complete Nushell environment

## New Components

### Build System
- `scripts/build_nushell.nu` - Build nushell with all workspace plugins
- `scripts/collect_full_binaries.nu` - Collect nu binary + all plugins
- `justfiles/full_distro.just` - 40+ new recipes for distribution workflows

### Bootstrap Installers (Zero Prerequisites)
- `installers/bootstrap/install.sh` - Universal POSIX installer (900+ lines)
- `installers/bootstrap/install.ps1` - Windows PowerShell installer (800+ lines)
- Complete platform detection, PATH setup, plugin registration

### Distribution System
- `scripts/create_distribution_packages.nu` - Multi-platform package creator
- `scripts/install_full_nushell.nu` - Advanced nu-based installer
- `scripts/verify_installation.nu` - Installation verification suite
- `scripts/lib/common_lib.nu` - Shared utilities and logging

### Configuration Management
- `scripts/templates/default_config.nu` - Complete nushell configuration (500+ lines)
- `scripts/templates/default_env.nu` - Cross-platform environment setup
- `etc/distribution_config.toml` - Central distribution settings
- `scripts/templates/uninstall.sh` & `uninstall.ps1` - Clean removal

## Key Workflows

```bash
just build-full                # Build nushell + all plugins
just pack-full-all              # Create packages for all platforms
just verify-full                # Verify installation
just release-full-cross         # Complete cross-platform release
```

## Installation Experience

- One-liner: `curl -sSf https://your-url/install.sh | sh`
- Multiple modes: user, system, portable installation
- Automatic plugin registration with verification
- Professional uninstall capability

## Benefits

-  Solves bootstrap problem - no prerequisites needed
-  Production-ready distribution system
-  Complete cross-platform support
-  Professional installation experience
-  Integrates seamlessly with existing plugin workflows
-  Enterprise-grade verification and logging
2025-09-24 18:52:07 +01:00
Jesús Pérez
741efa1e70 chore: fix alias install modes
Some checks failed
Build and Test / Validate Setup (push) Has been cancelled
Build and Test / Build (darwin-amd64) (push) Has been cancelled
Build and Test / Build (darwin-arm64) (push) Has been cancelled
Build and Test / Build (linux-amd64) (push) Has been cancelled
Build and Test / Build (windows-amd64) (push) Has been cancelled
Build and Test / Build (linux-arm64) (push) Has been cancelled
Build and Test / Security Audit (push) Has been cancelled
Build and Test / Package Results (push) Has been cancelled
Build and Test / Quality Gate (push) Has been cancelled
2025-09-24 14:09:04 +01:00
Jesús Pérez
8dee8b776e chore: use script to register plugins in nushell 2025-09-20 20:14:02 +01:00
Jesús Pérez
187a69575c chore: add scripts to register plugins in nushell 2025-09-20 20:13:14 +01:00
Jesús Pérez
cf594da20b chore: fix remove target artifacts 2025-09-20 19:25:54 +01:00
Jesús Pérez
b9674b6adf chore: fix remove target artifacts 2025-09-20 19:19:28 +01:00
Jesús Pérez
23f5acdf9e chore: fix bin_archives 2025-09-20 19:13:37 +01:00
Jesús Pérez
c5b510b939 feat: modularize justfile and fix collection/packaging scripts
- Modularize justfile system with dedicated modules:
  * alias.just: Command aliases (h, b, c, s)
  * build.just: Build and cross-compilation commands
  * distro.just: Collection and packaging commands
  * help.just: Comprehensive help system with areas
  * qa.just: Testing and quality assurance
  * tools.just: Development tools and utilities
  * upstream.just: Repository tracking and sync

- Fix platform detection in collect script:
  * Use actual platform names (darwin-arm64) instead of generic "host"
  * Support both "host" argument and auto-detection
  * Filter out .d dependency files from distribution

- Fix packaging script issues:
  * Correct uname command syntax (^uname -m)
  * Fix string interpolation and environment parsing
  * Include plugin binaries in archives (was only packaging metadata)
  * Use proper path join instead of string interpolation
  * Add --force flag to avoid interactive prompts

- Fix justfile absolute paths:
  * Replace relative paths with {{justfile_directory()}} function
  * Enable commands to work from any directory

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-20 19:04:08 +01:00
Jesús Pérez
5949bfade6 feat: major repository modernization and tracking cleanup
## Summary

Comprehensive repository cleanup focusing on plugin dependency management, documentation improvements, and git tracking optimization.

## Key Changes

### 🔧 Core Infrastructure
- Synchronized all nu-* dependencies across plugins for version consistency
- Enhanced upstream tracking and automation systems
- Removed nushell directory from git tracking for cleaner repository management

### 📚 Documentation
- Significantly expanded README.md with comprehensive development guides
- Added detailed workflow documentation and command references
- Improved plugin collection overview and usage examples

### 🧹 Repository Cleanup
- Removed legacy bash scripts (build-all.sh, collect-install.sh, make_plugin.sh)
- Streamlined automation through unified justfile and nushell script approach
- Updated .gitignore with nushell directory and archive patterns
- Removed nushell directory from git tracking to prevent unwanted changes

### 🔌 Plugin Updates
- **nu_plugin_image**: Major refactoring with modular architecture improvements
- **nu_plugin_hashes**: Enhanced functionality and build system improvements
- **nu_plugin_highlight**: Updated for new plugin API compatibility
- **nu_plugin_clipboard**: Dependency synchronization
- **nu_plugin_desktop_notifications**: Version alignment
- **nu_plugin_port_extension & nu_plugin_qr_maker**: Consistency updates
- **nu_plugin_kcl & nu_plugin_tera**: Submodule synchronization

### 🏗️ Git Tracking Optimization
- Removed nushell directory from version control for cleaner repository management
- Added comprehensive .gitignore patterns for build artifacts and archives

## Statistics
- 2,082 files changed
- 2,373 insertions, 339,936 deletions
- Net reduction of 337,563 lines (primarily from removing nushell directory tracking)

## Benefits
- Complete version consistency across all plugins
- Cleaner repository with optimized git tracking
- Improved developer experience with streamlined workflows
- Enhanced documentation and automation
- Reduced repository size and complexity

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-20 19:02:28 +01:00
Jesús Pérez
ce7d870fb7 chore: update to latest dependencies and Nushell 2025-09-20 15:52:52 +01:00
Jesús Pérez
4480df5d95 chore: update to latest dependencies and Nushell 2025-09-20 15:50:17 +01:00
Jesús Pérez
e5bcca1013 feat: add submodules for plugin ecosystem 2025-09-20 15:47:46 +01:00
Jesús Pérez
b99dcc83c3 feat: major repository modernization and tracking cleanup
## Summary

Comprehensive repository cleanup focusing on plugin dependency management, documentation improvements, and git tracking optimization.

## Key Changes

### 🔧 Core Infrastructure
- Synchronized all nu-* dependencies across plugins for version consistency
- Enhanced upstream tracking and automation systems
- Removed nushell directory from git tracking for cleaner repository management

### 📚 Documentation
- Significantly expanded README.md with comprehensive development guides
- Added detailed workflow documentation and command references
- Improved plugin collection overview and usage examples

### 🧹 Repository Cleanup
- Removed legacy bash scripts (build-all.sh, collect-install.sh, make_plugin.sh)
- Streamlined automation through unified justfile and nushell script approach
- Updated .gitignore with nushell directory and archive patterns
- Removed nushell directory from git tracking to prevent unwanted changes

### 🔌 Plugin Updates
- **nu_plugin_image**: Major refactoring with modular architecture improvements
- **nu_plugin_hashes**: Enhanced functionality and build system improvements
- **nu_plugin_highlight**: Updated for new plugin API compatibility
- **nu_plugin_clipboard**: Dependency synchronization
- **nu_plugin_desktop_notifications**: Version alignment
- **nu_plugin_port_extension & nu_plugin_qr_maker**: Consistency updates
- **nu_plugin_kcl & nu_plugin_tera**: Submodule synchronization

### 🏗️ Git Tracking Optimization
- Removed nushell directory from version control for cleaner repository management
- Added comprehensive .gitignore patterns for build artifacts and archives

## Statistics
- 2,082 files changed
- 2,373 insertions, 339,936 deletions
- Net reduction of 337,563 lines (primarily from removing nushell directory tracking)

## Benefits
- Complete version consistency across all plugins
- Cleaner repository with optimized git tracking
- Improved developer experience with streamlined workflows
- Enhanced documentation and automation
- Reduced repository size and complexity

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-20 15:18:58 +01:00
0a460ceeb5
chore: add kcl-install.sh linux-amd64 2025-06-27 08:04:01 +01:00
Jesús Pérex
904e3f3fb6 chore: add info about kcl_install 2025-06-27 07:55:18 +01:00
Jesús Pérex
b626f63ea6 chore: add info about kcl_install 2025-06-27 07:54:20 +01:00
Jesús Pérex
112d120ebf chore: update module 2025-06-27 07:53:05 +01:00
Jesús Pérex
b3579d76be chore: modify kcl-install to use 2025-06-27 07:50:33 +01:00
Jesús Pérex
6b8cc1d090 chore: update bin_archives 2025-06-27 07:23:48 +01:00
Jesús Pérex
c7c30d84a3 chore: kcl-install 2025-06-27 07:22:35 +01:00
Jesús Pérex
32bce2fa2a chore: kcl-install 2025-06-27 07:22:13 +01:00
Jesús Pérex
48666bb3dc chore: update modules 2025-06-27 06:17:24 +01:00
1edf76cfef
chore: add nu in install.sh 2025-06-27 05:55:31 +01:00
Jesús Pérex
58f2bc752d chore: exclude path 2025-06-27 05:16:17 +01:00
Jesús Pérex
693a9c9839 chore: add bin_archives 2025-06-27 05:08:46 +01:00
Jesús Pérex
42635a7652 chore: update modules 2025-06-27 05:07:56 +01:00
Jesús Pérex
e077b6d935 chore: add BIN_ARCHIVE_DIR_PATH as bin_archives 2025-06-27 04:50:22 +01:00
Jesús Pérex
c99d557f99 chore: adjust to pack and install 2025-06-27 04:37:07 +01:00
Jesús Pérex
ecf029854c chore: add pack distribution 2025-06-27 04:36:21 +01:00
Jesús Pérex
e897b88fa2 chore: make install.sh and pack-dist.sh 2025-06-27 04:35:40 +01:00
Jesús Pérex
cdc4fc63ae chore: exclude pack tar.gz 2025-06-27 04:35:01 +01:00
Jesús Pérex
d755b0189c chore: fix content 2025-06-27 03:43:23 +01:00
Jesús Pérex
5ebeb09586 chore: fix distribution script name 2025-06-27 03:41:51 +01:00
Jesús Pérex
e03619fb6e chore: add autogenerated install_nu_plugins.nu 2025-06-27 03:39:17 +01:00
Jesús Pérex
32edf72302 chore: load env, echo messages, generate install_nu_plugins.nu 2025-06-27 03:38:27 +01:00
Jesús Pérex
841a6d40fa chore: add main vars file 2025-06-27 03:37:01 +01:00
Jesús Pérex
d6c94b1ab0 chore: addjust to scripts changes 2025-06-27 03:36:46 +01:00
Jesús Pérex
a9f69f8cd3 chore: add main scripts 2025-06-27 02:36:25 +01:00
Jesús Pérex
37eedccd14 chore: add generate and plugin template 2025-06-27 02:35:59 +01:00
Jesús Pérex
cef1629f9a chore: add nushell 2025-06-27 02:33:44 +01:00
Jesús Pérex
01e40314bd chore: add distribution path 2025-06-27 02:33:17 +01:00
Jesús Pérex
7aafe5523f chore: add api_nu_plugin_kcl 2025-06-27 02:32:49 +01:00
Jesús Pérex
4acf51fbdc chore: add repo files 2025-06-27 02:32:07 +01:00
Jesús Pérex
b1fbce5b3c chore: add plugins 2025-06-27 02:31:23 +01:00
Jesús Pérex
57cf519bbe chore: update modules 2025-06-27 02:30:48 +01:00
Jesús Pérex
275d4ec63e init repo 2025-06-27 01:27:47 +01:00
Jesús Pérex
967b5c2be5 init repo 2025-06-27 01:26:44 +01:00