Files
claudetools/docs/deployment/deploy_manual.cmd
Mike Swanson 06f7617718 feat: Major directory reorganization and cleanup
Reorganized project structure for better maintainability and reduced
disk usage by 95.9% (11 GB -> 451 MB).

Directory Reorganization (85% reduction in root files):
- Created docs/ with subdirectories (deployment, testing, database, etc.)
- Created infrastructure/vpn-configs/ for VPN scripts
- Moved 90+ files from root to organized locations
- Archived obsolete documentation (context system, offline mode, zombie debugging)
- Moved all test files to tests/ directory
- Root directory: 119 files -> 18 files

Disk Cleanup (10.55 GB recovered):
- Deleted Rust build artifacts: 9.6 GB (target/ directories)
- Deleted Python virtual environments: 161 MB (venv/ directories)
- Deleted Python cache: 50 KB (__pycache__/)

New Structure:
- docs/ - All documentation organized by category
- docs/archives/ - Obsolete but preserved documentation
- infrastructure/ - VPN configs and SSH setup
- tests/ - All test files consolidated
- logs/ - Ready for future logs

Benefits:
- Cleaner root directory (18 vs 119 files)
- Logical organization of documentation
- 95.9% disk space reduction
- Faster navigation and discovery
- Better portability (build artifacts excluded)

Build artifacts can be regenerated:
- Rust: cargo build --release (5-15 min per project)
- Python: pip install -r requirements.txt (2-3 min)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-18 20:42:28 -07:00

69 lines
2.6 KiB
Batchfile

@echo off
REM Manual deployment script for recall endpoint fix
REM Uses plink/pscp with guru username
echo ============================================================
echo ClaudeTools Recall Endpoint Deployment
echo ============================================================
echo.
echo [Step 1] Copying file to RMM server...
pscp D:\ClaudeTools\api\routers\conversation_contexts.py guru@172.16.3.30:/tmp/conversation_contexts.py
if errorlevel 1 (
echo [ERROR] File copy failed
pause
exit /b 1
)
echo [OK] File copied successfully
echo.
echo [Step 2] Checking file was copied...
plink guru@172.16.3.30 "ls -lh /tmp/conversation_contexts.py"
echo.
echo [Step 3] Moving file to production location...
plink guru@172.16.3.30 "sudo mv /tmp/conversation_contexts.py /opt/claudetools/api/routers/conversation_contexts.py"
if errorlevel 1 (
echo [ERROR] File move failed
pause
exit /b 1
)
echo [OK] File moved
echo.
echo [Step 4] Setting correct ownership...
plink guru@172.16.3.30 "sudo chown claudetools:claudetools /opt/claudetools/api/routers/conversation_contexts.py"
echo [OK] Ownership set
echo.
echo [Step 5] Verifying file has new code...
plink guru@172.16.3.30 "grep -c 'search_term.*Query' /opt/claudetools/api/routers/conversation_contexts.py"
echo (Should show 1 or more matches if update successful)
echo.
echo [Step 6] Restarting API service...
plink guru@172.16.3.30 "sudo systemctl restart claudetools-api"
echo [OK] Service restart initiated
echo.
echo [Step 7] Waiting for service to start...
timeout /t 5 /nobreak >nul
echo.
echo [Step 8] Checking service status...
plink guru@172.16.3.30 "sudo systemctl status claudetools-api --no-pager | head -15"
echo.
echo ============================================================
echo Testing API endpoint...
echo ============================================================
echo.
python -c "import requests, json; jwt='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJpbXBvcnQtc2NyaXB0Iiwic2NvcGVzIjpbImFkbWluIiwiaW1wb3J0Il0sImV4cCI6MTc3MTI3NTEyOX0.-DJF50tq0MaNwVQBdO7cGYNuO5pQuXte-tTj5DpHi2U'; r=requests.get('http://172.16.3.30:8001/api/conversation-contexts/recall', headers={'Authorization': f'Bearer {jwt}'}, params={'search_term': 'dataforth', 'limit': 2}); data=r.json(); print(f'Status: {r.status_code}'); print(f'Keys: {list(data.keys())}'); print('[SUCCESS]' if 'contexts' in data else '[FAILED - Still old format]'); print(f'Contexts: {len(data.get(\"contexts\", []))}' if 'contexts' in data else '')"
echo.
echo ============================================================
echo Deployment Complete
echo ============================================================
pause