-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathstart.sh
More file actions
executable file
Β·47 lines (38 loc) Β· 1.12 KB
/
start.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