beads/examples/git-hooks/pre-commit
Steve Yegge 19cd7d1887 Prepare for public launch: comprehensive examples, docs, and tooling
This commit adds everything needed for a successful public launch:

**New Documentation**
- SECURITY.md: Security policy and best practices
- CLAUDE.md: Complete agent instructions for contributing to beads
- Enhanced README with pain points, FAQ, troubleshooting sections
- Added Taskwarrior to comparison table with detailed explanation

**Installation**
- install.sh: One-liner installation script with platform detection
- Auto-detects OS/arch, tries go install, falls back to building from source
- Updated README with prominent installation instructions

**Examples** (2,268+ lines of working code)
- examples/python-agent/: Full Python implementation of agent workflow
- examples/bash-agent/: Shell script agent with colorized output
- examples/git-hooks/: Pre-commit, post-merge, post-checkout hooks with installer
- examples/claude-desktop-mcp/: Documentation for future MCP server integration
- examples/README.md: Overview of all examples

**Dogfooding**
- Initialized bd in beads project itself (.beads/beads.db)
- Created issues for roadmap (MCP server, migrations, demos, 1.0 milestone)
- Exported to .beads/issues.jsonl for git versioning

**Visual Assets**
- Added screenshot showing agent using beads to README intro
- Placed in .github/images/ following GitHub conventions

This addresses all launch readiness items:
✅ Security policy
✅ Working agent examples (Python, Bash)
✅ Git hooks for automation
✅ FAQ addressing skeptics
✅ Troubleshooting common issues
✅ Easy installation
✅ Dogfooding our own tool
✅ Pain points that create urgency

Ready to ship! 🚀

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-12 11:25:29 -07:00

33 lines
811 B
Bash
Executable file

#!/usr/bin/env bash
#
# Beads pre-commit hook
# Automatically exports SQLite database to JSONL before committing
#
# Install: cp examples/git-hooks/pre-commit .git/hooks/pre-commit && chmod +x .git/hooks/pre-commit
set -e
# Check if bd is installed
if ! command -v bd &> /dev/null; then
echo "Warning: bd not found in PATH, skipping export"
exit 0
fi
# Check if .beads directory exists
if [[ ! -d .beads ]]; then
# No beads database, nothing to do
exit 0
fi
# Export issues to JSONL
echo "🔗 Exporting beads issues to JSONL..."
if bd export --format=jsonl -o .beads/issues.jsonl 2>/dev/null; then
# Add the JSONL file to the commit
git add .beads/issues.jsonl
echo "✓ Beads issues exported and staged"
else
echo "Warning: bd export failed, continuing anyway"
fi
exit 0