#!/bin/bash
# Create a new project from template

if [ -z "$1" ]; then
    echo "Usage: new-project.sh <project-name>"
    exit 1
fi

PROJECT_NAME="$1"
PROJECT_DIR="/home/wdjones/.openclaw/workspace/projects/$PROJECT_NAME"
TEMPLATE="/home/wdjones/.openclaw/workspace/templates/project.md"

if [ -d "$PROJECT_DIR" ]; then
    echo "Project '$PROJECT_NAME' already exists"
    exit 1
fi

mkdir -p "$PROJECT_DIR"
sed "s/{Project Name}/$PROJECT_NAME/g" "$TEMPLATE" > "$PROJECT_DIR/README.md"
echo "Created project: $PROJECT_DIR"
