Skip to content

Instantly share code, notes, and snippets.

@pybe
pybe / session-log
Created January 21, 2026 13:56
session-log: Pretty-print Claude Code JSONL session logs
#!/bin/bash
# session-log - Pretty-print Claude Code JSONL session logs
#
# Usage:
# session-log [OPTIONS] [FILE]
#
# Arguments:
# FILE Path to a Claude Code .jsonl session file
# If omitted, shows the most recent session
#
@pybe
pybe / patch-termux-hooks
Last active January 8, 2026 17:06
Patch Claude Code cli.js to enable hooks on Termux/Android (PARTIAL FIX - PreToolUse known issue)
#!/usr/bin/env bash
# Claude Code Termux/Android Patch Script
# Fixes hooks not firing on Android by patching platform detection and temp paths
#
# Usage:
# patch-termux-hooks # Apply all patches (recommended)
# patch-termux-hooks --platform-only # Only platform detection patch
# patch-termux-hooks --tmp-only # Only /tmp path patch
# patch-termux-hooks --rollback # Restore from backup
# patch-termux-hooks --help # Show this help