From cb658d3092514b405648855394ccf7bbd42e2915 Mon Sep 17 00:00:00 2001 From: Amr Gharbeia Date: Fri, 17 Apr 2026 14:12:06 -0400 Subject: [PATCH] feat: Add user and agent name prompts to interactive setup --- literate/setup.org | 13 ++++++++++++- opencortex.sh | 13 ++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/literate/setup.org b/literate/setup.org index dfbb33e..ff76370 100644 --- a/literate/setup.org +++ b/literate/setup.org @@ -31,6 +31,17 @@ setup_system() { cd "$SCRIPT_DIR" if [ ! -f .env ]; then cp .env.example .env + + echo -e "\n${YELLOW}--- Identity Configuration ---${NC}" + echo "Let's personalize your OpenCortex experience." + read -p "Your Name [User]: " user_name + user_name=${user_name:-User} + sed -i "s|MEMEX_USER=.*|MEMEX_USER=\"$user_name\"|" .env + + read -p "Agent Name [OpenCortex]: " agent_name + agent_name=${agent_name:-OpenCortex} + sed -i "s|MEMEX_ASSISTANT=.*|MEMEX_ASSISTANT=\"$agent_name\"|" .env + echo -e "\n${YELLOW}--- LLM Configuration ---${NC}" echo "You can enter your LLM API keys now, or press Enter to skip and configure them later." read -p "Gemini API Key: " gemini_key @@ -65,7 +76,7 @@ setup_system() { done mkdir -p "$HOME/.local/bin" ln -sf "$SCRIPT_DIR/opencortex.sh" "$HOME/.local/bin/opencortex" - echo -e "${GREEN}✓ Setup complete. You can now run 'opencortex tui\.${NC}" + echo -e "${GREEN}✓ Setup complete. You can now run 'opencortex tui'.${NC}" } if [ ! -f "$SCRIPT_DIR/src/package.lisp" ] || [ ! -f "$SCRIPT_DIR/.env" ]; then diff --git a/opencortex.sh b/opencortex.sh index 6622972..55985d8 100755 --- a/opencortex.sh +++ b/opencortex.sh @@ -22,6 +22,17 @@ setup_system() { cd "$SCRIPT_DIR" if [ ! -f .env ]; then cp .env.example .env + + echo -e "\n${YELLOW}--- Identity Configuration ---${NC}" + echo "Let's personalize your OpenCortex experience." + read -p "Your Name [User]: " user_name + user_name=${user_name:-User} + sed -i "s|MEMEX_USER=.*|MEMEX_USER=\"$user_name\"|" .env + + read -p "Agent Name [OpenCortex]: " agent_name + agent_name=${agent_name:-OpenCortex} + sed -i "s|MEMEX_ASSISTANT=.*|MEMEX_ASSISTANT=\"$agent_name\"|" .env + echo -e "\n${YELLOW}--- LLM Configuration ---${NC}" echo "You can enter your LLM API keys now, or press Enter to skip and configure them later." read -p "Gemini API Key: " gemini_key @@ -56,7 +67,7 @@ setup_system() { done mkdir -p "$HOME/.local/bin" ln -sf "$SCRIPT_DIR/opencortex.sh" "$HOME/.local/bin/opencortex" - echo -e "${GREEN}✓ Setup complete. You can now run 'opencortex tui\.${NC}" + echo -e "${GREEN}✓ Setup complete. You can now run 'opencortex tui'.${NC}" } if [ ! -f "$SCRIPT_DIR/src/package.lisp" ] || [ ! -f "$SCRIPT_DIR/.env" ]; then