Qling Client 是 Qling 桌面 AI 平台的客户端,核心目标是让 AI 从“文本聊天”升级为“可交互应用”。
用户不仅能对话,还可以通过按钮、表单、滑块、单选框等 UI 控件完成任务,并将能力封装成 Q-App 进行分发和复用。
- AI 应用化体验: 相比纯聊天窗口,Qling 让 AI 输出结构化交互界面,降低使用门槛。
- Q-App 生态: 支持构建、安装、管理和运行 AI 小应用,便于形成可复用能力库。
- 多模型接入: 支持 OpenAI、Anthropic、Gemini、DeepSeek、Groq、Mistral、xAI、Perplexity、Ollama 等。
- 本地优先安全: API Key 本地存储,不上传到客户端仓库或第三方托管服务。
- 桌面能力融合: 基于 Electron,具备系统级能力扩展空间(文件、窗口、权限控制等)。
- 多语言支持: 内置中文、英文、日文、韩文国际化能力。
本仓库 仅包含客户端代码(Electron + React)。
不包含后端服务、管理后台、部署脚本等服务端项目。
如果你是首次接入,请准备一个可用的 Qling 后端 API 地址,并配置到 VITE_API_URL。
| 层级 | 技术 |
|---|---|
| 桌面框架 | Electron 33 |
| 前端 | React 19 + TypeScript |
| 构建工具 | Vite 6 + electron-builder |
| AI SDK | Vercel AI SDK(多供应商) |
| 渲染/UI | Tailwind CSS 4 + JSON Render |
| 3D 能力 | Three.js + React Three Fiber |
- Node.js >= 18
- npm(或 pnpm/yarn,自行适配命令)
cp .env.example .env将 .env 中的 VITE_API_URL 改为你的后端地址,例如:
VITE_API_URL=http://localhost:4000Windows PowerShell 可用:
Copy-Item .env.example .envnpm install
npm run devnpm run dev # 本地开发
npm run lint # 代码检查
npm run build # 构建前端与 Electron 产物
npm run pack # 打包 Windows 安装包
npm run pack:dir # 仅输出目录,不生成安装器npm run pack 的输出位于 release/ 目录。
Q-App 运行在客户端内置运行时中,常见两种模式:
- 默认模式(Default Mode): 使用 JS/TS 类与生命周期(如
onInit、onActivate、onDeactivate)。 - 自定义界面模式(Custom Mode): 使用 HTML 页面,通过注入的
app对象访问 AI、存储和文件能力。
src/
pages/ # 页面级功能
components/ # 通用 UI 组件
contexts/ # React 上下文
services/ # 业务服务(AI、认证、应用等)
qapp/ # Q-App 运行时核心
qapps/ # 内置 Q-App
types/ # 类型定义
utils/ # 工具与 i18n
electron/
main.ts # Electron 主进程
preload.ts # 安全 IPC 桥接
ai-ipc.ts # AI 流式通信 IPC
ai-service.ts # 多模型接入服务
- 欢迎提交 Issue 和 PR。
- 提交前建议执行
npm run lint。 - 涉及功能改动时,请补充必要说明和测试步骤。
本项目使用 MIT License。
Qling Client is the desktop client of the Qling AI platform.
Its core idea is to move from plain chat to interactive AI applications.
Instead of only text responses, AI can drive app-like UI interactions with controls such as buttons, forms, sliders, and selectors.
- App-like AI UX: Structured, interactive workflows instead of text-only conversations.
- Q-App Ecosystem: Build, install, and run reusable AI mini-apps.
- Multi-Provider AI: OpenAI, Anthropic, Gemini, DeepSeek, Groq, Mistral, xAI, Perplexity, Ollama, and more.
- Local-First Security: API keys are stored locally and are not committed to this repo.
- Desktop Extensibility: Electron architecture enables deeper system integration.
- Built-in i18n: Chinese, English, Japanese, and Korean support.
This repository contains client-side code only (Electron + React).
Backend services, admin panel, and deployment infrastructure are intentionally excluded.
You need a reachable backend API and should configure it via VITE_API_URL.
| Layer | Technology |
|---|---|
| Desktop | Electron 33 |
| Frontend | React 19 + TypeScript |
| Build | Vite 6 + electron-builder |
| AI SDK | Vercel AI SDK (multi-provider) |
| UI | Tailwind CSS 4 + JSON Render |
| 3D | Three.js + React Three Fiber |
- Node.js >= 18
- npm (or pnpm/yarn with equivalent commands)
cp .env.example .envSet backend endpoint in .env:
VITE_API_URL=http://localhost:4000PowerShell alternative:
Copy-Item .env.example .envnpm install
npm run devnpm run dev
npm run lint
npm run build
npm run pack
npm run pack:dirnpm run pack outputs the installer into release/.
- Default Mode: JS/TS class with lifecycle hooks (
onInit,onActivate,onDeactivate). - Custom Mode: HTML-based app using injected
appAPIs for AI, storage, and filesystem.
src/
pages/
components/
contexts/
services/
qapp/
qapps/
types/
utils/
electron/
main.ts
preload.ts
ai-ipc.ts
ai-service.ts
- Issues and pull requests are welcome.
- Please run
npm run lintbefore submitting. - Include verification steps for functional changes.
Licensed under MIT.