Skip to content

Open source AI coding agent. Designed for large projects and real world tasks.

updates to dev.sh scripts coinciding with new docs... no longer use sudo in app/cli/dev.sh -- instead the whole script should be run with sudo

Dane Schneider304c75e50e9f
diff --git a/app/cli/dev.sh b/app/cli/dev.sh
index d0a767c3..8ec7b9d9 100755
--- a/app/cli/dev.sh
+++ b/app/cli/dev.sh
@@ -1,12 +1,12 @@
-#!/bin/bash
+#!/usr/bin/env bash
OUT="${PLANDEX_DEV_CLI_OUT_DIR:-/usr/local/bin}"
NAME="${PLANDEX_DEV_CLI_NAME:-plandex-dev}"
ALIAS="${PLANDEX_DEV_CLI_ALIAS:-pdxd}"
# Double quote to prevent globbing and word splitting.
-sudo go build -o "$NAME" &&
- sudo rm -f "$OUT"/"$NAME" &&
- sudo cp "$NAME" "$OUT"/"$NAME" &&
- sudo ln -sf "$OUT"/"$NAME" "$OUT"/"$ALIAS" &&
+go build -o "$NAME" &&
+ rm -f "$OUT"/"$NAME" &&
+ cp "$NAME" "$OUT"/"$NAME" &&
+ ln -sf "$OUT"/"$NAME" "$OUT"/"$ALIAS" &&
echo built "$NAME" cli and added "$ALIAS" alias to "$OUT"
diff --git a/app/scripts/dev.sh b/app/scripts/dev.sh
index 083e5c5f..96cc23c3 100755
--- a/app/scripts/dev.sh
+++ b/app/scripts/dev.sh
@@ -1,4 +1,4 @@
-#!/bin/env bash
+#!/usr/bin/env bash
# Detect zsh and trigger it if its the shell
if [ -n "$ZSH_VERSION" ]; then
@@ -7,6 +7,12 @@ if [ -n "$ZSH_VERSION" ]; then
zsh -c "source ~/.zshrc && $*"
fi
+# Get the directory of the script
+SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+
+# Change to the script directory
+cd "$SCRIPT_DIR" || exit 1
+
# Detect if reflex is installed and install it if not
if ! [ -x "$(command -v reflex)" ]; then
@@ -30,6 +36,11 @@ trap terminate SIGTERM SIGINT
(cd .. && cd cli && ./dev.sh)
+cd ../
+
+echo "PWD:"
+pwd
+
reflex -r '^(cli|shared)/.*\.(go|mod|sum)$' -- sh -c 'cd cli && ./dev.sh' &
pid1=$!