Built by a PhD whose memory was failing, whose diet was a mess, and whose anxiety had its own agenda. Most second brain tools ignore the fact that your brain doesn't work in isolation: your body and your mental health are part of the system too. This crew handles all three: knowledge, nutrition, and mental wellness.
Shell
#!/usr/bin/env bash
# List notes currently in the inbox
# Usage: vault-inbox [--count]
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
VAULT_DIR="$(cd "$SCRIPT_DIR/../.." && pwd)"
INBOX="$VAULT_DIR/00-Inbox"
if [[ ! -d "$INBOX" ]]; then
if [[ "${1:-}" == "--count" ]]; then
echo "0"
else
echo "No inbox directory found at $INBOX"
fi
exit 0
fi
if [[ "${1:-}" == "--count" ]]; then
find "$INBOX" -name "*.md" -not -path "*/.*" 2>/dev/null | wc -l | tr -d ' '
else
find "$INBOX" -name "*.md" -not -path "*/.*" 2>/dev/null | while read -r f; do
mod=$(stat -f "%Sm" -t "%Y-%m-%d %H:%M" "$f" 2>/dev/null || stat -c "%y" "$f" 2>/dev/null | cut -c1-16 || echo "?")
name=$(basename "$f" .md)
echo " $mod $name"
done | sort -r
fi