Repository navigation
Expand file tree
/
Copy pathsetup.bat
More file actions
79 lines (70 loc) · 2.15 KB
/
Copy pathsetup.bat
File metadata and controls
79 lines (70 loc) · 2.15 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
78
79
@echo off
setlocal enabledelayedexpansion
:: =========================================================================
:: Startup Template Setup Script
:: =========================================================================
echo.
echo =========================================================================
echo Base Project & Agentic Framework Setup
echo =========================================================================
echo.
:: 1. Initialize environment and security keys
echo [1/5] Initializing environment and encryption keys...
set "PROJECT_NAME=%~1"
if "%PROJECT_NAME%"=="" (
set /p PROJECT_NAME="Enter project name (default: my-app): "
)
if "!PROJECT_NAME!"=="" (
set "PROJECT_NAME=my-app"
)
call node scripts/init-project.js "!PROJECT_NAME!"
if %ERRORLEVEL% neq 0 (
echo [ERROR] Failed to initialize project environment.
exit /b %ERRORLEVEL%
)
:: 2. Install dependencies
echo.
echo [2/5] Installing dependencies...
call npm install
if %ERRORLEVEL% neq 0 (
echo [ERROR] Failed to install dependencies.
exit /b %ERRORLEVEL%
)
:: 3. Generate Prisma client
echo.
echo [3/5] Generating Prisma client...
call npx prisma generate
if %ERRORLEVEL% neq 0 (
echo [ERROR] Failed to generate Prisma client.
exit /b %ERRORLEVEL%
)
:: 4. Push database schema
echo.
echo [4/5] Pushing database schema to PostgreSQL...
call npx prisma db push
if %ERRORLEVEL% neq 0 (
echo [ERROR] Failed to push database schema. Ensure PostgreSQL is running.
exit /b %ERRORLEVEL%
)
:: 5. Seed database
echo.
echo [5/5] Seeding database settings and prompt templates...
call npm run db:seed
if %ERRORLEVEL% neq 0 (
echo [ERROR] Failed to seed database.
exit /b %ERRORLEVEL%
)
echo.
echo =========================================================================
echo Setup completed successfully! 🚀
echo.
echo 1. Start the dev server:
echo npm run dev
echo.
echo 2. Open your browser and register your primary administrator account:
echo http://localhost:3000/register
echo.
echo 3. Configure AI Providers at:
echo http://localhost:3000/admin/ai/providers
echo =========================================================================
pause