#!/usr/bin/env nu # Complete installation and registration of provisioning plugins # Run this in a fresh Nushell session print "Provisioning Plugins - Installation & Registration" print "==================================================" print "" # Copy plugins to Nushell plugin directory print "Step 1: Installing plugin binaries..." print "" let plugin_dir = ($env.HOME + "/.local/share/nushell/plugins") # Run the registration script let nu_path = ($env.HOME + "/.local/bin/nu" | path expand) let register_script = ($env.PWD | path join "provisioning" "core" "plugins" "register-plugins.nu") ^$nu_path $register_script print "" print "Step 2: Registering plugins with Nushell..." print "" # Register plugins let auth_plugin = ($env.HOME | path join ".local/share/nushell/plugins/nu_plugin_auth" | path expand) let kms_plugin = ($env.HOME | path join ".local/share/nushell/plugins/nu_plugin_kms" | path expand) let orch_plugin = ($env.HOME | path join ".local/share/nushell/plugins/nu_plugin_orchestrator" | path expand) plugin add $auth_plugin plugin add $kms_plugin plugin add $orch_plugin sleep 1 print "" print "Step 3: Verifying plugin installation..." print "" # Verify plugins are loaded let plugins = plugin list | where name =~ "nu_plugin_(auth|kms|orchestrator)" if ($plugins | length) == 3 { print "✓ All 3 plugins registered successfully!" print "" print "Installed plugins:" for plugin in $plugins { print $" ✓ ($plugin.name)" } } else { print $"⚠ Expected 3 plugins, found ($plugins | length)" print "Please run the following commands manually:" print "" print $"plugin add ($auth_plugin)" print $"plugin add ($kms_plugin)" print $"plugin add ($orch_plugin)" } print "" print "✓ Installation complete!" print "" print "You can now use the provisioning CLI with plugin support:" print "" print " provisioning auth login " print " provisioning kms encrypt " print " provisioning orch status"