Install and verify ace-cli tool (smart, non-noisy installation wizard)
Installs and verifies the ace-cli tool with interactive package manager selection and troubleshooting.
/plugin marketplace add ce-dot-net/ce-claude-marketplace/plugin install ace@ce-dot-net-marketplaceThis command provides a smart, interactive installation wizard for the ace-cli CLI tool.
When the user invokes this command, follow these steps in order:
Use the Bash tool to check current installation status. IMPORTANT: Break this into simple, single-purpose commands to avoid eval parse errors.
Step 1.1: Check if ace-cli command exists:
command -v ace-cli && echo "FOUND" || echo "NOT_INSTALLED"
Step 1.2: If FOUND, get version:
ace-cli --version 2>/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1
Handle results:
If Step 1.1 output contains FOUND and Step 1.2 returns a version:
✅ ace-cli v{VERSION} installed and working and EXIT (silent success!)⚠️ ace-cli v{VERSION} installed (outdated) and ask Would you like to upgrade? (Y/n)
If Step 1.1 output contains NOT_INSTALLED:
❌ ace-cli not foundUse the Bash tool to detect available package managers. IMPORTANT: Use simple, separate commands to avoid parse errors.
Step 2.1: Check for npm:
command -v npm >/dev/null 2>&1 && npm --version 2>/dev/null || echo "NOT_FOUND"
Step 2.2: Check for pnpm:
command -v pnpm >/dev/null 2>&1 && pnpm --version 2>/dev/null || echo "NOT_FOUND"
Step 2.3: Check for yarn:
command -v yarn >/dev/null 2>&1 && yarn --version 2>/dev/null || echo "NOT_FOUND"
Build list of available managers from the results above. For each manager that didn't return "NOT_FOUND", add it to a list with its version number.
Handle results:
If ALL managers returned NOT_FOUND:
❌ No package managers found (npm, pnpm, or yarn required)
Please install Node.js and npm first:
- macOS: brew install node
- Linux: https://nodejs.org/en/download/package-manager
- Windows: https://nodejs.org/en/download
If at least ONE manager was found:
Present package manager options to the user and ask them to choose:
If only one manager available (e.g., just npm):
📦 Using npm for installationIf multiple managers available:
Which package manager would you like to use? [1-{N}]:Store selected manager in a variable for Phase 4.
Based on the selected package manager, construct the installation command:
npm:
npm install -g @ace-sdk/cli
pnpm:
pnpm add -g @ace-sdk/cli
yarn:
yarn global add @ace-sdk/cli
Show the command to the user:
📥 Installation command:
{COMMAND}
Proceed with installation? (Y/n):
Wait for user confirmation:
n or N → EXIT (user cancelled)Y, y, or Enter → proceed to Phase 5Use the Bash tool to run the installation command:
# Run installation command (use the selected manager)
{INSTALL_COMMAND}
Handle results:
If exit code = 0 (success):
✅ Installation completed successfully!If exit code != 0 (failure):
❌ Installation failed!
Common issues:
1. Permission errors:
- Try: sudo {INSTALL_COMMAND}
- Or use: npx @ace-sdk/cli (run without install)
2. Network errors:
- Check internet connection
- Try: npm config set registry https://registry.npmjs.org/
3. PATH issues:
- After install, close and reopen terminal
- Or add npm bin to PATH: export PATH="$(npm bin -g):$PATH"
Full error output:
{ERROR_OUTPUT}
Use the Bash tool to verify the installation worked. IMPORTANT: Use simple, separate commands.
Step 6.1: Check if command exists:
command -v ace-cli
Step 6.2: Get version (if Step 6.1 succeeded):
ace-cli --version
Step 6.3: Get OS info:
uname -s
Process results:
Show verification results to the user with a summary:
🔍 Installation Verification:
{OUTPUT_FROM_VERIFICATION}
🎉 All set! The ace-cli tool is installed and ready to use.
Next steps:
1. Run /ace:ace-configure to set up your organization and project
2. Run /ace:ace-status to check your playbook
3. Start using ACE for automatic pattern learning!
Ask user if they want to test server connectivity:
Would you like to test connection to the ACE server? (Y/n):
If yes, use simple Bash commands:
Step 7.1: Check if global config exists:
test -f ~/.config/ace/config.json && echo "CONFIG_EXISTS" || echo "NO_CONFIG"
Step 7.2: If config exists, get server URL:
jq -r '.serverUrl // "https://ace-api.code-engine.app"' ~/.config/ace/config.json
Step 7.3: Test connectivity (using URL from Step 7.2):
curl -s --connect-timeout 5 {SERVER_URL}/health
Process results:
Show connectivity results and exit with success.
Always provide actionable guidance when errors occur:
sudo or npx alternativeUse clear status indicators:
Execute these phases in order, handling each result appropriately.