- Reorganized server management code: - Moved server_cli.py -> deploy/docker/cnode_cli.py - Moved server_manager.py -> deploy/docker/server_manager.py - Created fast Python-based installation (0.1s startup): - deploy/installer/cnode_pkg/ - Standalone package - deploy/installer/install-cnode.sh - Local installer - deploy/installer/deploy.sh - Remote installer for users - Added backward compatibility: - crawl4ai/cli.py: 'crwl server' redirects to 'cnode' - Updated tests to match new CLI structure (12/12 passing) - Automated sync workflow: - .githooks/pre-commit - Auto-syncs source to package - setup-hooks.sh - One-time setup for contributors - deploy/installer/sync-cnode.sh - Manual sync script Performance: - Startup time: 0.1s (49x faster than PyInstaller) - Size: ~50KB wrapper vs 8.8MB binary Commands: cnode start [--replicas N] # Start server/cluster cnode status # Check status cnode scale N # Scale replicas cnode logs [-f] # View logs cnode stop # Stop server
25 lines
720 B
Bash
Executable File
25 lines
720 B
Bash
Executable File
#!/bin/bash
|
|
# Setup Git hooks for cnode auto-sync
|
|
# Run this once after cloning the repo: ./setup-hooks.sh
|
|
|
|
set -e
|
|
|
|
echo "🔧 Setting up Git hooks..."
|
|
|
|
# Configure Git to use .githooks directory
|
|
git config core.hooksPath .githooks
|
|
|
|
echo "✅ Git hooks configured!"
|
|
echo ""
|
|
echo "Hooks installed:"
|
|
echo " • pre-commit: Auto-syncs cnode source → package when committing"
|
|
echo ""
|
|
echo "What this means:"
|
|
echo " ✅ Edit deploy/docker/cnode_cli.py"
|
|
echo " ✅ Run: git add deploy/docker/cnode_cli.py"
|
|
echo " ✅ Run: git commit -m \"update cnode\""
|
|
echo " ✅ Hook automatically syncs to deploy/installer/cnode_pkg/"
|
|
echo " ✅ Synced files are auto-staged in the same commit"
|
|
echo ""
|
|
echo "You're all set! 🚀"
|