Compare commits
4 Commits
90ddcdff43
...
6275d5e1dc
| Author | SHA1 | Date | |
|---|---|---|---|
| 6275d5e1dc | |||
| 51b6651b03 | |||
| 36d1e0e842 | |||
| 5226c246e5 |
@@ -4,114 +4,105 @@
|
|||||||
#+STARTUP: content
|
#+STARTUP: content
|
||||||
|
|
||||||
* Overview: The Zero-to-One Experience
|
* Overview: The Zero-to-One Experience
|
||||||
The *Setup & Onboarding* process ensures that users can boot the ~opencortex~ Lisp Machine with zero friction.
|
The *Setup & Onboarding* process ensures that users can boot the ~opencortex~ Lisp Machine with zero friction using a single unified script.
|
||||||
|
|
||||||
|
* 1. The Unified Conductor (opencortex.sh)
|
||||||
|
This script handles the entire lifecycle: Bootstrap, Setup, Boot, and Interaction.
|
||||||
|
|
||||||
* 1. The Unified Entrypoint (opencortex.sh)
|
|
||||||
#+begin_src bash :tangle ../opencortex.sh :shebang "#!/bin/bash"
|
#+begin_src bash :tangle ../opencortex.sh :shebang "#!/bin/bash"
|
||||||
|
# OpenCortex: The Unified Conductor
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
PORT=9105
|
PORT=9105
|
||||||
HOST=${1:-localhost}
|
HOST=${1:-localhost}
|
||||||
|
RED='\033[0;31m'; GREEN='\033[0;32m'; BLUE='\033[0;34m'; YELLOW='\033[0;33m'; NC='\033[0m'
|
||||||
RED='\033[0;31m'
|
|
||||||
GREEN='\033[0;32m'
|
|
||||||
BLUE='\033[0;34m'
|
|
||||||
YELLOW='\033[0;33m'
|
|
||||||
NC='\033[0m'
|
|
||||||
|
|
||||||
command_exists() { command -v "$1" >/dev/null 2>&1; }
|
command_exists() { command -v "$1" >/dev/null 2>&1; }
|
||||||
|
|
||||||
# --- Bootstrap Mode ---
|
# --- 1. BOOTSTRAP (Clone) ---
|
||||||
bootstrap_opencortex() {
|
if [ ! -d ".git" ] && [[ ! "$(pwd)" =~ "opencortex" ]]; then
|
||||||
echo -e "${BLUE}=== OpenCortex: Zero-to-One Bootstrapper ===${NC}"
|
echo -e "${BLUE}=== OpenCortex: Zero-to-One Bootstrapper ===${NC}"
|
||||||
if [ -d ".git" ]; then return; fi
|
|
||||||
TARGET_DIR="opencortex"
|
TARGET_DIR="opencortex"
|
||||||
if [ ! -d "$TARGET_DIR" ]; then
|
if [ ! -d "$TARGET_DIR" ]; then
|
||||||
echo -e "${BLUE}Cloning repository into $TARGET_DIR...${NC}"
|
echo -e "Cloning repository..."
|
||||||
git clone http://10.10.10.201:3001/amr/opencortex.git "$TARGET_DIR"
|
git clone http://10.10.10.201:3001/amr/opencortex.git "$TARGET_DIR"
|
||||||
fi
|
fi
|
||||||
cd "$TARGET_DIR"
|
cd "$TARGET_DIR"
|
||||||
git submodule update --init --recursive
|
git submodule update --init --recursive
|
||||||
echo -e "${GREEN}✓ Repository prepared.${NC}"
|
exec ./opencortex.sh "$@"
|
||||||
./scripts/onboard-baremetal.sh
|
|
||||||
echo -e "${GREEN}✓ Setup phase complete.${NC}"
|
|
||||||
exit 0
|
|
||||||
}
|
|
||||||
|
|
||||||
if [ ! -d ".git" ]; then bootstrap_opencortex; fi
|
|
||||||
|
|
||||||
# 1. Try to drop straight into the CLI chat
|
|
||||||
if command_exists socat && socat - TCP:$HOST:$PORT,connect-timeout=1 2>/dev/null; then
|
|
||||||
echo -e "${BLUE}Connected to autonomous brain at $HOST:$PORT...${NC}"
|
|
||||||
socat READLINE,history=$HOME/.org_agent_history TCP:$HOST:$PORT
|
|
||||||
exit 0
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# 2. Launch
|
# --- 2. SETUP (Deps & Tangle) ---
|
||||||
if [ -f "opencortex.asd" ]; then
|
setup_system() {
|
||||||
if [ -f .env ]; then
|
echo -e "${BLUE}=== OpenCortex: Initializing System ===${NC}"
|
||||||
export \$(grep -v '^#' .env | xargs)
|
|
||||||
fi
|
|
||||||
echo -e "${BLUE}Starting OpenCortex Brain...${NC}"
|
|
||||||
sbcl --non-interactive \
|
|
||||||
--eval "(load \"~/quicklisp/setup.lisp\")" \
|
|
||||||
--eval "(push \"\$(pwd)/\" asdf:*central-registry*)" \
|
|
||||||
--eval "(ql:quickload :opencortex)" \
|
|
||||||
--eval "(opencortex:main)"
|
|
||||||
fi
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
* 2. The Baremetal Path (onboard-baremetal.sh)
|
# Dependencies
|
||||||
#+begin_src bash :tangle ../scripts/onboard-baremetal.sh :shebang "#!/bin/bash"
|
if ! command_exists sbcl; then
|
||||||
# OpenCortex Final-Mile Installer
|
echo -e "Installing dependencies..."
|
||||||
RED='\033[0;31m'; GREEN='\033[0;32m'; BLUE='\033[0;34m'; YELLOW='\033[0;33m'; NC='\033[0m'
|
|
||||||
echo -e "${BLUE}=== OpenCortex: Baremetal Power-User Setup ===${NC}"
|
|
||||||
|
|
||||||
prompt_user() {
|
|
||||||
local prompt="$1"
|
|
||||||
local default="$2"
|
|
||||||
local var_name="$3"
|
|
||||||
local result=""
|
|
||||||
echo -n -e "${YELLOW}$prompt (default: $default): ${NC}" >&2
|
|
||||||
if read -t 5 result; then :; else result="$default"; echo -e "${BLUE} [Auto-Selected: $default]${NC}" >&2; fi
|
|
||||||
val=${result:-$default}
|
|
||||||
eval "$var_name=\"$val\""
|
|
||||||
}
|
|
||||||
|
|
||||||
if ! command -v sbcl >/dev/null 2>&1; then
|
|
||||||
sudo apt-get update && sudo apt-get install -y sbcl emacs git curl socat || true
|
sudo apt-get update && sudo apt-get install -y sbcl emacs git curl socat || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Quicklisp
|
||||||
if [ ! -d "$HOME/quicklisp" ]; then
|
if [ ! -d "$HOME/quicklisp" ]; then
|
||||||
|
echo -e "Installing Quicklisp..."
|
||||||
curl -O https://beta.quicklisp.org/quicklisp.lisp
|
curl -O https://beta.quicklisp.org/quicklisp.lisp
|
||||||
sbcl --non-interactive --load quicklisp.lisp --eval "(quicklisp-quickstart:install)" --eval "(ql-util:without-prompting (ql:add-to-init-file))"
|
sbcl --non-interactive --load quicklisp.lisp --eval "(quicklisp-quickstart:install)" --eval "(ql-util:without-prompting (ql:add-to-init-file))"
|
||||||
rm quicklisp.lisp
|
rm quicklisp.lisp
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -e "${BLUE}Tangling source files...${NC}"
|
# Tangle
|
||||||
|
if [ ! -f "src/package.lisp" ]; then
|
||||||
|
echo -e "Tangling brain from literate source..."
|
||||||
mkdir -p src
|
mkdir -p src
|
||||||
for f in literate/*.org; do
|
for f in literate/*.org; do
|
||||||
emacs --batch --eval "(require 'org)" --eval "(org-babel-tangle-file \"$f\")" >/dev/null 2>&1
|
emacs --batch --eval "(require 'org)" --eval "(org-babel-tangle-file \"$f\")" >/dev/null 2>&1 || true
|
||||||
done
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
if [ ! -f .env ]; then cp .env.example .env; fi
|
# .env
|
||||||
prompt_user "What is your name?" "User" "USER_NAME"
|
if [ ! -f .env ]; then
|
||||||
prompt_user "What shall we name your Assistant?" "OpenCortex" "AGENT_NAME"
|
cp .env.example .env
|
||||||
prompt_user "Select provider (1:Gemini, 2:OpenRouter)" "1" "LLM_CHOICE"
|
sed -i "s/MEMEX_USER=.*/MEMEX_USER=\"User\"/g" .env
|
||||||
|
sed -i "s/MEMEX_ASSISTANT=.*/MEMEX_ASSISTANT=\"OpenCortex\"/g" .env
|
||||||
sed -i "s/MEMEX_USER=.*/MEMEX_USER=\"$USER_NAME\"/g" .env
|
sed -i "s|SKILLS_DIR=.*|SKILLS_DIR=\"$(pwd)/skills\"|g" .env
|
||||||
sed -i "s/MEMEX_ASSISTANT=.*/MEMEX_ASSISTANT=\"$AGENT_NAME\"/g" .env
|
fi
|
||||||
|
|
||||||
ROOT_DIR=$(pwd)
|
|
||||||
sed -i "s|MEMEX_DIR=.*|MEMEX_DIR=\"$(dirname $ROOT_DIR)\"|g" .env
|
|
||||||
sed -i "s|SKILLS_DIR=.*|SKILLS_DIR=\"$ROOT_DIR/skills\"|g" .env
|
|
||||||
|
|
||||||
|
# PATH installation
|
||||||
mkdir -p "$HOME/.local/bin"
|
mkdir -p "$HOME/.local/bin"
|
||||||
ln -sf "$ROOT_DIR/opencortex.sh" "$HOME/.local/bin/opencortex"
|
ln -sf "$(pwd)/opencortex.sh" "$HOME/.local/bin/opencortex"
|
||||||
echo -e "${GREEN}✓ Installed 'opencortex' command to ~/.local/bin${NC}"
|
echo -e "${GREEN}✓ Setup complete. 'opencortex' command ready in PATH.${NC}"
|
||||||
|
}
|
||||||
|
|
||||||
echo -e "\n${GREEN}==============================================${NC}"
|
if [ ! -f "src/package.lisp" ] || [ ! -f .env ]; then
|
||||||
echo -e "${GREEN} OpenCortex Installation Complete! ${NC}"
|
setup_system
|
||||||
echo -e "${GREEN}==============================================${NC}"
|
fi
|
||||||
echo -e "To start: opencortex"
|
|
||||||
|
# --- 3. BOOT (The Brain) ---
|
||||||
|
if [[ "$1" == "--boot" ]]; then
|
||||||
|
echo -e "${BLUE}Starting OpenCortex Brain...${NC}"
|
||||||
|
if [ -f .env ]; then
|
||||||
|
while IFS='=' read -r key value || [ -n "$key" ]; do
|
||||||
|
if [[ $key =~ ^[a-zA-Z_][a-zA-Z0-9_]*$ ]]; then
|
||||||
|
value=$(echo "$value" | sed 's/^"//;s/"$//')
|
||||||
|
export "$key=$value"
|
||||||
|
fi
|
||||||
|
done < .env
|
||||||
|
fi
|
||||||
|
exec sbcl --non-interactive \
|
||||||
|
--eval "(load \"~/quicklisp/setup.lisp\")" \
|
||||||
|
--eval "(push \"$(cd "$(dirname "$0")" && pwd)/\" asdf:*central-registry*)" \
|
||||||
|
--eval "(ql:quickload :opencortex)" \
|
||||||
|
--eval "(opencortex:main)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# --- 4. INTERACT (The Client) ---
|
||||||
|
if command_exists socat && socat - TCP:$HOST:$PORT,connect-timeout=1 2>/dev/null; then
|
||||||
|
socat READLINE,history=$HOME/.org_agent_history TCP:$HOST:$PORT
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo -e "${YELLOW}Brain is offline. Awakening...${NC}"
|
||||||
|
./opencortex.sh --boot > brain.log 2>&1 &
|
||||||
|
sleep 15
|
||||||
|
exec ./opencortex.sh "$@"
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|||||||
102
opencortex.sh
102
opencortex.sh
@@ -1,52 +1,96 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# OpenCortex: The Unified Conductor
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
PORT=9105
|
PORT=9105
|
||||||
HOST=${1:-localhost}
|
HOST=${1:-localhost}
|
||||||
|
RED='\033[0;31m'; GREEN='\033[0;32m'; BLUE='\033[0;34m'; YELLOW='\033[0;33m'; NC='\033[0m'
|
||||||
RED='\033[0;31m'
|
|
||||||
GREEN='\033[0;32m'
|
|
||||||
BLUE='\033[0;34m'
|
|
||||||
YELLOW='\033[0;33m'
|
|
||||||
NC='\033[0m'
|
|
||||||
|
|
||||||
command_exists() { command -v "$1" >/dev/null 2>&1; }
|
command_exists() { command -v "$1" >/dev/null 2>&1; }
|
||||||
|
|
||||||
# --- Bootstrap Mode ---
|
# --- 1. BOOTSTRAP (Clone) ---
|
||||||
bootstrap_opencortex() {
|
if [ ! -d ".git" ] && [[ ! "$(pwd)" =~ "opencortex" ]]; then
|
||||||
echo -e "${BLUE}=== OpenCortex: Zero-to-One Bootstrapper ===${NC}"
|
echo -e "${BLUE}=== OpenCortex: Zero-to-One Bootstrapper ===${NC}"
|
||||||
if [ -d ".git" ]; then return; fi
|
|
||||||
TARGET_DIR="opencortex"
|
TARGET_DIR="opencortex"
|
||||||
if [ ! -d "$TARGET_DIR" ]; then
|
if [ ! -d "$TARGET_DIR" ]; then
|
||||||
echo -e "${BLUE}Cloning repository into $TARGET_DIR...${NC}"
|
echo -e "Cloning repository..."
|
||||||
git clone http://10.10.10.201:3001/amr/opencortex.git "$TARGET_DIR"
|
git clone http://10.10.10.201:3001/amr/opencortex.git "$TARGET_DIR"
|
||||||
fi
|
fi
|
||||||
cd "$TARGET_DIR"
|
cd "$TARGET_DIR"
|
||||||
git submodule update --init --recursive
|
git submodule update --init --recursive
|
||||||
echo -e "${GREEN}✓ Repository prepared.${NC}"
|
exec ./opencortex.sh "$@"
|
||||||
./scripts/onboard-baremetal.sh
|
fi
|
||||||
echo -e "${GREEN}✓ Setup phase complete.${NC}"
|
|
||||||
exit 0
|
# --- 2. SETUP (Deps & Tangle) ---
|
||||||
|
setup_system() {
|
||||||
|
echo -e "${BLUE}=== OpenCortex: Initializing System ===${NC}"
|
||||||
|
|
||||||
|
# Dependencies
|
||||||
|
if ! command_exists sbcl; then
|
||||||
|
echo -e "Installing dependencies..."
|
||||||
|
sudo apt-get update && sudo apt-get install -y sbcl emacs git curl socat || true
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Quicklisp
|
||||||
|
if [ ! -d "$HOME/quicklisp" ]; then
|
||||||
|
echo -e "Installing Quicklisp..."
|
||||||
|
curl -O https://beta.quicklisp.org/quicklisp.lisp
|
||||||
|
sbcl --non-interactive --load quicklisp.lisp --eval "(quicklisp-quickstart:install)" --eval "(ql-util:without-prompting (ql:add-to-init-file))"
|
||||||
|
rm quicklisp.lisp
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Tangle
|
||||||
|
if [ ! -f "src/package.lisp" ]; then
|
||||||
|
echo -e "Tangling brain from literate source..."
|
||||||
|
mkdir -p src
|
||||||
|
for f in literate/*.org; do
|
||||||
|
emacs --batch --eval "(require 'org)" --eval "(org-babel-tangle-file \"$f\")" >/dev/null 2>&1 || true
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
# .env
|
||||||
|
if [ ! -f .env ]; then
|
||||||
|
cp .env.example .env
|
||||||
|
sed -i "s/MEMEX_USER=.*/MEMEX_USER=\"User\"/g" .env
|
||||||
|
sed -i "s/MEMEX_ASSISTANT=.*/MEMEX_ASSISTANT=\"OpenCortex\"/g" .env
|
||||||
|
sed -i "s|SKILLS_DIR=.*|SKILLS_DIR=\"$(pwd)/skills\"|g" .env
|
||||||
|
fi
|
||||||
|
|
||||||
|
# PATH installation
|
||||||
|
mkdir -p "$HOME/.local/bin"
|
||||||
|
ln -sf "$(pwd)/opencortex.sh" "$HOME/.local/bin/opencortex"
|
||||||
|
echo -e "${GREEN}✓ Setup complete. 'opencortex' command ready in PATH.${NC}"
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ ! -d ".git" ]; then bootstrap_opencortex; fi
|
if [ ! -f "src/package.lisp" ] || [ ! -f .env ]; then
|
||||||
|
setup_system
|
||||||
|
fi
|
||||||
|
|
||||||
# 1. Try to drop straight into the CLI chat
|
# --- 3. BOOT (The Brain) ---
|
||||||
|
if [[ "$1" == "--boot" ]]; then
|
||||||
|
echo -e "${BLUE}Starting OpenCortex Brain...${NC}"
|
||||||
|
if [ -f .env ]; then
|
||||||
|
while IFS='=' read -r key value || [ -n "$key" ]; do
|
||||||
|
if [[ $key =~ ^[a-zA-Z_][a-zA-Z0-9_]*$ ]]; then
|
||||||
|
value=$(echo "$value" | sed 's/^"//;s/"$//')
|
||||||
|
export "$key=$value"
|
||||||
|
fi
|
||||||
|
done < .env
|
||||||
|
fi
|
||||||
|
exec sbcl --non-interactive \
|
||||||
|
--eval "(load \"~/quicklisp/setup.lisp\")" \
|
||||||
|
--eval "(push \"$(cd "$(dirname "$0")" && pwd)/\" asdf:*central-registry*)" \
|
||||||
|
--eval "(ql:quickload :opencortex)" \
|
||||||
|
--eval "(opencortex:main)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# --- 4. INTERACT (The Client) ---
|
||||||
if command_exists socat && socat - TCP:$HOST:$PORT,connect-timeout=1 2>/dev/null; then
|
if command_exists socat && socat - TCP:$HOST:$PORT,connect-timeout=1 2>/dev/null; then
|
||||||
echo -e "${BLUE}Connected to autonomous brain at $HOST:$PORT...${NC}"
|
|
||||||
socat READLINE,history=$HOME/.org_agent_history TCP:$HOST:$PORT
|
socat READLINE,history=$HOME/.org_agent_history TCP:$HOST:$PORT
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# 2. Launch
|
echo -e "${YELLOW}Brain is offline. Awakening...${NC}"
|
||||||
if [ -f "opencortex.asd" ]; then
|
./opencortex.sh --boot > brain.log 2>&1 &
|
||||||
if [ -f .env ]; then
|
sleep 15
|
||||||
export \$(grep -v '^#' .env | xargs)
|
exec ./opencortex.sh "$@"
|
||||||
fi
|
|
||||||
echo -e "${BLUE}Starting OpenCortex Brain...${NC}"
|
|
||||||
sbcl --non-interactive \
|
|
||||||
--eval "(load \"~/quicklisp/setup.lisp\")" \
|
|
||||||
--eval "(push \"\$(pwd)/\" asdf:*central-registry*)" \
|
|
||||||
--eval "(ql:quickload :opencortex)" \
|
|
||||||
--eval "(opencortex:main)"
|
|
||||||
fi
|
|
||||||
|
|||||||
@@ -14,22 +14,28 @@ prompt_user() {
|
|||||||
eval "$var_name=\"$val\""
|
eval "$var_name=\"$val\""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# 1. Dependencies
|
||||||
if ! command -v sbcl >/dev/null 2>&1; then
|
if ! command -v sbcl >/dev/null 2>&1; then
|
||||||
|
echo -e "${BLUE}Installing dependencies...${NC}"
|
||||||
sudo apt-get update && sudo apt-get install -y sbcl emacs git curl socat || true
|
sudo apt-get update && sudo apt-get install -y sbcl emacs git curl socat || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# 2. Quicklisp
|
||||||
if [ ! -d "$HOME/quicklisp" ]; then
|
if [ ! -d "$HOME/quicklisp" ]; then
|
||||||
curl -O https://beta.quicklisp.org/quicklisp.lisp
|
curl -O https://beta.quicklisp.org/quicklisp.lisp
|
||||||
sbcl --non-interactive --load quicklisp.lisp --eval "(quicklisp-quickstart:install)" --eval "(ql-util:without-prompting (ql:add-to-init-file))"
|
sbcl --non-interactive --load quicklisp.lisp --eval "(quicklisp-quickstart:install)" --eval "(ql-util:without-prompting (ql:add-to-init-file))"
|
||||||
rm quicklisp.lisp
|
rm quicklisp.lisp
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# 3. Tangling
|
||||||
echo -e "${BLUE}Tangling source files...${NC}"
|
echo -e "${BLUE}Tangling source files...${NC}"
|
||||||
mkdir -p src
|
mkdir -p src
|
||||||
for f in literate/*.org; do
|
for f in literate/*.org; do
|
||||||
|
echo " - Tangling $f"
|
||||||
emacs --batch --eval "(require 'org)" --eval "(org-babel-tangle-file \"$f\")" >/dev/null 2>&1
|
emacs --batch --eval "(require 'org)" --eval "(org-babel-tangle-file \"$f\")" >/dev/null 2>&1
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# 4. Config
|
||||||
if [ ! -f .env ]; then cp .env.example .env; fi
|
if [ ! -f .env ]; then cp .env.example .env; fi
|
||||||
prompt_user "What is your name?" "User" "USER_NAME"
|
prompt_user "What is your name?" "User" "USER_NAME"
|
||||||
prompt_user "What shall we name your Assistant?" "OpenCortex" "AGENT_NAME"
|
prompt_user "What shall we name your Assistant?" "OpenCortex" "AGENT_NAME"
|
||||||
@@ -38,15 +44,16 @@ prompt_user "Select provider (1:Gemini, 2:OpenRouter)" "1" "LLM_CHOICE"
|
|||||||
sed -i "s/MEMEX_USER=.*/MEMEX_USER=\"$USER_NAME\"/g" .env
|
sed -i "s/MEMEX_USER=.*/MEMEX_USER=\"$USER_NAME\"/g" .env
|
||||||
sed -i "s/MEMEX_ASSISTANT=.*/MEMEX_ASSISTANT=\"$AGENT_NAME\"/g" .env
|
sed -i "s/MEMEX_ASSISTANT=.*/MEMEX_ASSISTANT=\"$AGENT_NAME\"/g" .env
|
||||||
|
|
||||||
ROOT_DIR=$(pwd)
|
# 5. Path Alignment
|
||||||
sed -i "s|MEMEX_DIR=.*|MEMEX_DIR=\"$(dirname $ROOT_DIR)\"|g" .env
|
INSTALL_DIR="$(cd "$(dirname "$0")/.." && pwd)"
|
||||||
sed -i "s|SKILLS_DIR=.*|SKILLS_DIR=\"$ROOT_DIR/skills\"|g" .env
|
sed -i "s|MEMEX_DIR=.*|MEMEX_DIR=\"$(dirname "$INSTALL_DIR")\"|g" .env
|
||||||
|
sed -i "s|SKILLS_DIR=.*|SKILLS_DIR=\"$INSTALL_DIR/skills\"|g" .env
|
||||||
|
|
||||||
mkdir -p "$HOME/.local/bin"
|
mkdir -p "$HOME/.local/bin"
|
||||||
ln -sf "$ROOT_DIR/opencortex.sh" "$HOME/.local/bin/opencortex"
|
ln -sf "$INSTALL_DIR/opencortex.sh" "$HOME/.local/bin/opencortex"
|
||||||
echo -e "${GREEN}✓ Installed 'opencortex' command to ~/.local/bin${NC}"
|
echo -e "${GREEN}✓ Installed 'opencortex' command to ~/.local/bin${NC}"
|
||||||
|
|
||||||
echo -e "\n${GREEN}==============================================${NC}"
|
echo -e "\n${GREEN}==============================================${NC}"
|
||||||
echo -e "${GREEN} OpenCortex Installation Complete! ${NC}"
|
echo -e " OpenCortex Installation Complete! "
|
||||||
echo -e "${GREEN}==============================================${NC}"
|
echo -e "==============================================${NC}"
|
||||||
echo -e "To start: opencortex"
|
echo -e "To start: opencortex"
|
||||||
|
|||||||
Reference in New Issue
Block a user