Skip to content

Feature Request: Unified update command (binary + plugin) #25

Closed as duplicate

Description

@possebon

Feature Request: Unified Update Command for Binary + Plugin Synchronization

Problem Statement

Plannotator has a two-component architecture that can become desynchronized during updates:

  1. Binary: ~/.local/bin/plannotator (installed via curl -fsSL https://plannotator.ai/install.sh | bash)
  2. Claude Code Plugin: ~/.claude/plugins/cache/plannotator/plannotator/{version}/ (installed via /plugin install plannotator@plannotator)

Current Update Flow (Broken)

When a new version is released:

  1. User runs curl -fsSL https://plannotator.ai/install.sh | bash

    • ✅ Updates binary to v0.4.0
    • ❌ Plugin cache still at v0.3.1
  2. Claude Code calls plannotator command (v0.4.0)

    • But uses hooks configuration from plugin cache (v0.3.1)
    • Potential version mismatches, missing features, broken functionality

Real-World Impact

  • UI shows update message but updating only fixes half the system
  • Hooks may be outdated while binary has new capabilities
  • User confusion about which component needs updating
  • No clear single command to update everything

Current State Analysis

# Binary location and version
$ which plannotator
~/.local/bin/plannotator

# Plugin cache location
$ ls ~/.claude/plugins/cache/plannotator/plannotator/
0.3.1/  # ← Out of sync after binary update

# Hooks are loaded from plugin cache
$ cat ~/.claude/plugins/cache/plannotator/plannotator/0.3.1/hooks/hooks.json

Proposed Solutions

Option 1: Post-Install Hook in install.sh (Recommended)

Implementation: Modify install.sh to trigger Claude Code plugin update after binary installation.

# At end of install.sh
echo "🔄 Updating Claude Code plugin..."

# Force plugin re-download
claude plugin update plannotator@plannotator 2>/dev/null || \
  echo "⚠️  Please restart Claude Code and run: /plugin update plannotator@plannotator"

Pros:

  • Single command updates both components
  • Familiar workflow (users already run install script)
  • Backward compatible

Cons:

  • Requires Claude Code to be installed
  • Might need Claude Code CLI detection

Option 2: Claude Plugin Auto-Detection

Implementation: Binary checks plugin version on startup and warns if mismatched.

// In server/index.ts startup
const binaryVersion = "0.4.0"; // From build
const pluginVersion = process.env.PLANNOTATOR_PLUGIN_VERSION; // Set by Claude

if (binaryVersion !== pluginVersion) {
  console.error(`
⚠️  Version Mismatch Detected:
   Binary: v${binaryVersion}
   Plugin: v${pluginVersion}
   
   Please update the plugin:
   /plugin update plannotator@plannotator
  `);
}

Pros:

  • Catches version drift immediately
  • Clear user guidance
  • No external dependencies

Cons:

  • Reactive (shows warning after problem occurs)
  • Doesn't auto-fix

Option 3: Plugin-Managed Binary

Implementation: Claude Code plugin downloads and manages its own binary copy.

~/.claude/plugins/cache/plannotator/plannotator/0.4.0/
├── bin/
│   └── plannotator         # Plugin's own binary
├── hooks/
│   └── hooks.json
└── server/
    └── index.ts

Update hooks.json to use plugin-local binary:

{
  "hooks": {
    "PermissionRequest": [{
      "matcher": "ExitPlanMode",
      "hooks": [{
        "type": "command",
        "command": "$PLUGIN_PATH/bin/plannotator",  // Plugin-relative path
        "timeout": 1800
      }]
    }]
  }
}

Pros:

  • Perfect synchronization - plugin and binary always match
  • Single update command: /plugin update plannotator@plannotator
  • No PATH dependencies

Cons:

  • Larger plugin download size
  • Breaks standalone binary usage (if users rely on that)
  • More complex build/release process

Option 4: Unified Update Command

Implementation: Create plannotator update subcommand that handles both.

$ plannotator update
🔄 Checking for updates...
📦 Downloading plannotator v0.4.0...
✅ Binary updated
🔌 Updating Claude Code plugin...
✅ Plugin updated
🎉 Update complete! Please restart Claude Code.

Pros:

  • Clear, single command
  • User-friendly UX
  • Can check versions before updating

Cons:

  • Requires the old binary to update itself (chicken-egg problem)
  • Complex implementation

Recommended Approach: Hybrid Solution

Combine Option 1 (post-install hook) and Option 2 (version detection):

Phase 1: Immediate Fix

  1. Modify install.sh to suggest plugin update after binary installation
  2. Add version mismatch detection to binary startup

Phase 2: Long-term Solution

  1. Transition to Option 3 (plugin-managed binary) for complete sync
  2. Keep standalone binary for non-Claude-Code users

Implementation Checklist

  • Add version check to binary (show warning on mismatch)
  • Update install.sh to prompt for plugin update
  • Document update process in README
  • Consider plugin-managed binary for future versions
  • Add /plugin update reminder to plannotator UI

Example User Experience (After Fix)

# User runs update
$ curl -fsSL https://plannotator.ai/install.sh | bash

✅ Plannotator binary updated to v0.4.0
⚠️  Claude Code plugin is out of date (v0.3.1)
   
   To complete the update, run:
   /plugin update plannotator@plannotator
   
   Or restart Claude Code and it will auto-update.

Additional Context

  • Current version: v0.3.1
  • Binary size: ~60MB (Bun compiled executable)
  • Plugin contains: hooks config + TypeScript server code + UI assets
  • Update frequency: Important for bug fixes and new features (like project tags!)

This issue blocks efficient workflows for users working across multiple projects who need the latest features without manual intervention.

Activity

  1. backnotprop commented on Jan 5, 2026

    @backnotprop
    Owner

    Thanks for the detailed write-up! I want to clarify how the architecture actually works, since it might not be as fragile as it seems.

    How it works:

    The plugin only contains two things:

    • plugin.json - metadata (name, version, description)
    • hooks/hooks.json - tells Claude Code: "when ExitPlanMode triggers, run plannotator command"

    That's it. The plugin doesn't contain any code or logic - it's just a hook trigger. The binary in ~/.local/bin/plannotator does all the actual work (server, UI, Obsidian/Bear integration, etc.).

    So what happens with version mismatch?

    If binary is v0.4.0 and plugin is v0.3.1... nothing breaks. The plugin's only job is to say "run plannotator" - which it does. The binary handles everything else.

    The versions would only need to stay in sync if we changed the hooks.json structure (added new hooks, changed matchers, etc.). But that's rare - the hook config has been stable.

    That said...

    I understand the UX concern of seeing mismatched version numbers. A few options:

    1. We could treat the plugin version as independent (it's just a hook trigger, could stay at 1.0 forever)
    2. Document that only the binary version matters for features
    3. Add a note in install.sh output clarifying this

    Does this help clarify? Let me know if you've hit an actual functional issue with mismatched versions - that would be useful to know!

  2. backnotprop commented on Jan 7, 2026

    @backnotprop
    Owner

    Option 3: Plugin-Managed Binary

    This is why I'll keep this issue open. I need to investigate if Claude can just manage the binary for me, similar to how OpenCode works.

  3. ovitrif commented on Jan 16, 2026

    @ovitrif

    Until this is tackled can we please have the install script print at the end

    # curl -fsSL https://plannotator.ai/install.sh | bash
    # … end with:
    Update the Claude Code plugin:
    claude plugin marketplace remove plannotator
    claude plugin marketplace add backnotprop/plannotator
    claude plugin install plannotator@plannotator

    Please 🙏🏻

    I have this in a notes doc but I always have to switch from terminal to that doc in Obsidian to remember how to type the commands correctly 🥲 …

    Also, FWIW the commands for the guide "Install the Claude Code plugin:" could use the non-interactive way of executing claude commands, since they're two and most users will likely copy-paste, thus making their workflow more painful.

    If we use claude plugin… which doesn't need to open a claude with claude in the first place, everything becomes much easier to manage from terminal 🙏🏻

  4. ovitrif commented on Jan 16, 2026

    @ovitrif

    cc. @backnotprop ⬆️ wdyt of the above as a "mitigation" strat?!

  5. changed the title [-]Feature Request: Unified Update Command - Sync Binary + Plugin Updates[/-] [+]Unified update command (binary + plugin)[/+] on Jan 22, 2026
  6. added
    enhancement
    on Jan 22, 2026
  7. changed the title [-]Unified update command (binary + plugin)[/-] [+]Feature Request: Unified update command (binary + plugin)[/+] on Jan 22, 2026
  8. backnotprop commented on Jun 13, 2026

    @backnotprop
    Owner

    Thanks for the report. I am consolidating the older backlog so related work has one current tracking issue.

    This specific request is now tracked in #902 as part of the installer, update, package manager, and sandbox docs work. During the June 13, 2026 older-than-two-month triage, I copied the relevant requirement from this issue into #902 and explained why it belongs with the related work.

    I am closing this older issue so the backlog points at the current tracking issue. If there is a newer reproduction or a detail that is missing from #902, please comment there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions