codeflash-agent/.claude/hooks/status-line.sh

22 lines
549 B
Bash
Raw Normal View History

2026-04-09 08:36:01 +00:00
#!/usr/bin/env bash
# Status line: Show active codeflash org/project.
cd "$CLAUDE_PROJECT_DIR" 2>/dev/null || exit 0
CF_DIR="$CLAUDE_PROJECT_DIR/.codeflash"
[ -d "$CF_DIR" ] || exit 0
# Find the org/project directory (first one found)
for ORG_DIR in "$CF_DIR"/*/; do
[ -d "$ORG_DIR" ] || continue
ORG=$(basename "$ORG_DIR")
for PROJ_DIR in "$ORG_DIR"/*/; do
[ -d "$PROJ_DIR" ] || continue
PROJECT=$(basename "$PROJ_DIR")
echo "codeflash-agent is working in: $ORG/$PROJECT"
exit 0
done
done
exit 0