Add devcontainer configuration for automatic bd setup

- Create .devcontainer/devcontainer.json with Go 1.23 environment
- Add setup.sh to build bd from source and install git hooks
- Add devcontainer README with documentation
- Update main README to mention devcontainer support
- Resolves bd-ry1u and GitHub issue #229
This commit is contained in:
Steve Yegge
2025-11-05 15:09:48 -08:00
9 changed files with 395 additions and 116 deletions

33
.devcontainer/setup.sh Normal file
View File

@@ -0,0 +1,33 @@
#!/bin/bash
set -e
echo "🔧 Building bd from source..."
go build -o bd ./cmd/bd
echo "📦 Installing bd globally..."
sudo mv bd /usr/local/bin/bd
sudo chmod +x /usr/local/bin/bd
echo "✅ Verifying bd installation..."
bd --version
echo "🎯 Initializing bd (non-interactive)..."
if [ ! -d .beads ]; then
bd init --quiet
else
echo "bd already initialized"
fi
echo "🪝 Installing git hooks..."
if [ -f examples/git-hooks/install.sh ]; then
bash examples/git-hooks/install.sh
echo "Git hooks installed successfully"
else
echo "⚠️ Git hooks installer not found, skipping..."
fi
echo "📚 Installing Go dependencies..."
go mod download
echo "✨ Development environment ready!"
echo "Run 'bd ready' to see available tasks"