Shell
#!/bin/bash
# ═══════════════════════════════════════════════════════════════════════════════
# ID8Pipeline CLI - Quick access to pipeline commands
# ═══════════════════════════════════════════════════════════════════════════════
#
# Usage:
# pipeline - Show current status
# pipeline status - Show full status
# pipeline teach - Get teaching for current stage
# pipeline advance - Move to next stage
# pipeline init [name] - Start new pipeline
# pipeline decision "..." - Log a decision
# pipeline override N why - Skip a stage with reason
# pipeline staleness - Check all projects for staleness
# pipeline insights - Generate pattern insights
# ═══════════════════════════════════════════════════════════════════════════════
PIPELINE_DIR="$HOME/.claude/hooks/pipeline"
case "${1:-status}" in
status|"")
"$PIPELINE_DIR/pipeline-brain.sh" status
;;
teach)
"$PIPELINE_DIR/pipeline-brain.sh" teach
;;
advance|next|checkpoint)
"$PIPELINE_DIR/pipeline-progress-updater.sh" advance
;;
init)
"$PIPELINE_DIR/pipeline-progress-updater.sh" init "${2:-}"
;;
decision)
"$PIPELINE_DIR/pipeline-progress-updater.sh" decision "${2:-}"
;;
override|skip)
"$PIPELINE_DIR/pipeline-progress-updater.sh" override "${2:-}" "${3:-}"
;;
staleness|check)
"$PIPELINE_DIR/staleness-monitor.sh"
;;
insights|patterns)
"$PIPELINE_DIR/pipeline-patterns.sh" insights
;;
briefing)
"$PIPELINE_DIR/pipeline-brain.sh" briefing
;;
tip)
"$PIPELINE_DIR/pipeline-patterns.sh" tip "${2:-1}"
;;
log)
"$PIPELINE_DIR/pipeline-brain.sh" log "${2:-Activity}"
;;
msg-setup)
"$PIPELINE_DIR/pipeline-messenger.sh" setup
;;
msg|notify)
"$PIPELINE_DIR/pipeline-messenger.sh" notify "${2:-}"
;;
msg-test)
"$PIPELINE_DIR/pipeline-messenger.sh" test
;;
help|--help|-h)
echo "ID8Pipeline CLI"
echo ""
echo "Usage: pipeline [command] [args]"
echo ""
echo "Commands:"
echo " status Show current pipeline status (default)"
echo " teach Get teaching for current stage"
echo " advance Move to next stage"
echo " init [name] Initialize new pipeline"
echo " decision \"...\" Log a decision"
echo " override N why Skip stage N with reason"
echo " staleness Check all projects for staleness"
echo " insights Generate pattern insights"
echo " briefing Full session briefing"
echo " tip [stage] Get personalized tip"
echo " log \"...\" Log activity"
echo ""
echo "Messaging:"
echo " msg-setup Configure iMessage notifications"
echo " msg \"text\" Send notification to your phone"
echo " msg-test Send test message"
echo ""
;;
*)
echo "Unknown command: $1"
echo "Run 'pipeline help' for usage"
exit 1
;;
esac