installer: add update mode for re-runs (matches armorcodex pattern)#8
Merged
Conversation
When re-running the curl-pipe installer with the plugin already installed AND ArmorIQ credentials present, switch to a lightweight update flow: git pull the plugin source, refresh npm deps, refresh the armoriq-dev CLI. Skip the marketplace re-registration and the connect prompt. Fresh installs (no credentials OR plugin not yet installed) go through the full flow including the abort-on-decline gate at the connect prompt. New flags: - --force-install forces full install path even if already installed - --update forces update path even without credentials Mirrors install_armorcodex.sh's detect_mode / run_update_path / finish_update_banner pattern. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR updates the install_armorcopilot.sh installer to auto-detect re-runs and choose a lightweight “update mode” (refresh repo/deps/CLI and skip marketplace + connect prompt), while still keeping the full flow for fresh installs. It also adds flags to force either mode.
Changes:
- Add mode detection (
detect_mode) and an update path (run_update_path+finish_update_banner) for re-runs. - Introduce
--force-installand--updateflags to override auto-detection. - Update the installer header/docs to describe the new re-run behavior and flags.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+402
to
+405
| run_update_path() { | ||
| section "Refreshing plugin source" | ||
| fetch_plugin_source | ||
|
|
Comment on lines
+466
to
+472
| if [[ "${mode}" == "update" ]]; then | ||
| section "Updating ArmorCopilot" | ||
| run_update_path | ||
| verify_install | ||
| finish_update_banner | ||
| exit 0 | ||
| fi |
Comment on lines
+417
to
+427
| local sha="" | ||
| if [[ -d "${INSTALL_HOME}/.git" ]]; then | ||
| sha="$(git -C "${INSTALL_HOME}" rev-parse --short HEAD 2>/dev/null || true)" | ||
| fi | ||
| echo | ||
| printf "${G}${B}ArmorCopilot is up to date.${N}\n\n" | ||
| if [[ -n "${sha}" ]]; then | ||
| info "Plugin: ${INSTALL_HOME} (refreshed to ${sha})" | ||
| else | ||
| info "Plugin: ${INSTALL_HOME} (refreshed)" | ||
| fi |
Comment on lines
+386
to
+388
| is_armorcopilot_installed() { | ||
| [[ -f "${BOOTSTRAP_PATH}" ]] && copilot plugin list 2>/dev/null | grep -q "^[^#]*${PLUGIN_NAME}" | ||
| } |
Plugin listings showed "armorcopilot@armorcopilot" because both the plugin name and the marketplace name were "armorcopilot". Renames the marketplace id to "armoriq" (the company) so listings now read "armorcopilot@armoriq" — plugin@marketplace makes the product/company distinction clear and prepares for additional plugins under the same marketplace. Changed: - .claude-plugin/marketplace.json top-level "name" -> "armoriq" - .agents/plugins/marketplace.json mirror copy, same change - install_armorcopilot.sh MARKETPLACE_NAME="armoriq" - install_armorcopilot.sh header comment example updated Plugin name itself stays "armorcopilot", owner display name "ArmorIQ", interface displayName "ArmorIQ" — all unchanged. Existing users who ran the old installer have "armorcopilot" marketplace registered locally. On the next installer re-run (update mode), the marketplace registration is left in place; users who fully reinstall will pick up the new "armoriq" marketplace name automatically. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Pulkit7070
approved these changes
Jun 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When a user re-runs
curl -fsSL https://armoriq.ai/install_armorcopilot.sh | bashafter they already have ArmorCopilot installed and an ArmorIQ credential file, the installer now switches to a lightweight update path instead of doing a fresh marketplace re-add + plugin reinstall + connect prompt.Update mode does:
git pullthe plugin source at~/.armoriq/armorCopilotnpm install --omit=devto refresh deps@armoriq/sdk-devCLI (latest)Fresh installs (no credentials OR plugin not yet installed) keep going through the full flow — including the abort-on-decline gate at the "Connect your ArmorIQ account now?" prompt that we shipped in PR #5.
New flags
--force-install— force the full install flow even if already installed--update— force update mode even without credentialsPattern
Direct port of the same three-function pattern used in install_armorcodex.sh:
detect_mode/run_update_path/finish_update_banner.Test plan
curl -fsSL https://armoriq.ai/install_armorcopilot.sh | bashruns full install flow, prompts for connect.--force-installre-runs the full flow even when update mode would have been chosen.--updateruns update path even before any credentials exist (used for CI / scripted upgrade paths).armorIQ-landing/public/install_armorcopilot.shso the curl URL serves the new behavior.🤖 Generated with Claude Code