setuplisted
Install: claude install-skill dianzuan/zotron
# Zotron Setup
Run this when the user has just installed the Zotron plugin or when `zotron ping` cannot reach Zotero.
## Goal
End state: `zotron ping` succeeds and the agent can call the single `zotron` CLI. OCR and RAG are subcommands: `zotron ocr ...` and `zotron rag ...`.
## Distribution model
The repository does not track `zotron.xpi`. New installs download the release XPI. If GitHub is unavailable, set `ZOTRON_XPI_URLS` to one or more mirror URLs. If a local file is already available, set `ZOTRON_XPI_PATH=/path/to/zotron.xpi`.
If Zotron is already installed but the setup target version is newer, do not reinstall from setup. Tell the user to use Zotero's native update flow:
```text
Tools -> Plugins -> Zotron -> gear icon -> Check for Updates -> restart Zotero
```
## Procedure
1. Check that the `zotron` CLI is installed. If missing, run the cascading install script below. It tries four methods in order and stops at the first success.
```bash
#!/usr/bin/env bash
set -euo pipefail
if command -v zotron >/dev/null 2>&1; then
echo "zotron already installed: $(command -v zotron)"
exit 0
fi
INSTALL_DIR="${HOME}/.local/bin"
mkdir -p "$INSTALL_DIR"
# --- Detect platform ---
OS=$(uname -s | tr '[:upper:]' '[:lower:]')
ARCH=$(uname -m)
case "$ARCH" in aarch64|arm64) ARCH=arm64 ;; x86_64|amd64) ARCH=amd64 ;; esac
case "$OS" in
linux) PLATFORM="linux-${ARCH}" ;;
darwin) PLATFORM="macos-${ARCH}" ;;
*) PLATFORM="windows-amd64.exe" ;;
esac
# Release binaries a