-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.bat
More file actions
166 lines (148 loc) · 5.68 KB
/
setup.bat
File metadata and controls
166 lines (148 loc) · 5.68 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
@echo off
setlocal enabledelayedexpansion
:: Claude Context System Installer v1.0
:: ====================================
cls
echo.
echo ╔═══════════════════════════════════════════════════════════╗
echo ║ ║
echo ║ 🔗 Claude Context System Installer v1.0 ║
echo ║ ║
echo ║ Transform your AI workflow with seamless context ║
echo ║ management between Claude Desktop and Notion ║
echo ║ ║
echo ╚═══════════════════════════════════════════════════════════╝
echo.
timeout /t 2 /nobreak >nul
:: Check for Administrator privileges
net session >nul 2>&1
if %errorlevel% neq 0 (
echo [❌] This installer requires Administrator privileges.
echo.
echo Please right-click on setup.bat and select "Run as Administrator"
echo.
pause
exit /b 1
)
echo [1/6] Checking system requirements...
echo =====================================
:: Check Node.js installation
echo -^> Checking Node.js...
node --version >nul 2>&1
if %errorlevel% neq 0 (
echo [❌] Node.js is not installed!
echo.
echo Please install Node.js 16.0 or higher from:
echo https://nodejs.org/
echo.
pause
exit /b 1
) else (
for /f "tokens=*" %%i in ('node --version') do set NODE_VERSION=%%i
echo [✅] Node.js !NODE_VERSION! detected
)
:: Check npm installation
echo -^> Checking npm...
npm --version >nul 2>&1
if %errorlevel% neq 0 (
echo [❌] npm is not installed!
pause
exit /b 1
) else (
for /f "tokens=*" %%i in ('npm --version') do set NPM_VERSION=%%i
echo [✅] npm !NPM_VERSION! detected
)
:: Check for Claude Desktop config
echo -^> Checking Claude Desktop...set CLAUDE_CONFIG=%APPDATA%\Claude\claude_desktop_config.json
if exist "!CLAUDE_CONFIG!" (
echo [✅] Claude Desktop configuration found
) else (
echo [⚠️] Claude Desktop configuration not found
echo We'll create it for you later
)
echo.
echo [2/6] Installing dependencies...
echo ================================
cd /d "%~dp0"
:: Install MCP server dependencies
echo -^> Installing MCP server dependencies...
cd src\mcp-server
call npm install --silent
if %errorlevel% neq 0 (
echo [❌] Failed to install dependencies
pause
exit /b 1
)
echo [✅] Dependencies installed successfully
cd ..\..
echo.
echo [3/6] Configuring Notion integration...
echo ======================================
echo.
echo Please enter your Notion configuration:echo.
set /p NOTION_API_KEY="Notion API Key (or press Enter for demo mode): "
if "!NOTION_API_KEY!"=="" (
echo [ℹ️] Running in DEMO MODE - No Notion sync
set DEMO_MODE=true
) else (
echo [✅] Notion API Key configured
set DEMO_MODE=false
:: Create config file
echo {> src\mcp-server\config.json
echo "notion": {>> src\mcp-server\config.json
echo "apiKey": "!NOTION_API_KEY!">> src\mcp-server\config.json
echo }>> src\mcp-server\config.json
echo }>> src\mcp-server\config.json
)
echo.
echo [4/6] Setting up Claude Desktop integration...
echo =============================================
:: Get current directory
set CURRENT_DIR=%cd%
:: Create Claude config if it doesn't exist
if not exist "!CLAUDE_CONFIG!" (
mkdir "%APPDATA%\Claude" 2>nul
echo {> "!CLAUDE_CONFIG!"
echo "mcpServers": {}>> "!CLAUDE_CONFIG!"
echo }>> "!CLAUDE_CONFIG!"
)
:: Update Claude config
echo -^> Updating Claude Desktop configuration...
node scripts\update-claude-config.js
if %errorlevel% neq 0 (
echo [⚠️] Manual configuration may be required
) else (
echo [✅] Claude Desktop configured successfully
)
echo.
echo [5/6] Creating demo workspace...
echo ================================
if "!DEMO_MODE!"=="true" (
echo -^> Setting up local demo files...
xcopy /E /I /Y demo\* "%USERPROFILE%\Documents\Claude Context Demo" >nul
echo [✅] Demo workspace created in Documents folder
) else (
echo -^> Creating Notion demo workspace...
node scripts\create-demo-workspace.js
echo [✅] Demo workspace created in Notion
)
echo.
echo [6/6] Running health check...
echo =============================
node scripts\health-check.js
echo.
echo ╔═══════════════════════════════════════════════════════════╗
echo ║ ║
echo ║ ✅ Installation Complete! ✅ ║
echo ║ ║
echo ║ Next steps: ║
echo ║ 1. Restart Claude Desktop ║
echo ║ 2. Start a new conversation ║
echo ║ 3. Your context will be automatically captured! ║
echo ║ ║
echo ║ Documentation: docs\README.md ║
echo ║ Demo workspace: %USERPROFILE%\Documents\Claude Context Demo ║
echo ║ ║
echo ╚═══════════════════════════════════════════════════════════╝
echo.
pause