-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathstart.sh
More file actions
executable file
·47 lines (38 loc) · 1.12 KB
/
Copy pathstart.sh
File metadata and controls
executable file
·47 lines (38 loc) · 1.12 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
#!/bin/bash
# Codex2API Quick Start Script
set -e
echo "🚀 Codex2API Quick Start"
echo "========================"
# Check if uv is installed
if ! command -v uv &> /dev/null; then
echo "❌ uv is not installed. Installing uv..."
curl -LsSf https://astral.sh/uv/install.sh | sh
export PATH="$HOME/.cargo/bin:$PATH"
echo "✅ uv installed successfully"
fi
# Check if dependencies are installed
if [ ! -d ".venv" ]; then
echo "📦 Installing dependencies..."
uv sync
echo "✅ Dependencies installed"
fi
# Check if auth.json exists
if [ ! -f "auth.json" ]; then
echo "🔐 Authentication setup required"
echo "Please run the authentication script first:"
echo " uv run get_token.py"
echo ""
echo "After authentication, run this script again."
exit 1
fi
# Create .env file if it doesn't exist
if [ ! -f ".env" ]; then
echo "⚙️ Creating .env file from template..."
cp .env.example .env
echo "✅ .env file created"
fi
echo "🎯 Starting Codex2API server..."
echo "🔧 Health check available at http://localhost:{PORT}/health"
echo ""
# Start the server
uv run main.py