Skip to content

Instantly share code, notes, and snippets.

@dhkts1
dhkts1 / statusline-command.sh
Last active August 24, 2025 07:02
statusline command for Claude Code
#!/bin/bash
# Make sure this file is executable: chmod +x ~/.claude/statusline-command.sh
# Claude Code statusline script
# Reads JSON input from stdin and outputs a formatted status line to stdout
#
# Add to your ~/.claude/settings.json
#
# "statusLine": {
# "type": "command",
find() {
if [[ -n "$CLAUDE_TOOL_NAME" ]] || [[ -n "$CLAUDE_FILE_PATHS" ]]; then
echo "# Claude Code: excluding unwanted directories" >&2
bfs -exclude \( \
-name node_modules \
-o -name .venv \
-o -name venv \
-o -name __pycache__ \
-o -name .git \
-o -name .history \
{
"schemaVersion": 1,
"badges": [
{
"label": "pre-commit",
"message": "passing",
"color": "green",
"namedLogo": "github",
"description": "Pre-commit hooks status"
},