Skip to content

Instantly share code, notes, and snippets.

View risenowrise's full-sized avatar

RISE risenowrise

  • Lisbon, Portugal
View GitHub Profile
@superjax
superjax / incognito_claude.sh
Last active January 22, 2026 16:39
Run a claude code command without it showing up in claude history
#!/bin/bash
# Run claude and capture both the message and session ID
all_args="$@"
OUTPUT=$(claude -p "$all_args" --output-format json)
# Extract the commit message and session ID
# Claude outputs different schemas depending on whether "vebose" output is on.
# Try basic format (simple dict) first, fall back to "verbose" format (array of dicts with type=="result")
RESULT=$(echo "$OUTPUT" | jq -r '.result // empty' 2>/dev/null)