- Desktop widget (Python/pystray): system tray icon showing 5h usage as circular progress bar with Claude starburst logo, 10-step green-to-red color scale, right-click menu with usage stats and configuration - Shared cache: both widget and CLI statusline read/write the same /tmp/claude_usage.json — only one fetcher needs to run - Installer wizard (install_wizard.py): interactive cross-platform setup with component selection, session key prompt, cron/autostart config - OS wrappers: install.sh (Linux/macOS) and install.ps1 (Windows) find Python 3.9+ and launch the wizard - README with topology diagram, usage docs, and configuration reference Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
29 lines
892 B
Bash
Executable File
29 lines
892 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Linux/macOS wrapper — launches the cross-platform installer wizard.
|
|
# Usage: bash install.sh
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
|
|
# Find Python 3.9+
|
|
PYTHON=""
|
|
for candidate in python3 python; do
|
|
if command -v "$candidate" &>/dev/null; then
|
|
major_minor=$("$candidate" -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')")
|
|
major=$("$candidate" -c "import sys; print(sys.version_info.major)")
|
|
minor=$("$candidate" -c "import sys; print(sys.version_info.minor)")
|
|
if [ "$major" -ge 3 ] && [ "$minor" -ge 9 ]; then
|
|
PYTHON="$candidate"
|
|
break
|
|
fi
|
|
fi
|
|
done
|
|
|
|
if [ -z "$PYTHON" ]; then
|
|
echo "ERROR: Python 3.9+ is required to run the installer."
|
|
echo "Install Python 3.9+ and try again."
|
|
exit 1
|
|
fi
|
|
|
|
exec "$PYTHON" "$SCRIPT_DIR/install_wizard.py"
|