Rewrite in Go: static binaries, zero runtime dependencies
Some checks failed
Release / build (push) Failing after 21s

Replace Node.js + Python codebase with three Go binaries:
- claude-statusline: CLI status bar for Claude Code
- claude-fetcher: standalone cron job for API usage
- claude-widget: system tray icon (fyne-io/systray + fogleman/gg)

All CGO-free for trivial cross-compilation. Add nfpm .deb packaging
with autostart and cron. CI pipeline produces Linux + Windows binaries,
.deb, .tar.gz, and .zip release assets.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Axel Meyer
2026-02-26 15:27:10 +00:00
parent 59afabd65a
commit 7f17a40b7c
33 changed files with 1275 additions and 1512 deletions

View File

@@ -0,0 +1,3 @@
# Fetch Claude API usage every 5 minutes (all users with a session key)
# Installed by claude-statusline package
*/5 * * * * root /usr/bin/claude-fetcher 2>/dev/null

View File

@@ -0,0 +1,9 @@
[Desktop Entry]
Type=Application
Name=Claude Usage Widget
Comment=System tray widget showing Claude API token usage
Exec=/usr/bin/claude-widget
Terminal=false
Categories=Utility;
StartupNotify=false
X-GNOME-Autostart-enabled=true

21
packaging/linux/postinstall.sh Executable file
View File

@@ -0,0 +1,21 @@
#!/bin/sh
set -e
CONFIG_DIR="${HOME}/.config/claude-statusline"
mkdir -p "$CONFIG_DIR"
if [ ! -f "$CONFIG_DIR/session-key" ]; then
touch "$CONFIG_DIR/session-key"
chmod 600 "$CONFIG_DIR/session-key"
echo ""
echo "=== Claude Statusline ==="
echo "Paste your claude.ai session key into:"
echo " $CONFIG_DIR/session-key"
echo ""
echo "To get your session key:"
echo " 1. Open claude.ai in your browser"
echo " 2. Open DevTools (F12) → Application → Cookies"
echo " 3. Copy the 'sessionKey' cookie value"
echo "========================="
echo ""
fi

3
packaging/linux/preremove.sh Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/sh
# Kill running widget if any
pkill -f claude-widget 2>/dev/null || true