-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.sh
More file actions
77 lines (65 loc) · 2.04 KB
/
setup.sh
File metadata and controls
77 lines (65 loc) · 2.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Uxarion CLI Setup Script
# This script helps configure the environment and install dependencies
set -e
echo "🛡️ Uxarion CLI Setup"
echo "===================="
# Check if we're in the right directory
if [ ! -f "pyproject.toml" ]; then
echo "❌ Error: Please run this script from the Uxarion-CLI directory"
exit 1
fi
# Create virtual environment if it doesn't exist
if [ ! -d ".venv" ]; then
echo "📦 Creating virtual environment..."
python3 -m venv .venv
fi
# Activate virtual environment
echo "🔄 Activating virtual environment..."
source .venv/bin/activate
# Upgrade pip
echo "⬆️ Upgrading pip..."
pip install --upgrade pip --quiet
# Install CLI package
echo "📥 Installing Uxarion CLI..."
pip install -e . --quiet
# Install optional dependencies
echo "🔧 Installing optional extras..."
read -p "Install OpenAI package explicitly? (y/N): " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
pip install openai --quiet
echo "✅ OpenAI package installed"
fi
read -p "Install enhanced UI support (prompt_toolkit)? (y/N): " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
pip install prompt_toolkit --quiet
echo "✅ Enhanced UI support installed"
fi
# Create .env file if it doesn't exist
if [ ! -f ".env" ]; then
echo "📝 Setting up environment file..."
cp .env.example .env
echo "✅ Created .env file from template"
echo "📋 Please edit .env file to add your API keys"
else
echo "ℹ️ .env file already exists"
fi
echo
echo "🎉 Setup completed!"
echo
echo "Next steps:"
echo "1. Activate the virtual environment:"
echo " source .venv/bin/activate"
echo
echo "2. Add or replace your OpenAI key:"
echo " uxarion --addKey"
echo
echo "3. Use one command name for all modes:"
echo " uxarion # interactive chat"
echo " uxarion --prompt \"quick recon\" --max-commands 3"
echo " uxarion --prompt \"quick recon\" --chat-after"
echo
echo "🔒 For security testing, make sure you have permission to test your targets!"