Transform Ralph into global command system
Major architectural change to make Ralph available as global commands: 🌟 New Global Installation System: - Add install.sh script for global installation to ~/.local/bin - Creates ralph, ralph-monitor, ralph-setup global commands - Installs templates and scripts to ~/.ralph/ directory - Automatic dependency checking and PATH configuration 🚀 Enhanced User Experience: - ralph-setup my-project (run from anywhere, no directory constraints) - ralph --monitor (start from any project directory) - ralph-monitor (global monitoring command) - No more ../ralph_loop.sh relative path requirements 🔧 Improved Architecture: - Global template system in ~/.ralph/templates/ - Smart path detection (global commands vs local scripts) - Maintains backward compatibility during transition - Clean separation of installation vs project files 📚 Updated Documentation: - All examples now use global commands (ralph vs ../ralph_loop.sh) - Clear installation instructions with ./install.sh - Global command reference in CLAUDE.md - Streamlined Quick Start workflow This makes Ralph much more professional and user-friendly by eliminating directory structure requirements and providing standard Unix command experience.
This commit is contained in:
parent
d81519584f
commit
6d64be9b01
4 changed files with 332 additions and 36 deletions
|
|
@ -49,7 +49,7 @@ check_tmux_available() {
|
|||
# Setup tmux session with monitor
|
||||
setup_tmux_session() {
|
||||
local session_name="ralph-$(date +%s)"
|
||||
local script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
local ralph_home="${RALPH_HOME:-$HOME/.ralph}"
|
||||
|
||||
log_status "INFO" "Setting up tmux session: $session_name"
|
||||
|
||||
|
|
@ -60,10 +60,20 @@ setup_tmux_session() {
|
|||
tmux split-window -h -t "$session_name" -c "$(pwd)"
|
||||
|
||||
# Start monitor in the right pane
|
||||
tmux send-keys -t "$session_name:0.1" "'$script_dir/ralph_monitor.sh'" Enter
|
||||
if command -v ralph-monitor &> /dev/null; then
|
||||
tmux send-keys -t "$session_name:0.1" "ralph-monitor" Enter
|
||||
else
|
||||
tmux send-keys -t "$session_name:0.1" "'$ralph_home/ralph_monitor.sh'" Enter
|
||||
fi
|
||||
|
||||
# Start ralph loop in the left pane (exclude tmux flag to avoid recursion)
|
||||
local ralph_cmd="'$script_dir/ralph_loop.sh'"
|
||||
local ralph_cmd
|
||||
if command -v ralph &> /dev/null; then
|
||||
ralph_cmd="ralph"
|
||||
else
|
||||
ralph_cmd="'$ralph_home/ralph_loop.sh'"
|
||||
fi
|
||||
|
||||
if [[ "$MAX_CALLS_PER_HOUR" != "100" ]]; then
|
||||
ralph_cmd="$ralph_cmd --calls $MAX_CALLS_PER_HOUR"
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue