Moved 25 files from root to organized subdirectories while keeping essential scripts (install.sh, setup.sh, start*.sh, stop*.sh) in root. ## Changes: ### New Directory Structure: - Created `/scripts/` for utility scripts - Created `/docs/guides/` for user guides - Created `/docs/development/` for dev documentation - Created `/docs/archive/` for historical/legacy docs ### Moved Files: **To `/scripts/` (7 files):** - backup_claude_os.sh - restore_claude_os.sh - run_tests.sh - setup_native.sh - start_mcp_server.sh - start_redis_workers.sh - entrypoint.sh **To `/docs/guides/` (7 files):** - AUTH_SETUP.md - BACKUP_RESTORE_GUIDE.md - HOOK_SETUP_QUICK_START.md - SHARING_GUIDE.md - START_SCRIPTS_GUIDE.md - PORTS_GUIDE.md - WHAT_IS_CLAUDE_OS.md **To `/docs/development/` (4 files):** - COMPREHENSIVE_REVIEW.md - SECURITY_FIXES.md - CLAUDE_OS_DEVELOPER_GUIDE.md - PROJECT_SETUP_AND_COMMANDS.md **To `/docs/archive/` (10 files):** - HYBRID_INDEXING_COMPLETE.md - INITIALIZE_PROJECT_HOOKS_FIX.md - INSTALL_ENHANCEMENTS.md - INSTALL_FIXES.md - PISTN_TEST_RESULTS.md - SESSION_SUMMARY.md - TEST_COVERAGE.md - TEST_RESULTS.md - TESTING_STATUS.md - README_TESTING.md ### Updated References: **Fixed broken documentation links in:** - docs/QUICK_REFERENCE.md - docs/PRODUCTION_DEPLOYMENT.md - docs/SCRIPTS_GUIDE.md - docs/development/SECURITY_FIXES.md - docs/guides/BACKUP_RESTORE_GUIDE.md - docs/development/CLAUDE_OS_DEVELOPER_GUIDE.md - tests/TESTING_GUIDE.md - tests/TEST_COVERAGE.md **Script references updated to:** - `./scripts/backup_claude_os.sh` - `./scripts/restore_claude_os.sh` - `./scripts/run_tests.sh` - `./scripts/setup_native.sh` - `./scripts/start_mcp_server.sh` - `./scripts/start_redis_workers.sh` ### Remaining in Root (9 essential files): - install.sh - setup.sh - start.sh - start_all_services.sh - stop_all_services.sh - restart_services.sh - README.md - CLAUDE.md - requirements.txt (+ GEMINI_DIAGRAM_PROMPT.md) ## Benefits: ✅ Cleaner root directory (9 files vs 34 files) ✅ Organized documentation by purpose ✅ Scripts grouped in dedicated directory ✅ Essential startup commands still in root ✅ All references updated and verified ✅ No broken links Version: 2.0.2
295 lines
5.6 KiB
Markdown
295 lines
5.6 KiB
Markdown
# Start Scripts Guide
|
||
|
||
Claude OS has **two different start scripts** for different use cases:
|
||
|
||
---
|
||
|
||
## 1. `./start.sh` - MCP Server Only
|
||
|
||
**What it starts:**
|
||
- ✅ MCP Server (port 8051)
|
||
|
||
**What it does NOT start:**
|
||
- ❌ Frontend Web UI
|
||
- ❌ Redis
|
||
- ❌ RQ Workers
|
||
- ❌ Ollama
|
||
|
||
**Use when:**
|
||
- You only need Claude Code integration
|
||
- You don't need the visual web interface
|
||
- You want minimal services running
|
||
- Quick start for development
|
||
|
||
**Command:**
|
||
```bash
|
||
./start.sh
|
||
```
|
||
|
||
**Output:**
|
||
```
|
||
✅ Claude OS MCP Server is running!
|
||
|
||
📡 MCP Server: http://localhost:8051
|
||
(For Claude Code integration - do NOT open in browser)
|
||
|
||
💡 Want the full experience?
|
||
To start ALL services: ./start_all_services.sh
|
||
```
|
||
|
||
**What you can do:**
|
||
- ✅ Use Claude Code with `/claude-os-init`
|
||
- ✅ Use Claude Code commands (`/claude-os-search`, etc.)
|
||
- ❌ Can't access web UI (no frontend running)
|
||
- ❌ No real-time learning (no workers running)
|
||
|
||
---
|
||
|
||
## 2. `./start_all_services.sh` - Everything
|
||
|
||
**What it starts:**
|
||
- ✅ Ollama (port 11434) - Local AI models
|
||
- ✅ Redis (port 6379) - Cache & job queue
|
||
- ✅ RQ Workers - Background job processing
|
||
- ✅ MCP Server (port 8051) - API for Claude Code
|
||
- ✅ React Frontend (port 5173) - Web UI
|
||
|
||
**Use when:**
|
||
- You want the complete experience
|
||
- You need the web interface
|
||
- You want real-time learning features
|
||
- Production-like environment
|
||
|
||
**Command:**
|
||
```bash
|
||
./start_all_services.sh
|
||
```
|
||
|
||
**Output:**
|
||
```
|
||
==================================================
|
||
✅ All Services Started Successfully!
|
||
==================================================
|
||
|
||
📡 Service URLs:
|
||
🎨 Frontend: http://localhost:5173
|
||
🔌 API Server: http://localhost:8051
|
||
📚 API Docs: http://localhost:8051/docs
|
||
|
||
🔧 Ollama:
|
||
Host: http://localhost:11434
|
||
Models: llama3.1:latest, nomic-embed-text:latest
|
||
|
||
💾 Databases:
|
||
SQLite: data/claude-os.db
|
||
Redis: localhost:6379
|
||
|
||
🤖 Real-Time Learning System:
|
||
RQ Workers: listening on 3 queues
|
||
```
|
||
|
||
**What you can do:**
|
||
- ✅ Use Claude Code integration
|
||
- ✅ Open web UI at http://localhost:5173
|
||
- ✅ Browse knowledge bases visually
|
||
- ✅ Upload documents via UI
|
||
- ✅ Real-time learning system active
|
||
- ✅ Full feature set
|
||
|
||
---
|
||
|
||
## Quick Comparison
|
||
|
||
| Feature | `start.sh` | `start_all_services.sh` |
|
||
|---------|------------|-------------------------|
|
||
| **MCP Server** | ✅ Port 8051 | ✅ Port 8051 |
|
||
| **Web UI** | ❌ | ✅ Port 5173 |
|
||
| **Ollama** | ❌ (must start manually) | ✅ Auto-started |
|
||
| **Redis** | ❌ | ✅ Auto-started |
|
||
| **RQ Workers** | ❌ | ✅ Background jobs |
|
||
| **Real-time Learning** | ❌ | ✅ Active |
|
||
| **Startup Time** | ~1 second | ~30 seconds |
|
||
| **Resource Usage** | Minimal | Moderate |
|
||
|
||
---
|
||
|
||
## Which Should You Use?
|
||
|
||
### Use `./start.sh` if:
|
||
- Just testing Claude Code integration
|
||
- Don't need web interface
|
||
- Want faster startup
|
||
- Minimal resource usage
|
||
- Development/debugging
|
||
|
||
### Use `./start_all_services.sh` if:
|
||
- Want full functionality
|
||
- Need web interface
|
||
- Want to browse/manage KBs visually
|
||
- Production or demo environment
|
||
- Want real-time learning features
|
||
|
||
---
|
||
|
||
## Common Mistakes
|
||
|
||
### ❌ Mistake 1: Opening MCP server in browser
|
||
|
||
**Problem:**
|
||
```bash
|
||
./start.sh
|
||
# Then opening http://localhost:8051 in browser
|
||
# → "Method Not Allowed" error
|
||
```
|
||
|
||
**Why:** MCP server (port 8051) is for Claude Code API calls, not browsers
|
||
|
||
**Solution:**
|
||
- Don't open 8051 in browser
|
||
- Use `./start_all_services.sh` and open http://localhost:5173 instead
|
||
|
||
### ❌ Mistake 2: Expecting Web UI with start.sh
|
||
|
||
**Problem:**
|
||
```bash
|
||
./start.sh
|
||
# Then trying to access http://localhost:5173
|
||
# → Connection refused
|
||
```
|
||
|
||
**Why:** `start.sh` doesn't start the frontend
|
||
|
||
**Solution:**
|
||
- Use `./start_all_services.sh` instead
|
||
|
||
### ❌ Mistake 3: Wrong port numbers
|
||
|
||
**Problem:** Confusing which service runs on which port
|
||
|
||
**Remember:**
|
||
- **Port 8051:** MCP Server (for Claude Code) - Don't open in browser!
|
||
- **Port 5173:** Web UI (for humans) - Open this in browser!
|
||
|
||
---
|
||
|
||
## Stopping Services
|
||
|
||
### Stop MCP Server Only (`start.sh`)
|
||
|
||
**Option 1:** Press `Ctrl+C` in the terminal
|
||
|
||
**Option 2:** Kill by PID
|
||
```bash
|
||
# PID shown when you start it
|
||
kill <PID>
|
||
```
|
||
|
||
### Stop All Services (`start_all_services.sh`)
|
||
|
||
**Use the stop script:**
|
||
```bash
|
||
./stop_all_services.sh
|
||
```
|
||
|
||
This will stop:
|
||
- MCP Server
|
||
- Frontend
|
||
- RQ Workers
|
||
- Redis (optional)
|
||
- Ollama (optional)
|
||
|
||
---
|
||
|
||
## Restarting Services
|
||
|
||
### Restart MCP Only
|
||
|
||
```bash
|
||
# Stop (Ctrl+C or kill PID)
|
||
./start.sh
|
||
```
|
||
|
||
### Restart Everything
|
||
|
||
```bash
|
||
./restart_services.sh
|
||
```
|
||
|
||
Or manually:
|
||
```bash
|
||
./stop_all_services.sh
|
||
./start_all_services.sh
|
||
```
|
||
|
||
---
|
||
|
||
## Logs
|
||
|
||
### MCP Server Logs
|
||
|
||
**If started with `start.sh`:**
|
||
- Output shows in terminal
|
||
|
||
**If started with `start_all_services.sh`:**
|
||
```bash
|
||
tail -f logs/mcp_server.log
|
||
```
|
||
|
||
### Frontend Logs
|
||
|
||
```bash
|
||
tail -f logs/frontend.log
|
||
```
|
||
|
||
### RQ Workers Logs
|
||
|
||
```bash
|
||
tail -f logs/rq_workers.log
|
||
```
|
||
|
||
### All Logs
|
||
|
||
```bash
|
||
tail -f logs/*.log
|
||
```
|
||
|
||
---
|
||
|
||
## Installation Recommendation
|
||
|
||
After running `./install.sh`, the README says:
|
||
|
||
```
|
||
1️⃣ Start Claude OS:
|
||
./start.sh
|
||
```
|
||
|
||
**But for the full experience, you should use:**
|
||
```
|
||
1️⃣ Start Claude OS (all services):
|
||
./start_all_services.sh
|
||
```
|
||
|
||
Then you can:
|
||
- Use Claude Code at port 8051
|
||
- Open web UI at http://localhost:5173
|
||
- Have full functionality
|
||
|
||
---
|
||
|
||
## Summary
|
||
|
||
**Remember:**
|
||
- `./start.sh` = MCP server only (minimal, fast)
|
||
- `./start_all_services.sh` = Everything (full features)
|
||
|
||
**For most users:**
|
||
```bash
|
||
./start_all_services.sh # ← Recommended!
|
||
```
|
||
|
||
**Then access:**
|
||
- Web UI: http://localhost:5173 ✅ Open in browser
|
||
- MCP Server: http://localhost:8051 ❌ Don't open in browser (for Claude Code only)
|
||
|
||
**Problem solved!** 🎉
|