#!/bin/bash # Add a new command to existing CLI set -euo pipefail if [ $# -lt 2 ]; then echo "Usage: $0 [category]" echo "Example: $0 myapp backup Deploy" exit 1 fi APP_NAME="$1" COMMAND_NAME="$2" CATEGORY="${3:-General}" if [ ! -d "$APP_NAME" ]; then echo "Error: Directory $APP_NAME not found" exit 1 fi cd "$APP_NAME" # Create command implementation FUNC_NAME="${COMMAND_NAME}Command" cat >> commands.go < /tmp/new_command.txt <