-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathinstall.bat
More file actions
692 lines (619 loc) · 23.4 KB
/
install.bat
File metadata and controls
692 lines (619 loc) · 23.4 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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
@echo off
REM ============================================================================
REM Claude Knowledge Management System - Comprehensive Windows Installation
REM ============================================================================
REM This script provides full automated installation matching install.sh
REM Requirements: Node.js, npm, Git, Python, Git Bash
setlocal enabledelayedexpansion
REM Color codes for Windows console
set "GREEN=[92m"
set "YELLOW=[93m"
set "RED=[91m"
set "BLUE=[94m"
set "NC=[0m"
echo.
echo ============================================================================
echo Claude Knowledge Management System - Windows Installation
echo ============================================================================
echo.
REM ============================================================================
REM 1. DEPENDENCY CHECKING
REM ============================================================================
echo %BLUE%[1/12] Checking dependencies...%NC%
echo.
REM Check for Node.js
where node >nul 2>nul
if %errorlevel% neq 0 (
echo %RED%ERROR: Node.js is not installed!%NC%
echo Please download and install Node.js from https://nodejs.org/
echo Recommended version: v18 or higher
echo.
pause
exit /b 1
)
REM Check Node version
for /f "tokens=*" %%v in ('node --version') do set NODE_VERSION=%%v
echo %GREEN%[OK]%NC% Node.js %NODE_VERSION% found
REM Check for npm
where npm >nul 2>nul
if %errorlevel% neq 0 (
echo %RED%ERROR: npm is not installed!%NC%
echo npm should come with Node.js installation.
echo.
pause
exit /b 1
)
for /f "tokens=*" %%v in ('npm --version') do set NPM_VERSION=%%v
echo %GREEN%[OK]%NC% npm %NPM_VERSION% found
REM Check for Git
where git >nul 2>nul
if %errorlevel% neq 0 (
echo %RED%ERROR: Git is not installed!%NC%
echo Please download and install Git from https://git-scm.com/downloads
echo.
pause
exit /b 1
)
for /f "tokens=*" %%v in ('git --version') do set GIT_VERSION=%%v
echo %GREEN%[OK]%NC% %GIT_VERSION%
REM Check for Python
where python >nul 2>nul
if %errorlevel% neq 0 (
echo %RED%ERROR: Python is not installed!%NC%
echo Please download and install Python from https://www.python.org/downloads/
echo Make sure to check "Add Python to PATH" during installation
echo.
pause
exit /b 1
)
for /f "tokens=*" %%v in ('python --version') do set PYTHON_VERSION=%%v
echo %GREEN%[OK]%NC% %PYTHON_VERSION% found
REM Check for Git Bash
where bash >nul 2>nul
if %errorlevel% neq 0 (
echo %YELLOW%WARNING: Git Bash not found in PATH%NC%
echo Git Bash is required for the 'coding' command to work properly.
echo Please ensure Git for Windows is installed with Git Bash.
echo.
)
echo.
echo %GREEN%All required dependencies found!%NC%
echo.
REM ============================================================================
REM 2. SET INSTALLATION PATHS
REM ============================================================================
set CODING_REPO=%~dp0
set CODING_REPO=%CODING_REPO:~0,-1%
REM Convert to forward slashes for cross-platform compatibility
set CODING_REPO_UNIX=%CODING_REPO:\=/%
echo %BLUE%[2/12] Installation directory:%NC%
echo %CODING_REPO%
echo.
REM ============================================================================
REM 3. INSTALL MAIN PROJECT DEPENDENCIES
REM ============================================================================
echo %BLUE%[3/12] Installing main project dependencies...%NC%
cd /d "%CODING_REPO%"
call npm install
if %errorlevel% neq 0 (
echo %RED%ERROR: Failed to install main project dependencies%NC%
pause
exit /b 1
)
echo %GREEN%[OK]%NC% Main project dependencies installed
echo.
REM ============================================================================
REM 4. INSTALL LIB/KNOWLEDGE-API DEPENDENCIES
REM ============================================================================
echo %BLUE%[4/12] Installing knowledge-api dependencies...%NC%
if exist "%CODING_REPO%\lib\knowledge-api" (
cd /d "%CODING_REPO%\lib\knowledge-api"
call npm install
if %errorlevel% neq 0 (
echo %RED%ERROR: Failed to install knowledge-api dependencies%NC%
pause
exit /b 1
)
echo %GREEN%[OK]%NC% Knowledge-api dependencies installed
) else (
echo %YELLOW%WARNING: lib/knowledge-api directory not found, skipping%NC%
)
echo.
REM ============================================================================
REM 5. INSTALL LIB/VKB-SERVER DEPENDENCIES
REM ============================================================================
echo %BLUE%[5/12] Installing vkb-server dependencies...%NC%
if exist "%CODING_REPO%\lib\vkb-server" (
cd /d "%CODING_REPO%\lib\vkb-server"
call npm install
if %errorlevel% neq 0 (
echo %RED%ERROR: Failed to install vkb-server dependencies%NC%
pause
exit /b 1
)
echo %GREEN%[OK]%NC% VKB-server dependencies installed
) else (
echo %YELLOW%WARNING: lib/vkb-server directory not found, skipping%NC%
)
echo.
REM ============================================================================
REM 6. CLONE AND BUILD MEMORY-VISUALIZER
REM ============================================================================
echo %BLUE%[6/12] Setting up memory-visualizer...%NC%
cd /d "%CODING_REPO%"
if not exist "%CODING_REPO%\integrations\memory-visualizer" (
mkdir integrations 2>nul
echo Cloning memory-visualizer from fwornle fork...
git clone https://github.com/fwornle/memory-visualizer.git "%CODING_REPO%\integrations\memory-visualizer"
if %errorlevel% neq 0 (
echo %RED%ERROR: Failed to clone memory-visualizer%NC%
pause
exit /b 1
)
) else (
echo Memory-visualizer directory exists, updating...
cd /d "%CODING_REPO%\integrations\memory-visualizer"
git pull
)
cd /d "%CODING_REPO%\integrations\memory-visualizer"
echo Installing memory-visualizer dependencies...
call npm install
if %errorlevel% neq 0 (
echo %RED%ERROR: Failed to install memory-visualizer dependencies%NC%
pause
exit /b 1
)
echo Building memory-visualizer...
call npm run build
if %errorlevel% neq 0 (
echo %RED%ERROR: Failed to build memory-visualizer%NC%
pause
exit /b 1
)
echo %GREEN%[OK]%NC% Memory-visualizer installed and built
echo.
REM ============================================================================
REM 7. INSTALL MCP SERVERS
REM ============================================================================
echo %BLUE%[7/12] Installing MCP servers...%NC%
cd /d "%CODING_REPO%"
REM Install browser-access MCP server
if exist "%CODING_REPO%\browser-access" (
echo Installing browser-access MCP server...
cd /d "%CODING_REPO%\browser-access"
call npm install
call npm run build
echo %GREEN%[OK]%NC% Browser-access MCP server installed
echo.
)
REM Install claude-logger MCP server
if exist "%CODING_REPO%\claude-logger-mcp" (
echo Installing claude-logger MCP server...
cd /d "%CODING_REPO%\claude-logger-mcp"
call npm install
call npm run build
echo %GREEN%[OK]%NC% Claude-logger MCP server installed
echo.
)
REM Install semantic-analysis MCP server
if exist "%CODING_REPO%\semantic-analysis" (
echo Installing semantic-analysis MCP server...
cd /d "%CODING_REPO%\semantic-analysis"
call npm install
call npm run build
echo %GREEN%[OK]%NC% Semantic-analysis MCP server installed
echo.
)
REM Install serena MCP server
if exist "%CODING_REPO%\serena" (
echo Installing serena MCP server...
cd /d "%CODING_REPO%\serena"
call npm install
call npm run build
echo %GREEN%[OK]%NC% Serena MCP server installed
echo.
)
REM Install browserbase MCP server
if exist "%CODING_REPO%\browserbase" (
echo Installing browserbase MCP server...
cd /d "%CODING_REPO%\browserbase"
call npm install
call npm run build
echo %GREEN%[OK]%NC% Browserbase MCP server installed
echo.
)
REM Install constraint-monitor MCP server
if exist "%CODING_REPO%\constraint-monitor" (
echo Installing constraint-monitor MCP server...
cd /d "%CODING_REPO%\constraint-monitor"
call npm install
call npm run build
echo %GREEN%[OK]%NC% Constraint-monitor MCP server installed
echo.
)
echo MCP server installation complete
echo.
REM ============================================================================
REM 8. CREATE .ENV FILE
REM ============================================================================
echo %BLUE%[8/12] Creating .env configuration...%NC%
cd /d "%CODING_REPO%"
if not exist "%CODING_REPO%\.env" (
echo Creating .env file with Windows paths...
(
echo # Claude Knowledge Management System - Environment Variables
echo.
echo # API Keys - Add your API keys here
echo # XAI_API_KEY=your_key_here
echo # OPENAI_API_KEY=your_key_here
echo # GROQ_API_KEY=your_key_here
echo # ANTHROPIC_API_KEY=your_key_here
echo.
echo # For browser-access MCP server ^(optional^)
echo # BROWSERBASE_API_KEY=your_key_here
echo # BROWSERBASE_PROJECT_ID=your_project_id
echo.
echo LOCAL_CDP_URL=ws://localhost:9222
echo.
echo # Primary coding tools path
echo CODING_TOOLS_PATH=%CODING_REPO_UNIX%
echo.
echo # Knowledge Base path
echo CODING_KB_PATH=%CODING_REPO_UNIX%
echo.
echo # Default knowledge views to display
echo KNOWLEDGE_VIEW=coding,ui
echo.
echo # Database Configuration
echo QDRANT_URL=http://localhost:6333
echo SQLITE_PATH=%CODING_REPO_UNIX%/.data/knowledge.db
) > .env
echo %GREEN%[OK]%NC% .env file created
) else (
echo .env file already exists, skipping creation
echo %YELLOW%NOTE:%NC% You may need to update paths manually if they are incorrect
)
echo.
REM ============================================================================
REM 9. CREATE COMMAND WRAPPERS
REM ============================================================================
echo %BLUE%[9/12] Creating command wrappers...%NC%
cd /d "%CODING_REPO%"
REM Create bin directory
mkdir "%CODING_REPO%\bin" 2>nul
REM Create ukb.bat wrapper (self-detecting)
(
echo @echo off
echo setlocal
echo.
echo REM Get the directory where this batch file is located
echo set "SCRIPT_DIR=%%~dp0"
echo REM Remove trailing backslash
echo set "SCRIPT_DIR=%%SCRIPT_DIR:~0,-1%%"
echo REM Get parent directory ^(coding repo root^)
echo for %%%%I in ^("%%SCRIPT_DIR%%\..") do set "CODING_REPO=%%%%~fI"
echo.
echo bash "%%CODING_REPO%%\knowledge-management\ukb" %%*
) > "%CODING_REPO%\bin\ukb.bat"
REM Create vkb.bat wrapper (self-detecting)
(
echo @echo off
echo setlocal
echo.
echo REM Get the directory where this batch file is located
echo set "SCRIPT_DIR=%%~dp0"
echo REM Remove trailing backslash
echo set "SCRIPT_DIR=%%SCRIPT_DIR:~0,-1%%"
echo REM Get parent directory ^(coding repo root^)
echo for %%%%I in ^("%%SCRIPT_DIR%%\..") do set "CODING_REPO=%%%%~fI"
echo.
echo bash "%%CODING_REPO%%\knowledge-management\vkb" %%*
) > "%CODING_REPO%\bin\vkb.bat"
REM Create coding.bat wrapper (self-detecting)
(
echo @echo off
echo setlocal
echo.
echo REM Get the directory where this batch file is located
echo set "SCRIPT_DIR=%%~dp0"
echo REM Remove trailing backslash
echo set "SCRIPT_DIR=%%SCRIPT_DIR:~0,-1%%"
echo REM Get parent directory ^(coding repo root^)
echo for %%%%I in ^("%%SCRIPT_DIR%%\..") do set "CODING_REPO=%%%%~fI"
echo.
echo REM Export for the bash script
echo set "CODING_REPO=%%CODING_REPO%%"
echo.
echo bash "%%CODING_REPO%%\bin\coding" %%*
) > "%CODING_REPO%\bin\coding.bat"
echo %GREEN%[OK]%NC% Batch wrappers created in bin/
echo.
REM ============================================================================
REM 10. CREATE UKB BASH WRAPPER IN KNOWLEDGE-MANAGEMENT
REM ============================================================================
echo %BLUE%[10/12] Creating ukb bash wrapper...%NC%
if not exist "%CODING_REPO%\knowledge-management\ukb" (
echo Creating knowledge-management/ukb wrapper...
(
echo #!/bin/bash
echo #
echo # UKB Lightweight Script - Minimal wrapper for ukb-cli
echo #
echo # This lightweight script provides backward compatibility while
echo # delegating all functionality to the new ukb-cli Node.js implementation.
echo #
echo.
echo set -euo pipefail
echo.
echo # Get script directory and project root
echo SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
echo PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
echo UKB_CLI="$PROJECT_ROOT/bin/ukb-cli.js"
echo.
echo # Load environment variables from .env file if it exists
echo if [[ -f "$PROJECT_ROOT/.env" ]]; then
echo set -a # automatically export all variables
echo source "$PROJECT_ROOT/.env"
echo set +a
echo fi
echo.
echo # Ensure Node.js and ukb-cli are available
echo if ! command -v node ^>/dev/null 2^>^&1; then
echo echo "Error: Node.js is required but not installed" ^>^&2
echo exit 1
echo fi
echo.
echo if [[ ! -f "$UKB_CLI" ]]; then
echo echo "Error: ukb-cli not found at $UKB_CLI" ^>^&2
echo exit 1
echo fi
echo.
echo # Execute ukb-cli with all arguments
echo exec node "$UKB_CLI" "$@"
) > "%CODING_REPO%\knowledge-management\ukb"
echo %GREEN%[OK]%NC% ukb wrapper created
) else (
echo ukb wrapper already exists
)
echo.
REM ============================================================================
REM 11. CONFIGURE ENVIRONMENT
REM ============================================================================
echo %BLUE%[11/12] Configuring environment...%NC%
echo.
REM ===== 11a. Configure Windows PATH =====
echo Configuring Windows PATH...
REM Check if bin directory is already in PATH
echo %PATH% | findstr /C:"%CODING_REPO%\bin" >nul 2>nul
if %errorlevel% neq 0 (
echo Adding %CODING_REPO%\bin to Windows PATH...
setx PATH "%PATH%;%CODING_REPO%\bin" >nul 2>nul
if %errorlevel% equ 0 (
echo %GREEN%[OK]%NC% Added to Windows PATH
echo %YELLOW%NOTE:%NC% You may need to restart your terminal for PATH changes to take effect
) else (
echo %YELLOW%WARNING:%NC% Failed to automatically add to PATH
echo Please add manually: %CODING_REPO%\bin
)
) else (
echo %GREEN%[OK]%NC% Already in Windows PATH
)
echo.
REM ===== 11b. Configure Git Bash Environment =====
echo Configuring Git Bash environment...
REM Create configuration snippet
set BASH_CONFIG_FILE=%USERPROFILE%\.bash_profile
if exist "%BASH_CONFIG_FILE%" (
findstr /C:"CODING_REPO" "%BASH_CONFIG_FILE%" >nul 2>nul
if %errorlevel% neq 0 (
echo Adding coding configuration to ~/.bash_profile...
(
echo.
echo # Claude Knowledge Management System
echo export CODING_REPO="%CODING_REPO_UNIX%"
echo export PATH="%CODING_REPO_UNIX%/bin:$PATH"
) >> "%BASH_CONFIG_FILE%"
echo %GREEN%[OK]%NC% Configuration added to ~/.bash_profile
) else (
echo Configuration already exists in ~/.bash_profile
)
) else (
echo Creating ~/.bash_profile...
(
echo # Claude Knowledge Management System
echo export CODING_REPO="%CODING_REPO_UNIX%"
echo export PATH="%CODING_REPO_UNIX%/bin:$PATH"
) > "%BASH_CONFIG_FILE%"
echo %GREEN%[OK]%NC% ~/.bash_profile created with coding configuration
)
echo.
REM ============================================================================
REM 12. CREATE CLAUDE CODE SETTINGS
REM ============================================================================
echo %BLUE%[12/13] Creating Claude Code settings...%NC%
cd /d "%CODING_REPO%"
REM Create .claude directory if needed
mkdir "%CODING_REPO%\.claude" 2>nul
REM Create settings.local.json with Windows-compatible paths
echo Creating .claude/settings.local.json...
(
echo {
echo "permissions": {
echo "allow": [
echo "Bash(npm run api:*)",
echo "mcp__serena__find_symbol",
echo "mcp__serena__search_for_pattern",
echo "Bash(TRANSCRIPT_DEBUG=true node scripts/enhanced-transcript-monitor.js --test)",
echo "Bash(node:*)",
echo "Bash(plantuml:*)",
echo "mcp__serena__check_onboarding_performed",
echo "Bash(bin/coding:*)",
echo "Bash(cp:*)",
echo "mcp__serena__find_file",
echo "mcp__serena__replace_symbol_body",
echo "mcp__serena__activate_project",
echo "mcp__serena__get_symbols_overview",
echo "Bash(cat:*)",
echo "Bash(timeout:*)",
echo "Bash(watch:*)",
echo "mcp__serena__list_dir",
echo "mcp__serena__insert_after_symbol",
echo "Bash(find:*)",
echo "Bash(CODING_REPO=%CODING_REPO% node %CODING_REPO%\\scripts\\combined-status-line.js)",
echo "Bash(kill:*)",
echo "Bash(pkill:*)",
echo "Bash(grep:*)",
echo "Bash(lsof:*)",
echo "Bash(curl:*)",
echo "Bash(PORT=3030 npm run dev)",
echo "mcp__serena__insert_before_symbol",
echo "mcp__constraint-monitor__check_constraints",
echo "Bash(npm start)",
echo "Bash(git rm:*)",
echo "Bash(npm run:*)",
echo "Bash(chmod:*)",
echo "Bash(./test-individual-constraints.sh:*)",
echo "Bash(docker stop:*)",
echo "Bash(docker rm:*)",
echo "Bash(docker-compose up:*)",
echo "Bash(docker logs:*)",
echo "Bash(docker restart:*)",
echo "Bash(PORT=3031 npm run api)",
echo "Bash(git checkout:*)",
echo "Bash(xargs kill:*)",
echo "mcp__mcp-git-ingest__git_directory_structure",
echo "mcp__mcp-git-ingest__git_read_important_files",
echo "WebSearch",
echo "Bash(git remote get-url:*)",
echo "Bash(basename:*)",
echo "mcp__spec-workflow__spec-workflow-guide",
echo "mcp__spec-workflow__approvals",
echo "Bash(PORT=3030 npm run dashboard)",
echo "Bash(sort:*)",
echo "mcp__serena__think_about_task_adherence",
echo "Bash(awk:*)",
echo "Bash(PORT=3031 node src/dashboard-server.js)",
echo "mcp__serena__onboarding",
echo "mcp__serena__write_memory",
echo "Bash(jq:*)",
echo "mcp__serena__think_about_collected_information",
echo "mcp__serena__get_current_config",
echo "Bash(npm install:*)",
echo "Read(//C:/Users/%USERNAME%/.claude/**)",
echo "WebFetch(domain:console.groq.com)",
echo "Read(//private/tmp/**)",
echo "Bash(./collect-test-results.js)",
echo "WebFetch(domain:github.com)",
echo "Bash(sqlite3 .data/knowledge.db \"SELECT source, COUNT(*) as count FROM knowledge_extractions GROUP BY source\")",
echo "Bash(sqlite3 .data/knowledge.db \"PRAGMA table_info(knowledge_extractions)\")",
echo "mcp__memory__read_graph",
echo "Bash(vkb restart:*)",
echo "Bash(bin/vkb restart:*)",
echo "Bash(ps:*)",
echo "Bash(git submodule:*)",
echo "mcp__serena__find_referencing_symbols",
echo "Bash(git config:*)",
echo "Bash(git restore:*)",
echo "Bash(git diff:*)",
echo "Bash(xargs -I {} git restore --source=HEAD {})",
echo "WebFetch(domain:claude.ai)",
echo "mcp__constraint-monitor__get_constraint_status",
echo "Bash(for coll in ontology-coding ontology-raas ontology-resi ontology-agentic ontology-ui)",
echo "Bash(do echo -n \"$coll: \")",
echo "Bash(done)",
echo "Bash(npm test:*)",
echo "Bash(docker info:*)",
echo "Bash(bash %CODING_REPO%\\bin\\ukb:*)",
echo "Bash(bin/ukb:*)",
echo "Bash(bin/vkb:*)",
echo "Bash(SYSTEM_HEALTH_API_PORT=3033 pnpm api:*)",
echo "mcp__serena__initial_instructions",
echo "Bash(git add:*)",
echo "Bash(git commit:*)",
echo "Bash(rm:*)",
echo "Bash(npm view:*)",
echo "Bash(while read name)",
echo "Bash(do [ ! -f \"docs/presentation/images/$name.png\" ])",
echo "Bash(echo:*)",
echo "Bash(git fetch:*)"
echo ],
echo "deny": [],
echo "ask": []
echo },
echo "hooks": {
echo "UserPromptSubmit": [
echo {
echo "hooks": [
echo {
echo "type": "command",
echo "command": "node %CODING_REPO%\\integrations\\mcp-constraint-monitor\\src\\hooks\\pre-prompt-hook-wrapper.js"
echo }
echo ]
echo }
echo ],
echo "PreToolUse": [
echo {
echo "hooks": [
echo {
echo "type": "command",
echo "command": "node %CODING_REPO%\\integrations\\mcp-constraint-monitor\\src\\hooks\\pre-tool-hook-wrapper.js"
echo }
echo ]
echo }
echo ]
echo },
echo "statusLine": {
echo "type": "command",
echo "command": "CODING_REPO=%CODING_REPO% node %CODING_REPO%\\scripts\\combined-status-line.js"
echo }
echo }
) > "%CODING_REPO%\.claude\settings.local.json"
echo %GREEN%[OK]%NC% Claude Code settings created
echo.
REM ============================================================================
REM 13. INITIALIZE KNOWLEDGE DATABASES
REM ============================================================================
echo %BLUE%[13/13] Initializing knowledge databases and log directories...%NC%
REM Create .data directory
mkdir "%CODING_REPO%\.data" 2>nul
mkdir "%CODING_REPO%\.data\knowledge-graph" 2>nul
REM Create .logs directory for system monitoring
mkdir "%CODING_REPO%\.logs" 2>nul
REM Initialize knowledge export directory if needed
mkdir "%CODING_REPO%\.data\knowledge-export" 2>nul
echo %GREEN%[OK]%NC% Knowledge databases initialized
echo.
REM ============================================================================
REM INSTALLATION COMPLETE
REM ============================================================================
echo.
echo ============================================================================
echo %GREEN%Installation completed successfully!%NC%
echo ============================================================================
echo.
echo %YELLOW%NEXT STEPS:%NC%
echo.
echo %BLUE%Step 1: Restart Your Terminal%NC%
echo - Windows PATH has been automatically configured
echo - Close and reopen your terminal (CMD/PowerShell/Git Bash) for changes to take effect
echo.
echo %BLUE%Step 2: Configure API Keys (Optional)%NC%
echo - Edit %CODING_REPO%\.env
echo - Add your API keys for AI services you plan to use
echo.
echo %BLUE%Available Commands:%NC%
echo - ukb : Update Knowledge Base
echo - vkb : View Knowledge Base (starts server on port 8080)
echo - coding : Main coding command (starts all services)
echo.
echo %BLUE%Testing Installation:%NC%
echo 1. Open a new Git Bash window
echo 2. Run: coding --help
echo 3. Run: vkb status
echo.
echo %YELLOW%Note:%NC% For Git Bash, you may need to restart your terminal
echo or run 'source ~/.bash_profile' for PATH changes to take effect
echo.
echo For more information, see the documentation in the coding directory.
echo.
pause