[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-75003":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":14,"stars30d":17,"stars90d":15,"forks30d":15,"starsTrendScore":18,"compositeScore":19,"rankGlobal":9,"rankLanguage":9,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":23,"hasPages":21,"topics":24,"createdAt":9,"pushedAt":9,"updatedAt":25,"readmeContent":26,"aiSummary":27,"trendingCount":15,"starSnapshotCount":15,"syncStatus":16,"lastSyncTime":28,"discoverSource":29},75003,"tenacitOS","carlosazaustre\u002FtenacitOS","carlosazaustre","OpenClaw Mission Control Dashboard",null,"TypeScript",1226,236,9,4,0,2,26,6,20.12,"MIT License",false,"main",true,[],"2026-06-12 02:03:31","# TenacitOS — Mission Control\n\nA real-time dashboard and control center for [OpenClaw](https:\u002F\u002Fopenclaw.ai) AI agent instances. Built with Next.js, React 19, and Tailwind CSS v4.\n\n> **TenacitOS** lives inside your OpenClaw workspace and reads its configuration, agents, sessions, memory, and logs directly from the host. No extra database or backend required — OpenClaw is the backend.\n\n---\n\n## Features\n\n- **📊 System Monitor** — Real-time VPS metrics (CPU, RAM, Disk, Network) + PM2\u002FDocker status\n- **🤖 Agent Dashboard** — All agents, their sessions, token usage, model, and activity status\n- **💰 Cost Tracking** — Real cost analytics from OpenClaw sessions (SQLite)\n- **⏰ Cron Manager** — Visual cron manager with weekly timeline, run history, and manual triggers\n- **📋 Activity Feed** — Real-time log of agent actions with heatmap and charts\n- **🧠 Memory Browser** — Explore, search, and edit agent memory files\n- **📁 File Browser** — Navigate workspace files with preview and in-browser editing\n- **🔎 Global Search** — Full-text search across memory and workspace files\n- **🔔 Notifications** — Real-time notification center with unread badge\n- **🏢 Office 3D** — Interactive 3D office with one desk per agent (React Three Fiber)\n- **📺 Terminal** — Read-only terminal for safe status commands\n- **🔐 Auth** — Password-protected with rate limiting and secure cookie\n\n---\n\n## Screenshots\n\n**Dashboard** — activity overview, agent status, and weather widget\n\n![Dashboard](.\u002Fdocs\u002Fscreenshots\u002Fdashboard.jpg)\n\n**Session History** — all OpenClaw sessions with token usage and context tracking\n\n![Sessions](.\u002Fdocs\u002Fscreenshots\u002Fsessions.jpg)\n\n**Costs & Analytics** — daily cost trends and breakdown per agent\n\n![Costs](.\u002Fdocs\u002Fscreenshots\u002Fcosts.jpg)\n\n**System Monitor** — real-time CPU, RAM, Disk, and Network metrics\n\n![System Monitor](.\u002Fdocs\u002Fscreenshots\u002Fsystem.jpg)\n\n**Office 3D** — interactive 3D office with one voxel avatar per agent (React Three Fiber)\n\n![Office 3D](.\u002Fdocs\u002Fscreenshots\u002Foffice3d.jpg)\n\n---\n\n## Requirements\n\n- **Node.js** 18+ (tested with v22)\n- **[OpenClaw](https:\u002F\u002Fopenclaw.ai)** installed and running on the same host\n- **PM2** or **systemd** (recommended for production)\n- **Caddy** or another reverse proxy (for HTTPS in production)\n\n---\n\n## How it works\n\nTenacitOS reads directly from your OpenClaw installation:\n\n```\n\u002Froot\u002F.openclaw\u002F              ← OPENCLAW_DIR (configurable)\n├── openclaw.json             ← agents list, channels, models config\n├── workspace\u002F                ← main agent workspace (MEMORY.md, SOUL.md, etc.)\n├── workspace-studio\u002F         ← sub-agent workspaces\n├── workspace-infra\u002F\n├── ...\n└── workspace\u002Fmission-control\u002F ← TenacitOS lives here\n```\n\nThe app uses `OPENCLAW_DIR` to locate `openclaw.json` and all workspaces. **No manual agent configuration needed** — agents are auto-discovered from `openclaw.json`.\n\n---\n\n## Installation\n\n### 1. Clone into your OpenClaw workspace\n\n```bash\ncd \u002Froot\u002F.openclaw\u002Fworkspace   # or your OPENCLAW_DIR\u002Fworkspace\ngit clone https:\u002F\u002Fgithub.com\u002Fcarlosazaustre\u002FtenacitOS.git mission-control\ncd mission-control\nnpm install\n```\n\n### 2. Configure environment\n\n```bash\ncp .env.example .env.local\n```\n\nEdit `.env.local`:\n\n```env\n# --- Auth (required) ---\n# Strong password to log in to the dashboard\nADMIN_PASSWORD=your-secure-password-here\n\n# Random secret used to sign the auth cookie\n# Generate with: openssl rand -base64 32\nAUTH_SECRET=your-random-32-char-secret-here\n\n# --- OpenClaw paths (optional — defaults work for standard installs) ---\n# OPENCLAW_DIR=\u002Froot\u002F.openclaw\n\n# --- Branding (customize for your instance) ---\nNEXT_PUBLIC_AGENT_NAME=Mission Control\nNEXT_PUBLIC_AGENT_EMOJI=🤖\nNEXT_PUBLIC_AGENT_DESCRIPTION=Your AI co-pilot, powered by OpenClaw\nNEXT_PUBLIC_AGENT_LOCATION=             # e.g. \"Madrid, Spain\"\nNEXT_PUBLIC_BIRTH_DATE=                 # ISO date, e.g. \"2026-01-01\"\nNEXT_PUBLIC_AGENT_AVATAR=               # path to image in \u002Fpublic, e.g. \"\u002Favatar.jpg\"\n\nNEXT_PUBLIC_OWNER_USERNAME=your-username\nNEXT_PUBLIC_OWNER_EMAIL=your-email@example.com\nNEXT_PUBLIC_TWITTER_HANDLE=@username\nNEXT_PUBLIC_COMPANY_NAME=MISSION CONTROL, INC.\nNEXT_PUBLIC_APP_TITLE=Mission Control\n```\n\n> **Tip:** `OPENCLAW_DIR` defaults to `\u002Froot\u002F.openclaw`. If your OpenClaw is installed elsewhere, set this variable.\n\n### 3. Initialize data files\n\n```bash\ncp data\u002Fcron-jobs.example.json data\u002Fcron-jobs.json\ncp data\u002Factivities.example.json data\u002Factivities.json\ncp data\u002Fnotifications.example.json data\u002Fnotifications.json\ncp data\u002Fconfigured-skills.example.json data\u002Fconfigured-skills.json\ncp data\u002Ftasks.example.json data\u002Ftasks.json\n```\n\n### 4. Generate secrets\n\n```bash\n# Auth secret\nopenssl rand -base64 32\n\n# Password (or use a password manager)\nopenssl rand -base64 18\n```\n\n### 5. Run\n\n```bash\n# Development\nnpm run dev\n# → http:\u002F\u002Flocalhost:3000\n\n# Production build\nnpm run build\nnpm start\n```\n\nLogin at `http:\u002F\u002Flocalhost:3000` with the `ADMIN_PASSWORD` you set.\n\n---\n\n## Production Deployment\n\n### PM2 (recommended)\n\n```bash\nnpm run build\n\npm2 start npm --name \"mission-control\" -- start\npm2 save\npm2 startup   # enable auto-restart on reboot\n```\n\n### systemd\n\nCreate `\u002Fetc\u002Fsystemd\u002Fsystem\u002Fmission-control.service`:\n\n```ini\n[Unit]\nDescription=TenacitOS — OpenClaw Mission Control\nAfter=network.target\n\n[Service]\nType=simple\nUser=root\nWorkingDirectory=\u002Froot\u002F.openclaw\u002Fworkspace\u002Fmission-control\nExecStart=\u002Fusr\u002Fbin\u002Fnpm start\nRestart=always\nRestartSec=10\nEnvironment=NODE_ENV=production\n\n[Install]\nWantedBy=multi-user.target\n```\n\n```bash\nsudo systemctl daemon-reload\nsudo systemctl enable mission-control\nsudo systemctl start mission-control\n```\n\n### Reverse proxy — Caddy (HTTPS)\n\n```caddy\nmission-control.yourdomain.com {\n    reverse_proxy localhost:3000\n}\n```\n\n> When behind HTTPS, `secure: true` is set automatically on the auth cookie.\n\n---\n\n## Configuration\n\n### Agent branding\n\nAll personal data stays in `.env.local` (gitignored). The `src\u002Fconfig\u002Fbranding.ts` file reads from env vars — **never edit it directly** with your personal data.\n\n### Agent discovery\n\nAgents are auto-discovered from `openclaw.json` at startup. The `\u002Fapi\u002Fagents` endpoint reads:\n\n```json\n{\n  \"agents\": {\n    \"list\": [\n      { \"id\": \"main\", \"name\": \"...\", \"workspace\": \"...\", \"model\": {...} },\n      { \"id\": \"studio\", \"name\": \"...\", \"workspace\": \"...\" }\n    ]\n  }\n}\n```\n\nEach agent can define its own visual appearance in `openclaw.json`:\n\n```json\n{\n  \"id\": \"studio\",\n  \"name\": \"My Studio Agent\",\n  \"ui\": {\n    \"emoji\": \"🎬\",\n    \"color\": \"#E91E63\"\n  }\n}\n```\n\n### Office 3D — agent positions\n\nThe 3D office has default positions for up to 6 agents. To customize positions, names, and colors for your own agents, edit `src\u002Fcomponents\u002FOffice3D\u002FagentsConfig.ts`:\n\n```ts\nexport const AGENTS: AgentConfig[] = [\n  {\n    id: \"main\",       \u002F\u002F must match workspace ID\n    name: \"...\",      \u002F\u002F display name (can also come from API)\n    emoji: \"🤖\",\n    position: [0, 0, 0],\n    color: \"#FFCC00\",\n    role: \"Main Agent\",\n  },\n  \u002F\u002F add your sub-agents here\n];\n```\n\n### 3D Avatar models\n\nTo add custom 3D avatars (Ready Player Me GLB format), place them in `public\u002Fmodels\u002F`:\n\n```\npublic\u002Fmodels\u002F\n├── main.glb        ← main agent avatar\n├── studio.glb      ← workspace-studio agent\n└── infra.glb       ← workspace-infra agent\n```\n\nFilename must match the agent `id`. If no file is found, a colored sphere is shown as fallback.  \nSee `public\u002Fmodels\u002FREADME.md` for full instructions.\n\n### Cost tracking\n\nUsage is collected from OpenClaw's SQLite databases via a script:\n\n```bash\n# Collect once\nnpx tsx scripts\u002Fcollect-usage.ts\n\n# Auto-collect every hour (adds a cron job)\n.\u002Fscripts\u002Fsetup-cron.sh\n```\n\nSee [docs\u002FCOST-TRACKING.md](.\u002Fdocs\u002FCOST-TRACKING.md) for details.\n\n---\n\n## Project Structure\n\n```\nmission-control\u002F\n├── src\u002F\n│   ├── app\u002F\n│   │   ├── (dashboard)\u002F      # Dashboard pages (protected)\n│   │   ├── api\u002F              # API routes\n│   │   ├── login\u002F            # Login page\n│   │   └── office\u002F           # 3D office (unprotected route)\n│   ├── components\u002F\n│   │   ├── TenacitOS\u002F        # OS-style UI shell (topbar, dock, status bar)\n│   │   └── Office3D\u002F         # React Three Fiber 3D office\n│   ├── config\u002F\n│   │   └── branding.ts       # Branding constants (reads from env vars)\n│   └── lib\u002F                  # Utilities (pricing, queries, activity logger...)\n├── data\u002F                     # JSON data files (gitignored — use .example versions)\n├── docs\u002F                     # Extended documentation\n├── public\u002F\n│   └── models\u002F               # GLB avatar models (add your own)\n├── scripts\u002F                  # Setup and data collection scripts\n├── .env.example              # Environment variable template\n└── middleware.ts             # Auth guard for all routes\n```\n\n---\n\n## Security\n\n- All routes (including all `\u002Fapi\u002F*`) require authentication — handled by `src\u002Fmiddleware.ts`\n- `\u002Fapi\u002Fauth\u002Flogin` and `\u002Fapi\u002Fhealth` are the only public endpoints\n- Login is rate-limited: **5 failed attempts → 15-minute lockout** per IP\n- Auth cookie is `httpOnly`, `sameSite: lax`, and `secure` in production\n- Terminal API uses a strict command allowlist — `env`, `curl`, `wget`, `node`, `python` are blocked\n- **Never commit `.env.local`** — it contains your credentials\n\nGenerate fresh secrets:\n\n```bash\nopenssl rand -base64 32   # AUTH_SECRET\nopenssl rand -base64 18   # ADMIN_PASSWORD\n```\n\n---\n\n## Troubleshooting\n\n**\"Gateway not reachable\" \u002F agent data missing**\n\n```bash\nopenclaw status\nopenclaw gateway start   # if not running\n```\n\n**\"Database not found\" (cost tracking)**\n\n```bash\nnpx tsx scripts\u002Fcollect-usage.ts\n```\n\n**Build errors after pulling updates**\n\n```bash\nrm -rf .next node_modules\nnpm install\nnpm run build\n```\n\n**Scripts not executable**\n\n```bash\nchmod +x scripts\u002F*.sh\n```\n\n---\n\n## Tech Stack\n\n| Layer | Tech |\n|---|---|\n| Framework | Next.js 15 (App Router) |\n| UI | React 19 + Tailwind CSS v4 |\n| 3D | React Three Fiber + Drei |\n| Charts | Recharts |\n| Icons | Lucide React |\n| Database | SQLite (better-sqlite3) |\n| Runtime | Node.js 22 |\n\n---\n\n## Contributing\n\n1. Fork the repo\n2. Create a feature branch (`git checkout -b feat\u002Fmy-feature`)\n3. **Keep personal data out of commits** — use `.env.local` and `data\u002F` (both gitignored)\n4. Write clear commit messages\n5. Open a PR\n\nSee [CONTRIBUTING.md](.\u002FCONTRIBUTING.md) for more details.\n\n---\n\n## License\n\nMIT — see [LICENSE](.\u002FLICENSE)\n\n---\n\n## Links\n\n- [OpenClaw](https:\u002F\u002Fopenclaw.ai) — the AI agent runtime this dashboard is built for\n- [OpenClaw Docs](https:\u002F\u002Fdocs.openclaw.ai)\n- [Discord Community](https:\u002F\u002Fdiscord.com\u002Finvite\u002Fclawd)\n- [GitHub Issues](..\u002F..\u002Fissues) — bug reports and feature requests\n","TenacitOS 是一个专为 OpenClaw AI 代理实例设计的实时仪表盘和控制中心。它使用 Next.js、React 19 和 Tailwind CSS v4 构建，能够直接从主机读取配置、代理、会话、内存和日志信息，无需额外数据库或后端支持。核心功能包括系统监控（CPU、RAM、磁盘、网络）、代理管理、成本追踪、定时任务管理、活动日志、内存浏览器、文件浏览器、全局搜索、通知中心以及一个基于 React Three Fiber 的3D办公室界面。适用于需要对 AI 代理进行集中管理和监控的场景，如企业级自动化运维、AI 项目开发与测试等。","2026-06-11 03:51:54","high_star"]