Determine the action from "$ARGUMENTS" (default: refresh):
- init:
classpath-surfer index init - refresh:
classpath-surfer index refresh - status:
classpath-surfer index status --agentic - clean:
classpath-surfer index clean - diagnose: Check CLI/plugin version compatibility:
- Run
classpath-surfer --versionto get the installed CLI version. - Read
.claude-plugin/plugin.jsonand extract the"version"field. - Compare the two: if the major.minor versions differ, report the mismatch and suggest updating the CLI (
cargo install classpath-surfer) or the plugin (/plugin install classpath-surfer). - If they match, report that versions are compatible.
- Run
After the action completes, run classpath-surfer index status --agentic (unless the action was clean or diagnose) and report the result to the user.