CSLite is built for resource-constrained nodes and serverless environments — zero Redis, zero external message queues. Its portable Web Standards server (TypeScript + Hono) deploys identically to Node.js / Docker, Cloudflare Workers + D1 (+ R2), and Tencent Cloud SCF, while its zero-dependency single-binary Rust agent (cslite-agent) and POSIX/PowerShell Lite scripts run smoothly on Linux, OpenWrt, Alpine, macOS, Windows, and Android (Termux).
- Multi-Runtime Control Plane (
server/)- Node.js / Docker: Built-in
node:sqliteout of the box (Node>= 22.5), plus MySQL 8.x and Turso HTTP drivers. - Cloudflare Workers: Native D1 database, optional R2 release-asset bucket (
RELEASES_BUCKET), and zero Node.js runtime dependencies. - Tencent Cloud SCF + CDN: Supports Web Function (
scf_bootstrap) and APIGW Event handler (scf.main_handler) with origin-secret protection. - HTTPS / HTTP Layered Routing: Browser & management APIs enforce HTTPS (
CSLITE_FORCE_WEB_HTTPS=true), while Agent routes (/api/agent/*,/i,/u,/t-XXXXXX) remain plain HTTP for lightweight embedded devices without TLS overhead.
- Node.js / Docker: Built-in
- Vue 3 Zero-CDN Web UI (
web/)- Compiled by
web/build.mjsinto an inline HTML shell + content-hashed/assets/*.js&/assets/*.css(1-yearimmutablecache + weak ETag), with zero external fonts or CDNs. - Bilingual UI (中文 / English): Automatically detects browser preferred language (
navigator.languages), with one-click switching in the top bar and Settings page. - Fleet & Operations: Per-user SWR cache, incremental device sync (
since/active_ids), 60-slot poll health matrix,1h / 24h / 7d / 30dhealth timelines, online terminal, multi-host batch console with Output Diff, cron scheduling, Logs Center, and configurable retention.
- Compiled by
- Single-Process Cross-Platform Agent (
agent-rs/&agent/)- Single Binary, Single Config: Pure
stdRustcslite-agent(no external HTTP/TLS crate, nocslite-daemonwrapper) managed directly bysystemd, OpenWrtprocd+ UCI, OpenRC,launchd, or Windows SCM, with unifiedconfig.envpersistence. - Safe Self-Upgrade & Release Distribution: 15-second pre-flight verification before atomic binary replacement, backed by Cloudflare R2 / Tencent COS / GitHub Releases.
- 6-Digit TOTP Quick Auth (
/t-XXXXXX): Short-lived enrollment links for frictionless device onboarding.
- Single Binary, Single Config: Pure
- AI / Automation Native (
mcp/&skills/)- Built-in stateless Streamable HTTP MCP endpoint (
/mcp) with/.well-known/mcp.jsondiscovery, local stdio MCP (mcp/dist/cslite-mcp.mjs), andcslite-remoteAgent Skill.
- Built-in stateless Streamable HTTP MCP endpoint (
- Node.js
>= 22.5(uses built-innode:sqlite) - Rust toolchain (
cargo/rustc) (only needed when buildingagent-rslocally)
make install # Install Node dependencies
make dev # Build Web UI + agent scripts and start Node dev server (./data/cslite.db)Open http://127.0.0.1:9000. Default admin credentials: admin / admin (override via CSLITE_ADMIN_PASSWORD in production).
make build-web # Assemble agent scripts & build Vue 3 Web UI into server/src/ui-bundle.ts
make typecheck # Run TypeScript + vue-tsc type checks
make check-size # Check source/script line-count budgets
make dev-worker # Run Cloudflare Workers locally (wrangler dev)
make deploy-worker # Build Web UI and deploy to Cloudflare Workers
make build-scf # Package Tencent Cloud SCF zip -> deploy/scf/dist/cslite-scf.zip
make build-agent # Build Rust cslite-agent binary for host OS/arch
make build-agent-all # Cross-compile Linux musl (amd64/arm64/armv7) binaries -> dist/agent/
make build-openwrt-ipk # Build OpenWrt .ipk packages -> dist/openwrt/
make docker-build # Build multi-stage Node 22 Alpine Docker image
make test # Full verification (build-web + typecheck + vitest + cargo test)Full navigation: docs/README.md
- Architecture: Overview · Data Models (16 Tables) · Agent Lifecycle · Web UI
- Deployment & Security: Node & Docker · Cloudflare Workers + D1 + R2 · Tencent Cloud SCF · Cross-Platform Agents · Security Hardening
- Reference: Permissions · Auth API · Devices & Groups API · Commands & Logs API · System API · Agent Protocol · MCP & Skills · Environment Variables · Error Codes
- Development: Architectural Invariants · Roadmap
