[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-open-webui--open-terminal":3,"tool-open-webui--open-terminal":62},[4,18,26,36,46,54],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":17},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,3,"2026-04-06T06:32:30",[13,14,15,16],"Agent","开发框架","图像","数据工具","ready",{"id":19,"name":20,"github_repo":21,"description_zh":22,"stars":23,"difficulty_score":10,"last_commit_at":24,"category_tags":25,"status":17},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,"2026-04-05T11:01:52",[14,15,13],{"id":27,"name":28,"github_repo":29,"description_zh":30,"stars":31,"difficulty_score":32,"last_commit_at":33,"category_tags":34,"status":17},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",160015,2,"2026-04-18T11:30:52",[14,13,35],"语言模型",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":42,"last_commit_at":43,"category_tags":44,"status":17},8272,"opencode","anomalyco\u002Fopencode","OpenCode 是一款开源的 AI 编程助手（Coding Agent），旨在像一位智能搭档一样融入您的开发流程。它不仅仅是一个代码补全插件，而是一个能够理解项目上下文、自主规划任务并执行复杂编码操作的智能体。无论是生成全新功能、重构现有代码，还是排查难以定位的 Bug，OpenCode 都能通过自然语言交互高效完成，显著减少开发者在重复性劳动和上下文切换上的时间消耗。\n\n这款工具专为软件开发者、工程师及技术研究人员设计，特别适合希望利用大模型能力来提升编码效率、加速原型开发或处理遗留代码维护的专业人群。其核心亮点在于完全开源的架构，这意味着用户可以审查代码逻辑、自定义行为策略，甚至私有化部署以保障数据安全，彻底打破了传统闭源 AI 助手的“黑盒”限制。\n\n在技术体验上，OpenCode 提供了灵活的终端界面（Terminal UI）和正在测试中的桌面应用程序，支持 macOS、Windows 及 Linux 全平台。它兼容多种包管理工具，安装便捷，并能无缝集成到现有的开发环境中。无论您是追求极致控制权的资深极客，还是渴望提升产出的独立开发者，OpenCode 都提供了一个透明、可信",144296,1,"2026-04-16T14:50:03",[13,45],"插件",{"id":47,"name":48,"github_repo":49,"description_zh":50,"stars":51,"difficulty_score":32,"last_commit_at":52,"category_tags":53,"status":17},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",109154,"2026-04-18T11:18:24",[14,15,13],{"id":55,"name":56,"github_repo":57,"description_zh":58,"stars":59,"difficulty_score":32,"last_commit_at":60,"category_tags":61,"status":17},6121,"gemini-cli","google-gemini\u002Fgemini-cli","gemini-cli 是一款由谷歌推出的开源 AI 命令行工具，它将强大的 Gemini 大模型能力直接集成到用户的终端环境中。对于习惯在命令行工作的开发者而言，它提供了一条从输入提示词到获取模型响应的最短路径，无需切换窗口即可享受智能辅助。\n\n这款工具主要解决了开发过程中频繁上下文切换的痛点，让用户能在熟悉的终端界面内直接完成代码理解、生成、调试以及自动化运维任务。无论是查询大型代码库、根据草图生成应用，还是执行复杂的 Git 操作，gemini-cli 都能通过自然语言指令高效处理。\n\n它特别适合广大软件工程师、DevOps 人员及技术研究人员使用。其核心亮点包括支持高达 100 万 token 的超长上下文窗口，具备出色的逻辑推理能力；内置 Google 搜索、文件操作及 Shell 命令执行等实用工具；更独特的是，它支持 MCP（模型上下文协议），允许用户灵活扩展自定义集成，连接如图像生成等外部能力。此外，个人谷歌账号即可享受免费的额度支持，且项目基于 Apache 2.0 协议完全开源，是提升终端工作效率的理想助手。",100752,"2026-04-10T01:20:03",[45,13,15,14],{"id":63,"github_repo":64,"name":65,"description_en":66,"description_zh":67,"ai_summary_zh":67,"readme_en":68,"readme_zh":69,"quickstart_zh":70,"use_case_zh":71,"hero_image_url":72,"owner_login":73,"owner_name":74,"owner_avatar_url":75,"owner_bio":76,"owner_company":77,"owner_location":77,"owner_email":78,"owner_twitter":79,"owner_website":80,"owner_url":81,"languages":82,"stars":99,"forks":100,"last_commit_at":101,"license":102,"difficulty_score":32,"env_os":103,"env_gpu":104,"env_ram":105,"env_deps":106,"category_tags":115,"github_topics":116,"view_count":32,"oss_zip_url":77,"oss_zip_packed_at":77,"status":17,"created_at":121,"updated_at":122,"faqs":123,"releases":152},9075,"open-webui\u002Fopen-terminal","open-terminal","A computer you can curl ⚡","open-terminal 是一个轻量级、可自托管的远程终端服务，专为 AI 智能体和自动化工具打造。它通过简洁的 REST API，让 AI 能够安全地执行命令、管理文件及运行代码，完美解决了大模型“只会写代码却无法直接运行”的痛点。\n\n该工具提供两种灵活的部署模式：一是基于 Docker 的沙箱环境，预装了 Python、Node.js、Git 及各类数据科学库，将 AI 操作隔离在容器内，确保宿主机系统安全；二是“裸金属”模式，可直接安装在任意 Python 环境中，让 AI 拥有对本机文件和工具的完全访问权，适合本地开发或个人自动化场景。\n\nopen-terminal 特别适合开发者、AI 研究人员以及希望构建自主 Agent 的技术用户。其独特亮点在于丰富的镜像变体选择（从功能齐全的完整版到极小的 Alpine 版），支持通过环境变量动态安装 apt、pip 或 npm 包，并内置出口防火墙和多用户模式。无论是作为 AI 的安全试验场，还是个人项目的自动化助手，open-terminal 都能以极低门槛提供强大的执行环境。","# ⚡ Open Terminal\n\nA lightweight, self-hosted terminal that gives AI agents and automation tools a dedicated environment to run commands, manage files, and execute code — all through a simple API.\n\n## Why Open Terminal?\n\nAI assistants are great at writing code, but they need somewhere to *run* it. Open Terminal is that place — a remote shell with file management, search, and more, accessible over a simple REST API.\n\nYou can run it two ways:\n\n- **Docker (sandboxed)** — runs in an isolated container with a full toolkit pre-installed: Python, Node.js, git, build tools, data science libraries, ffmpeg, and more. Great for giving AI agents a safe playground without touching your host system.\n- **Bare metal** — install it with `pip` and run it anywhere Python runs. Commands run directly on your machine with access to your real files, your real tools, and your real environment, perfect for local development, personal automation, or giving an AI assistant full access to your actual projects.\n\n## Getting Started\n\n### Docker (recommended)\n\n```bash\ndocker run -d --name open-terminal --restart unless-stopped -p 8000:8000 -v open-terminal:\u002Fhome\u002Fuser -e OPEN_TERMINAL_API_KEY=your-secret-key ghcr.io\u002Fopen-webui\u002Fopen-terminal\n```\n\nThat's it — you're up and running at `http:\u002F\u002Flocalhost:8000`.\n\n> [!TIP]\n> If you don't set an API key, one is generated automatically. Grab it with `docker logs open-terminal`.\n\n#### Image Variants\n\n| | `latest` | `slim` | `alpine` |\n|---|---|---|---|\n| **Best for** | AI agent sandboxes | Production \u002F hardened | Edge \u002F CI \u002F minimal footprint |\n| **Size** | ~4 GB | ~430 MB | ~230 MB |\n| **Bundled tooling** | Node.js, gcc, ffmpeg, LaTeX, Docker CLI, data science libs | git, curl, jq | git, curl, jq |\n| **Install packages at runtime** | ✔ (has `sudo`) | ✘ | ✘ |\n| **Multi-user mode** | ✔ | ✘ | ✘ |\n| **Egress firewall** | ✔ | ✔ | ✔ |\n\n**`slim`** and **`alpine`** have the same feature set. Slim uses Debian (glibc) for broader binary compatibility; Alpine uses musl libc and is smaller, but some C-extension pip packages may need to compile from source.\n\n```bash\ndocker run -d -p 8000:8000 -e OPEN_TERMINAL_API_KEY=secret ghcr.io\u002Fopen-webui\u002Fopen-terminal:slim\ndocker run -d -p 8000:8000 -e OPEN_TERMINAL_API_KEY=secret ghcr.io\u002Fopen-webui\u002Fopen-terminal:alpine\n```\n\n> [!NOTE]\n> Slim and Alpine don't support `OPEN_TERMINAL_PACKAGES` \u002F `OPEN_TERMINAL_PIP_PACKAGES` \u002F `OPEN_TERMINAL_NPM_PACKAGES`. To add packages, extend [Dockerfile.slim](Dockerfile.slim) or [Dockerfile.alpine](Dockerfile.alpine).\n\n#### Updating\n\n```bash\ndocker pull ghcr.io\u002Fopen-webui\u002Fopen-terminal\ndocker rm -f open-terminal\n```\n\nThen re-run the `docker run` command above.\n\n### Bare Metal\n\nNo Docker? No problem. Open Terminal is a standard Python package:\n\n```bash\n# One-liner with uvx (no install needed)\nuvx open-terminal run --host 0.0.0.0 --port 8000 --api-key your-secret-key\n\n# Or install globally with pip\npip install open-terminal\nopen-terminal run --host 0.0.0.0 --port 8000 --api-key your-secret-key\n```\n\n> [!CAUTION]\n> On bare metal, commands run directly on your machine with your user's permissions. Use Docker if you want sandboxed execution.\n\n#### Customizing the Docker Environment\n\nThe easiest way to add extra packages is with environment variables — no fork needed:\n\n```bash\ndocker run -d --name open-terminal -p 8000:8000 \\\n  -e OPEN_TERMINAL_PACKAGES=\"cowsay figlet\" \\\n  -e OPEN_TERMINAL_PIP_PACKAGES=\"httpx polars\" \\\n  -e OPEN_TERMINAL_NPM_PACKAGES=\"typescript tsx\" \\\n  ghcr.io\u002Fopen-webui\u002Fopen-terminal\n```\n\n| Variable | Description |\n|---|---|\n| `OPEN_TERMINAL_PACKAGES` | Space-separated list of **apt** packages to install at startup |\n| `OPEN_TERMINAL_PIP_PACKAGES` | Space-separated list of **pip** packages to install at startup |\n| `OPEN_TERMINAL_NPM_PACKAGES` | Space-separated list of **npm** packages to install globally at startup |\n\n> [!NOTE]\n> Packages are installed each time the container starts, so startup will take longer with large package lists. For heavy customization, build a custom image instead.\n\n#### Docker Access\n\nThe image includes the Docker CLI, Compose, and Buildx. To let agents build images, run containers, etc., mount the host's Docker socket:\n\n```bash\ndocker run -d --name open-terminal -p 8000:8000 \\\n  -v \u002Fvar\u002Frun\u002Fdocker.sock:\u002Fvar\u002Frun\u002Fdocker.sock \\\n  -v open-terminal:\u002Fhome\u002Fuser \\\n  ghcr.io\u002Fopen-webui\u002Fopen-terminal\n```\n\n> [!CAUTION]\n> Mounting the Docker socket gives the container **full control over the host's Docker daemon**, which is effectively root access on the host machine. Anyone with access to the terminal can pull\u002Frun arbitrary containers (including `--privileged` ones), mount host directories, access host networking, and manage all containers on the host. Only do this in fully trusted environments.\n\nFor full control, fork the repo, edit the [Dockerfile](Dockerfile), and build your own image:\n\n```bash\ndocker build -t my-terminal .\ndocker run -d --name open-terminal -p 8000:8000 my-terminal\n```\n\n\n## Configuration\n\nOpen Terminal can be configured via a TOML config file, environment variables, and CLI flags. Settings are resolved in this order (highest priority wins):\n\n1. **CLI flags** (`--host`, `--port`, `--api-key`, etc.)\n2. **Environment variables** (`OPEN_TERMINAL_API_KEY`, etc.)\n3. **User config** — `$XDG_CONFIG_HOME\u002Fopen-terminal\u002Fconfig.toml` (defaults to `~\u002F.config\u002Fopen-terminal\u002Fconfig.toml`)\n4. **System config** — `\u002Fetc\u002Fopen-terminal\u002Fconfig.toml`\n5. **Built-in defaults**\n\nCreate a config file at either location with any of these keys (all optional):\n\n```toml\nhost = \"0.0.0.0\"\nport = 8000\napi_key = \"sk-my-secret-key\"\ncors_allowed_origins = \"*\"\nlog_dir = \"\u002Fvar\u002Flog\u002Fopen-terminal\"\nbinary_mime_prefixes = \"image,audio\"\nexecute_timeout = 5  # seconds to wait for command output (unset by default)\n```\n\n> [!TIP]\n> Use the system config at `\u002Fetc\u002Fopen-terminal\u002Fconfig.toml` to set site-wide defaults for host and port, and the user config for personal settings like the API key — this keeps the key out of `ps` \u002F `htop`.\n\nYou can also point to a specific config file:\n\n```bash\nopen-terminal run --config \u002Fpath\u002Fto\u002Fmy-config.toml\n```\n\n## Using with Open WebUI\n\nOpen Terminal integrates with [Open WebUI](https:\u002F\u002Fgithub.com\u002Fopen-webui\u002Fopen-webui), giving your AI assistants the ability to run commands, manage files, and interact with a terminal right from the AI interface. Make sure to add it under **Open Terminal** in the integrations settings, not as a tool server. Adding it as an Open Terminal connection gives you a built-in file navigation sidebar where you can browse directories, upload, download, and edit files. There are two ways to connect:\n\n### Direct Connection\n\nUsers can connect their own Open Terminal instance from their user settings. This is useful when the terminal is running on their local machine or a network only they can reach, since requests go directly from the **browser**.\n\n1. Go to **User Settings → Integrations → Open Terminal**\n2. Add the terminal **URL** and **API key**\n3. Enable the connection\n\n### System-Level Connection (Multi-User)\n\nAdmins can configure Open Terminal connections for all their users from the admin panel. No additional services required. Multiple terminals can be set up with access controlled at the user or group level. Requests are proxied through the Open WebUI **backend**, so the terminal only needs to be reachable from the server.\n\n1. Go to **Admin Settings → Integrations → Open Terminal**\n2. Add the terminal **URL** and **API key**\n3. Enable the connection\n\n#### Built-in Multi-User Isolation\n\n> [!CAUTION]\n> Single-container multi-user mode is **not designed for production multi-user deployments**. All users share the same kernel, network, and system resources with no hard isolation boundaries between them. If one user's process misbehaves, it can affect every other user on the system. This mode exists as a lightweight convenience for small, trusted groups — not as a security model you should rely on.\n\nFor small, trusted deployments you can enable per-user isolation inside a single container:\n\n```bash\ndocker run -d --name open-terminal -p 8000:8000 \\\n  -v open-terminal:\u002Fhome \\\n  -e OPEN_TERMINAL_MULTI_USER=true \\\n  -e OPEN_TERMINAL_API_KEY=your-secret-key \\\n  ghcr.io\u002Fopen-webui\u002Fopen-terminal\n```\n\nEach user automatically gets a dedicated Linux account with its own home directory. Files, commands, and terminals are isolated between users via standard Unix permissions.\n\n## API Docs\n\nFull interactive API documentation is available at [http:\u002F\u002Flocalhost:8000\u002Fdocs](http:\u002F\u002Flocalhost:8000\u002Fdocs) once your instance is running.\n\n## Star History\n\n\u003Ca href=\"https:\u002F\u002Fstar-history.com\u002F#open-webui\u002Fopen-terminal&Date\">\n  \u003Cpicture>\n    \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fopen-webui_open-terminal_readme_aa6531fd328d.png&theme=dark\" \u002F>\n    \u003Csource media=\"(prefers-color-scheme: light)\" srcset=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fopen-webui_open-terminal_readme_aa6531fd328d.png\" \u002F>\n    \u003Cimg alt=\"Star History Chart\" src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fopen-webui_open-terminal_readme_aa6531fd328d.png\" \u002F>\n  \u003C\u002Fpicture>\n\u003C\u002Fa>\n\n> [!TIP]\n> **Need container-per-user isolation?** Check out **[Terminals](https:\u002F\u002Fgithub.com\u002Fopen-webui\u002Fterminals)**, which provisions and manages separate Open Terminal containers per user. For lighter deployments, built-in multi-user mode (`OPEN_TERMINAL_MULTI_USER=true`) provides per-user isolation inside a single container.\n\n## License\n\nMIT — see [LICENSE](LICENSE) for details.\n","# ⚡ Open Terminal\n\n一款轻量级、自托管的终端，为 AI 助手和自动化工具提供了一个专用环境，用于运行命令、管理文件和执行代码——所有这些都通过一个简单的 API 完成。\n\n## 为什么选择 Open Terminal？\n\nAI 助手非常擅长编写代码，但它们需要一个地方来“运行”这些代码。Open Terminal 就是这样一个地方——一个带有文件管理、搜索等功能的远程 Shell，可以通过简单的 REST API 访问。\n\n你可以通过两种方式运行它：\n\n- **Docker（沙箱化）** — 在一个隔离的容器中运行，预装了完整的工具集：Python、Node.js、git、构建工具、数据科学库、ffmpeg 等。非常适合为 AI 助手提供一个安全的实验环境，而不会影响你的主机系统。\n- **裸机** — 使用 `pip` 安装并运行在任何支持 Python 的环境中。命令会直接在你的机器上执行，访问你的真实文件、真实工具和真实环境，非常适合本地开发、个人自动化，或者让 AI 助手完全访问你的实际项目。\n\n## 快速开始\n\n### Docker（推荐）\n\n```bash\ndocker run -d --name open-terminal --restart unless-stopped -p 8000:8000 -v open-terminal:\u002Fhome\u002Fuser -e OPEN_TERMINAL_API_KEY=your-secret-key ghcr.io\u002Fopen-webui\u002Fopen-terminal\n```\n\n仅此而已——你现在就可以在 `http:\u002F\u002Flocalhost:8000` 上使用它了。\n\n> [!TIP]\n> 如果你不设置 API 密钥，系统会自动生成一个。你可以通过 `docker logs open-terminal` 来获取它。\n\n#### 镜像变体\n\n| | `latest` | `slim` | `alpine` |\n|---|---|---|---|\n| **最适合** | AI 助手沙箱 | 生产\u002F加固 | 边缘\u002FCI\u002F极简占用 |\n| **大小** | ~4 GB | ~430 MB | ~230 MB |\n| **捆绑工具** | Node.js、gcc、ffmpeg、LaTeX、Docker CLI、数据科学库 | git、curl、jq | git、curl、jq |\n| **运行时安装包** | ✔（有 `sudo`） | ✘ | ✘ |\n| **多用户模式** | ✔ | ✘ | ✘ |\n| **出站防火墙** | ✔ | ✔ | ✔ |\n\n**`slim`** 和 **`alpine`** 具有相同的功能集。Slim 使用 Debian（glibc）以获得更广泛的二进制兼容性；Alpine 使用 musl libc，体积更小，但某些 C 扩展的 pip 包可能需要从源码编译。\n\n```bash\ndocker run -d -p 8000:8000 -e OPEN_TERMINAL_API_KEY=secret ghcr.io\u002Fopen-webui\u002Fopen-terminal:slim\ndocker run -d -p 8000:8000 -e OPEN_TERMINAL_API_KEY=secret ghcr.io\u002Fopen-webui\u002Fopen-terminal:alpine\n```\n\n> [!NOTE]\n> Slim 和 Alpine 不支持 `OPEN_TERMINAL_PACKAGES` \u002F `OPEN_TERMINAL_PIP_PACKAGES` \u002F `OPEN_TERMINAL_NPM_PACKAGES`。要添加软件包，可以扩展 [Dockerfile.slim](Dockerfile.slim) 或 [Dockerfile.alpine](Dockerfile.alpine)。\n\n#### 更新\n\n```bash\ndocker pull ghcr.io\u002Fopen-webui\u002Fopen-terminal\ndocker rm -f open-terminal\n```\n\n然后重新运行上面的 `docker run` 命令。\n\n### 裸机\n\n没有 Docker？没关系。Open Terminal 是一个标准的 Python 包：\n\n```bash\n# 使用 uvx 的一行命令（无需安装）\nuvx open-terminal run --host 0.0.0.0 --port 8000 --api-key your-secret-key\n\n# 或者使用 pip 全局安装\npip install open-terminal\nopen-terminal run --host 0.0.0.0 --port 8000 --api-key your-secret-key\n```\n\n> [!CAUTION]\n> 在裸机环境下，命令会直接在你的机器上以你的用户权限执行。如果你希望实现沙箱化执行，请使用 Docker。\n\n#### 自定义 Docker 环境\n\n添加额外软件包最简单的方式就是使用环境变量，无需分叉：\n\n```bash\ndocker run -d --name open-terminal -p 8000:8000 \\\n  -e OPEN_TERMINAL_PACKAGES=\"cowsay figlet\" \\\n  -e OPEN_TERMINAL_PIP_PACKAGES=\"httpx polars\" \\\n  -e OPEN_TERMINAL_NPM_PACKAGES=\"typescript tsx\" \\\n  ghcr.io\u002Fopen-webui\u002Fopen-terminal\n```\n\n| 变量 | 描述 |\n|---|---|\n| `OPEN_TERMINAL_PACKAGES` | 启动时要安装的 **apt** 软件包列表，用空格分隔 |\n| `OPEN_TERMINAL_PIP_PACKAGES` | 启动时要安装的 **pip** 软件包列表，用空格分隔 |\n| `OPEN_TERMINAL_NPM_PACKAGES` | 启动时要全局安装的 **npm** 软件包列表，用空格分隔 |\n\n> [!NOTE]\n> 每次容器启动时都会安装这些软件包，因此如果软件包列表较大，启动时间会更长。对于重度定制，建议构建自定义镜像。\n\n#### Docker 访问权限\n\n该镜像包含 Docker CLI、Compose 和 Buildx。要让助手能够构建镜像、运行容器等，可以挂载主机的 Docker socket：\n\n```bash\ndocker run -d --name open-terminal -p 8000:8000 \\\n  -v \u002Fvar\u002Frun\u002Fdocker.sock:\u002Fvar\u002Frun\u002Fdocker.sock \\\n  -v open-terminal:\u002Fhome\u002Fuser \\\n  ghcr.io\u002Fopen-webui\u002Fopen-terminal\n```\n\n> [!CAUTION]\n> 挂载 Docker socket 会使容器获得对主机 Docker 守护进程的**完全控制权**，这实际上等同于主机上的 root 权限。任何拥有终端访问权限的人都可以拉取\u002F运行任意容器（包括 `--privileged` 容器），挂载主机目录，访问主机网络，并管理主机上的所有容器。请仅在完全可信的环境中执行此操作。\n\n若需完全控制，可以 fork 仓库，编辑 [Dockerfile](Dockerfile)，然后构建自己的镜像：\n\n```bash\ndocker build -t my-terminal .\ndocker run -d --name open-terminal -p 8000:8000 my-terminal\n```\n\n\n## 配置\n\nOpen Terminal 可以通过 TOML 配置文件、环境变量和 CLI 标志进行配置。设置的优先级顺序如下（优先级越高越有效）：\n\n1. **CLI 标志**（`--host`、`--port`、`--api-key` 等）\n2. **环境变量**（`OPEN_TERMINAL_API_KEY` 等）\n3. **用户配置** — `$XDG_CONFIG_HOME\u002Fopen-terminal\u002Fconfig.toml`（默认为 `~\u002F.config\u002Fopen-terminal\u002Fconfig.toml`）\n4. **系统配置** — `\u002Fetc\u002Fopen-terminal\u002Fconfig.toml`\n5. **内置默认值**\n\n在上述任一位置创建配置文件，可以包含以下键（均为可选）：\n\n```toml\nhost = \"0.0.0.0\"\nport = 8000\napi_key = \"sk-my-secret-key\"\ncors_allowed_origins = \"*\"\nlog_dir = \"\u002Fvar\u002Flog\u002Fopen-terminal\"\nbinary_mime_prefixes = \"image,audio\"\nexecute_timeout = 5  # 等待命令输出的最大时间（秒），默认未设置\n```\n\n> [!TIP]\n> 使用 `\u002Fetc\u002Fopen-terminal\u002Fconfig.toml` 设置站点范围内的主机和端口默认值，而将 API 密钥等个性化设置放在用户配置中——这样可以避免密钥出现在 `ps` 或 `htop` 中。\n\n你也可以指定一个特定的配置文件：\n\n```bash\nopen-terminal run --config \u002Fpath\u002Fto\u002Fmy-config.toml\n```\n\n## 与 Open WebUI 配合使用\n\nOpen Terminal 可以与 [Open WebUI](https:\u002F\u002Fgithub.com\u002Fopen-webui\u002Fopen-webui) 集成，使你的 AI 助手能够直接从 AI 界面运行命令、管理文件并交互式地使用终端。请务必在集成设置中将其添加为 **Open Terminal**，而不是作为工具服务器。将其添加为 Open Terminal 连接后，你会获得一个内置的文件导航侧边栏，可以在其中浏览目录、上传、下载和编辑文件。连接方式有两种：\n\n### 直接连接\n\n用户可以从个人设置中连接自己的 Open Terminal 实例。当终端运行在本地机器上，或者仅限特定网络访问时，这种方式非常有用，因为请求会直接从 **浏览器** 发送。\n\n1. 前往 **用户设置 → 集成 → Open Terminal**\n2. 添加终端的 **URL** 和 **API 密钥**\n3. 启用连接\n\n### 系统级连接（多用户）\n\n管理员可以在管理面板中为所有用户配置 Open Terminal 连接，无需额外服务。可以设置多个终端，并按用户或用户组级别控制访问权限。请求会通过 Open WebUI 的 **后端** 代理转发，因此终端只需能被服务器访问即可。\n\n1. 前往 **管理员设置 → 集成 → Open Terminal**\n2. 添加终端的 **URL** 和 **API 密钥**\n3. 启用连接\n\n#### 内置多用户隔离\n\n> [!CAUTION]\n> 单容器多用户模式 **并不适用于生产环境中的多用户部署**。所有用户共享相同的内核、网络和系统资源，彼此之间没有严格的隔离边界。如果某个用户的进程出现异常，可能会影响到系统中的其他所有用户。此模式仅作为轻量级的便捷方案，适用于小型且可信的团队，而非可依赖的安全模型。\n\n对于小型且可信的部署，您可以在单个容器内启用每用户隔离：\n\n```bash\ndocker run -d --name open-terminal -p 8000:8000 \\\n  -v open-terminal:\u002Fhome \\\n  -e OPEN_TERMINAL_MULTI_USER=true \\\n  -e OPEN_TERMINAL_API_KEY=your-secret-key \\\n  ghcr.io\u002Fopen-webui\u002Fopen-terminal\n```\n\n每个用户将自动获得一个独立的 Linux 账户及专属的主目录。文件、命令和终端均通过标准的 Unix 权限实现用户间的隔离。\n\n## API 文档\n\n实例运行后，完整的交互式 API 文档可在 [http:\u002F\u002Flocalhost:8000\u002Fdocs](http:\u002F\u002Flocalhost:8000\u002Fdocs) 查看。\n\n## 星标历史\n\n\u003Ca href=\"https:\u002F\u002Fstar-history.com\u002F#open-webui\u002Fopen-terminal&Date\">\n  \u003Cpicture>\n    \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fopen-webui_open-terminal_readme_aa6531fd328d.png&theme=dark\" \u002F>\n    \u003Csource media=\"(prefers-color-scheme: light)\" srcset=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fopen-webui_open-terminal_readme_aa6531fd328d.png\" \u002F>\n    \u003Cimg alt=\"星标历史图表\" src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fopen-webui_open-terminal_readme_aa6531fd328d.png\" \u002F>\n  \u003C\u002Fpicture>\n\u003C\u002Fa>\n\n> [!TIP]\n> **需要容器级别的用户隔离吗？** 请查看 **[Terminals](https:\u002F\u002Fgithub.com\u002Fopen-webui\u002Fterminals)**，它会为每个用户单独 provision 并管理 Open Terminal 容器。对于更轻量级的部署，内置的多用户模式（`OPEN_TERMINAL_MULTI_USER=true`）可在单个容器内提供每用户隔离。\n\n## 许可证\n\nMIT — 详情请参阅 [LICENSE](LICENSE) 文件。","# Open Terminal 快速上手指南\n\nOpen Terminal 是一个轻量级、可自托管的终端工具，专为 AI 智能体和自动化工具设计。它通过简单的 REST API 提供命令执行、文件管理和代码运行环境，是连接 AI 与本地系统的桥梁。\n\n## 1. 环境准备\n\n在开始之前，请确保您的系统满足以下任一条件：\n\n*   **方案 A：Docker 环境（推荐）**\n    *   已安装 Docker 和 Docker Compose。\n    *   适用于需要沙箱隔离、预装完整开发工具链（Python, Node.js, git, ffmpeg 等）的场景。\n    *   **注意**：国内用户若拉取镜像缓慢，建议配置 Docker 镜像加速器。\n\n*   **方案 B：原生 Python 环境**\n    *   已安装 Python 3.8+。\n    *   已安装 `pip` 或 `uv` 包管理工具。\n    *   适用于直接在宿主机运行命令、访问本地真实文件和环境的场景。\n\n## 2. 安装步骤\n\n### 方式一：使用 Docker 部署（推荐）\n\n这是最安全且功能最全的方式，容器内预装了丰富的开发工具。\n\n**启动容器：**\n\n```bash\ndocker run -d --name open-terminal --restart unless-stopped -p 8000:8000 -v open-terminal:\u002Fhome\u002Fuser -e OPEN_TERMINAL_API_KEY=your-secret-key ghcr.io\u002Fopen-webui\u002Fopen-terminal\n```\n\n> **提示**：\n> *   将 `your-secret-key` 替换为您自定义的强密码作为 API 密钥。\n> *   如果不设置 `OPEN_TERMINAL_API_KEY`，系统会自动生成一个密钥，可通过 `docker logs open-terminal` 查看。\n> *   数据卷 `-v open-terminal:\u002Fhome\u002Fuser` 用于持久化用户文件。\n\n**可选：安装额外依赖**\n您可以在启动时通过环境变量动态安装 apt、pip 或 npm 包（仅适用于 `latest` 镜像）：\n\n```bash\ndocker run -d --name open-terminal -p 8000:8000 \\\n  -e OPEN_TERMINAL_PACKAGES=\"cowsay figlet\" \\\n  -e OPEN_TERMINAL_PIP_PACKAGES=\"httpx polars\" \\\n  -e OPEN_TERMINAL_NPM_PACKAGES=\"typescript tsx\" \\\n  -e OPEN_TERMINAL_API_KEY=your-secret-key \\\n  ghcr.io\u002Fopen-webui\u002Fopen-terminal\n```\n\n### 方式二：原生安装 (Bare Metal)\n\n如果您不想使用 Docker，可以直接在宿主机运行。\n\n**使用 uvx (无需预先安装):**\n\n```bash\nuvx open-terminal run --host 0.0.0.0 --port 8000 --api-key your-secret-key\n```\n\n**或使用 pip 全局安装:**\n\n```bash\npip install open-terminal\nopen-terminal run --host 0.0.0.0 --port 8000 --api-key your-secret-key\n```\n\n> **警告**：原生模式下，AI 执行的命令将直接使用您当前用户的权限运行，并访问您的真实文件系统。如需沙箱隔离，请务必使用 Docker 模式。\n\n## 3. 基本使用\n\n安装完成后，服务默认运行在 `http:\u002F\u002Flocalhost:8000`。\n\n### 验证服务状态\n打开浏览器访问 `http:\u002F\u002Flocalhost:8000\u002Fdocs`，即可查看完整的交互式 API 文档并测试接口。\n\n### 集成到 Open WebUI\nOpen Terminal 旨在与 [Open WebUI](https:\u002F\u002Fgithub.com\u002Fopen-webui\u002Fopen-webui) 无缝协作，让 AI 助手具备操作终端的能力。\n\n1.  登录 Open WebUI。\n2.  进入 **用户设置 (User Settings)** -> **集成 (Integrations)** -> **Open Terminal**。\n3.  输入您的终端地址（如 `http:\u002F\u002Fhost-ip:8000`）和设置的 `API Key`。\n4.  启用连接。\n\n启用后，您在对话界面中将获得侧边栏文件导航功能，可直接浏览目录、上传\u002F下载文件，AI 也能直接在此环境中执行代码和命令。\n\n### 高级配置 (可选)\n您可以通过配置文件或环境变量调整行为。优先级顺序为：CLI 参数 > 环境变量 > 用户配置 (`~\u002F.config\u002Fopen-terminal\u002Fconfig.toml`) > 系统配置。\n\n示例 `config.toml` 内容：\n```toml\nhost = \"0.0.0.0\"\nport = 8000\napi_key = \"sk-my-secret-key\"\nexecute_timeout = 5  # 命令执行超时时间（秒）\n```\n\n运行指定配置文件：\n```bash\nopen-terminal run --config \u002Fpath\u002Fto\u002Fmy-config.toml\n```","某全栈开发者希望让本地 AI 助手自动完成从数据清洗、代码生成到环境验证的完整开发闭环，而不仅仅是提供代码片段。\n\n### 没有 open-terminal 时\n- **执行断层**：AI 生成的 Python 数据处理脚本或 Node.js 构建命令只能停留在对话框中，开发者需手动复制粘贴到本地终端运行，效率低下且易出错。\n- **环境冲突风险**：若直接让 AI 操作本地主机，一旦执行错误的删除命令或安装不兼容的依赖库，极易污染宿主机环境甚至破坏现有项目。\n- **工具链缺失**：本地机器可能未预装 ffmpeg、LaTeX 或特定的数据科学库，导致 AI 规划的任务因缺少基础工具而无法启动，需人工介入配置。\n- **反馈滞后**：无法通过 API 实时获取命令执行的 stdout\u002Fstderr 日志，AI 难以根据运行结果自动修正代码，必须依靠人工反复传达错误信息。\n\n### 使用 open-terminal 后\n- **自动化闭环**：开发者通过 REST API 将任务指派给 open-terminal，AI 可直接在隔离容器中编写并立即执行代码，实现“生成 - 运行 - 调试”全自动流转。\n- **安全沙箱隔离**：利用 Docker 模式运行，所有命令被限制在独立容器内，即使 AI 执行危险操作也不会影响宿主机的文件系统和核心环境。\n- **开箱即用的工具箱**：启动时通过环境变量一键预装 `polars`、`typescript` 等特定依赖，确保 AI 拥有的运行环境与任务需求完美匹配，无需手动配置。\n- **实时状态感知**：open-terminal 通过 API 实时返回执行结果和日志，AI 能即时捕捉报错并自主迭代代码，大幅缩短问题解决周期。\n\nopen-terminal 将 AI 从单纯的“代码建议者”升级为具备独立执行能力的“虚拟开发工程师”，在保障系统安全的前提下实现了真正的端到端自动化。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fopen-webui_open-terminal_d4cdb904.png","open-webui","Open WebUI","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fopen-webui_2f6ab8d5.png","On a mission to build the best AI user interface.",null,"support@openwebui.com","OpenWebUI","https:\u002F\u002Fopenwebui.com","https:\u002F\u002Fgithub.com\u002Fopen-webui",[83,87,91,95],{"name":84,"color":85,"percentage":86},"Python","#3572A5",85.5,{"name":88,"color":89,"percentage":90},"Shell","#89e051",9.4,{"name":92,"color":93,"percentage":94},"Slim","#2b2b2b",3.4,{"name":96,"color":97,"percentage":98},"Dockerfile","#384d54",1.7,2323,175,"2026-04-18T05:37:25","MIT","Linux, macOS, Windows","未说明","未说明 (Docker 完整版镜像约 4GB，精简版约 230-430MB)",{"notes":107,"python":108,"dependencies":109},"该工具提供两种运行模式：1. Docker 模式（推荐）：提供隔离沙箱，包含完整工具链（Python, Node.js, gcc, ffmpeg 等），有不同大小的镜像版本（latest\u002Fslim\u002Falpine）可选；2. 裸机模式：通过 pip 或 uvx 直接安装，命令直接在宿主机执行。若需让 AI 代理控制宿主 Docker，需挂载 Docker Socket（存在安全风险）。支持多用户模式但仅限受信任的小组使用，生产环境建议使用独立容器隔离。","未说明 (需支持 pip 或 uvx 运行的环境)",[110,111,112,113,114],"Docker (可选，用于沙箱模式)","Node.js (Docker 镜像内置)","git (Docker 镜像内置)","curl (Docker 镜像内置)","jq (Docker 镜像内置)",[14,13,15],[117,73,118,119,120],"ai","agentic-ai","ai-agents","ai-tools","2026-03-27T02:49:30.150509","2026-04-18T22:32:41.948058",[124,129,134,139,144,148],{"id":125,"question_zh":126,"answer_zh":127,"source_url":128},40720,"OpenTerminal 无法工作，报错 'Invalid schema for function' 或连接失败怎么办？","这通常是因为使用了旧版本的镜像。请尝试切换到开发版（dev）或最新版（latest）镜像来解决此问题。\n如果是 Docker 用户，请将镜像标签从 `main` 改为 `dev` 或 `latest`：\n- 使用开发版：`ghcr.io\u002Fopen-webui\u002Fopen-webui:dev`\n- 或使用最新稳定版：`ghcr.io\u002Fopen-webui\u002Fopen-terminal:latest`\n许多用户确认切换到 `dev` 分支后，GPT-5 等模型的终端响应功能恢复正常。","https:\u002F\u002Fgithub.com\u002Fopen-webui\u002Fopen-terminal\u002Fissues\u002F5",{"id":130,"question_zh":131,"answer_zh":132,"source_url":133},40721,"在 Open WebUI 中连接 Open Terminal 时出现 'Failed to create session: 502' 错误如何解决？","这个问题通常由配置格式错误或协议缺失引起，请尝试以下两种方法：\n1. **检查 API Key 格式**：在 Docker Compose 的环境变量中，确保 `OPEN_TERMINAL_API_KEY` 的值被双引号包裹（例如：`- \"OPEN_TERMINAL_API_KEY=YOURKEYHERE\"`）；而在 Open WebUI 的设置界面中输入该 Key 时，**不要**加任何引号，只填入纯密钥字符串。\n2. **显式指定协议**：在 Open WebUI 的集成设置中填写地址时，务必明确加上 `http:\u002F\u002F` 前缀（例如：`http:\u002F\u002F192.168.x.x:8000`）。如果省略，系统可能默认尝试 HTTPS 连接导致失败。","https:\u002F\u002Fgithub.com\u002Fopen-webui\u002Fopen-terminal\u002Fissues\u002F16",{"id":135,"question_zh":136,"answer_zh":137,"source_url":138},40722,"文件浏览功能正常，但创建终端会话时报 '404 Not Found' 错误是什么原因？","这是因为使用了错误的镜像标签。`main` 分支的镜像可能不包含最新的 API 端点。\n请将 Docker Compose 中的镜像标签从 `main` 更改为 `latest`：\n```yaml\n# 修改前\nimage: ghcr.io\u002Fopen-webui\u002Fopen-terminal:main\n# 修改后\nimage: ghcr.io\u002Fopen-webui\u002Fopen-terminal:latest\n```\n更改后重启容器即可解决 POST \u002Fapi\u002Fterminals 返回 404 的问题。","https:\u002F\u002Fgithub.com\u002Fopen-webui\u002Fopen-terminal\u002Fissues\u002F25",{"id":140,"question_zh":141,"answer_zh":142,"source_url":143},40723,"在多用户模式（Multi-user mode）下，LLM 不知道自己的用户目录导致权限拒绝（Permission denied）怎么办？","仅仅在 Docker 环境变量中设置 `OPEN_TERMINAL_MULTI_USER=true` 是不够的，这会导致所有用户仍共享同一目录。\n您必须在 Open WebUI 的图形界面中启用该选项：\n1. 登录 Open WebUI 管理员账号。\n2. 进入 **Settings (设置)** -> **Admin Settings (管理设置)**。\n3. 找到 **Integrations (集成)** -> **Open Terminal**。\n4. 在此处勾选或启用多用户模式选项。\n这样系统才会为不同用户分配独立的隔离目录（如 `\u002Fhome\u002F\u003Cuser_id>`），避免权限错误。","https:\u002F\u002Fgithub.com\u002Fopen-webui\u002Fopen-terminal\u002Fissues\u002F57",{"id":145,"question_zh":146,"answer_zh":147,"source_url":133},40724,"浏览器控制台报错 'Fetch API cannot load... due to access control checks' 或 'requested insecure content' 怎么处理？","这是混合内容（Mixed Content）安全问题。当您的 Open WebUI 通过 HTTPS 访问，而 Open Terminal 地址配置为 HTTP 时，浏览器会阻止请求。\n解决方法：\n1. **推荐方案**：确保 Open Terminal 也通过 HTTPS 提供服务（例如配置反向代理如 Nginx 或 Traefik 为其添加 SSL 证书）。\n2. **临时方案（仅限内网测试）**：如果无法配置 HTTPS，请确保在 Open WebUI 的集成设置中，地址栏明确填写了 `http:\u002F\u002FIP:PORT`。虽然现代浏览器可能仍会拦截，但显式声明协议有时能辅助调试。最根本的解决办法是让两者协议一致（均为 HTTPS）。",{"id":149,"question_zh":150,"answer_zh":151,"source_url":143},40725,"如何自定义 Open Terminal 镜像以安装额外依赖（如中文字体、Pandoc 等）？","您可以基于官方镜像构建自定义 Dockerfile。关键步骤包括切换回 root 用户以安装软件，然后再切回普通用户。\n示例 Dockerfile 片段：\n```dockerfile\n# 继承官方镜像\nFROM ghcr.io\u002Fopen-webui\u002Fopen-terminal\n\n# 切换回 root 用户以便安装系统依赖\nUSER root\n\n# 更新源并安装所需工具（如字体、中文环境等）\nRUN apt-get update && apt-get install -y --no-install-recommends \\\n    fontconfig \\\n    fonts-noto-cjk \\\n    pandoc \\\n    && rm -rf \u002Fvar\u002Flib\u002Fapt\u002Flists\u002F*\n\n# 注意：官方镜像默认最后切到了普通用户 (USER user)，如果需要保持权限一致性，\n# 请在安装完成后根据需求决定是否显式切回，通常保持默认行为即可。\n```\n构建后使用自定义镜像替换 docker-compose 中的默认镜像即可。",[153,158,163,168,173,178,183,188,193,198,203,208,213,218,223,228,233,238,243,248],{"id":154,"version":155,"summary_zh":156,"released_at":157},324198,"v0.11.34","### 新增\n\n- 🌐 **基于路径的文件服务** — 新增 `GET \u002Ffiles\u002Fserve\u002F{path}` 端点，使在 iframe 中加载的 HTML 文件能够将相对 CSS、JS 和图片引用解析为同级文件。Open WebUI 的 FileNav 即利用此功能来渲染多文件网站。\n","2026-04-08T21:53:36",{"id":159,"version":160,"summary_zh":161,"released_at":162},324199,"v0.11.33","### 修复\n\n- `grep_search` 现在默认启用正则表达式模式，与实际的 `grep` 行为一致。像 `foo|bar` 和 `err.*timeout` 这样的模式无需显式设置 `regex=true` 即可按预期工作。","2026-04-08T20:04:02",{"id":164,"version":165,"summary_zh":166,"released_at":167},324200,"v0.11.32","### 已更改\n\n- 🗂️ **会话感知的相对路径解析** — 所有向 LLM 暴露的文件相关端点（`list_files`、`read_file`、`write_file`、`display_file`、`replace_file_content`、`grep_search`、`glob_search`）现在会读取 `X-Session-Id` 头，并将相对路径（例如 `.`）解析到会话的工作目录，而不是始终默认使用 `fs.home`。为此，在 `UserFS.resolve_path()` 中新增了一个可选的 `cwd` 参数来支持这一功能。绝对路径不受影响。\n","2026-03-30T02:34:54",{"id":169,"version":170,"summary_zh":171,"released_at":172},324201,"v0.11.31","### 已更改\n\n- 🗂️ **会话级工作目录** — 将进程全局的 `os.chdir()` 替换为基于内存、感知会话的字典，以 `X-Session-Id` 头部作为键。现在，多个并发聊天会话可以维护独立的工作目录。`GET\u002FPOST \u002Ffiles\u002Fcwd`、`POST \u002Fexecute` 和 `POST \u002Fapi\u002Fterminals` 均会读取该头部以确定正确的工作目录。未提供头部的会话将回退到 `fs.home`。条目在 7 天无活动后过期（滑动 TTL），可通过 `OPEN_TERMINAL_SESSION_CWD_TTL` 配置（或在 `config.toml` 中设置 `session_cwd_ttl`）。\n","2026-03-30T02:00:37",{"id":174,"version":175,"summary_zh":176,"released_at":177},324202,"v0.11.30","### 变更\n\n- 🔑 **更强的自动生成 API 密钥** — 随机性从 192 位（32 个字符）提升至 384 位（64 个字符），使暴力破解在计算上变得不可行。\n- 🔒 **启动需提供 API 密钥** — 现在若未配置 API 密钥，服务器将拒绝启动。CLI 仍会像以前一样自动生成密钥，但直接使用 `uvicorn` 启动且未设置 `OPEN_TERMINAL_API_KEY` 的方式已不再允许。\n- 🛡️ **恒定时间 API 密钥比较** — HTTP 和 WebSocket 认证现均采用 `hmac.compare_digest()` 而非 `!=` 运算，从而防止基于时间的密钥提取攻击。\n- ⚠️ **CORS 默认警告** — 当 `--cors-allowed-origins` 保持默认值 `*` 时，启动时会显示一个醒目的黄色提示框，提醒运维人员在生产环境中应限制该配置。","2026-03-25T22:23:43",{"id":179,"version":180,"summary_zh":181,"released_at":182},324203,"v0.11.29","### 修复\n\n- 🔒 **多用户模式下文件保存失败** — `_chown()` 将文件所有权转移给了预置用户，但未设置组写权限，导致文件权限保持为 `644`。服务器进程（属于该用户组）可以创建新文件，但在后续保存时无法覆盖这些文件，从而抛出 `PermissionError`。现在在执行 `chown` 后会额外执行 `chmod g+w`，以与目录已采用的 `2770` 权限设置保持一致。([#93](https:\u002F\u002Fgithub.com\u002Fopen-webui\u002Fopen-terminal\u002Fissues\u002F93))\n\n","2026-03-24T21:56:51",{"id":184,"version":185,"summary_zh":186,"released_at":187},324204,"v0.11.28","### 新增\n\n- 📦 **压缩目录下载**（`POST \u002Ffiles\u002Farchive`）—— 将一个或多个文件和目录打包成 ZIP 压缩包以供下载。跨平台兼容（Windows、macOS、Linux）。强制实施多用户访问控制。\n","2026-03-24T10:39:03",{"id":189,"version":190,"summary_zh":191,"released_at":192},324205,"v0.11.27","### 新增\n\n- 🧠 **系统提示端点**（`GET \u002Fsystem`）——返回一个结构化的系统提示，用于 LLM 集成，将模型置于当前环境上下文中（操作系统、主机名、用户、Shell、Python 版本），并包含工具使用指令。该端点受 `OPEN_TERMINAL_ENABLE_SYSTEM_PROMPT` 控制（默认为 `true`）；并通过 `GET \u002Fapi\u002Fconfig` 中的 `features.system` 字段对外暴露，以便客户端在获取前检查是否支持。\n- ⚙️ **`OPEN_TERMINAL_ENABLE_SYSTEM_PROMPT`** — 环境变量（或 `config.toml` 中的 `enable_system_prompt`），用于启用或禁用 `\u002Fsystem` 端点及相应功能标志。默认值为 `true`。\n- ⚙️ **`OPEN_TERMINAL_SYSTEM_PROMPT`** — 环境变量（或 `config.toml` 中的 `system_prompt`），用于完全覆盖自动生成的系统提示，使用自定义内容。\n\n","2026-03-23T03:12:56",{"id":194,"version":195,"summary_zh":196,"released_at":197},324206,"v0.11.26","### 已更改\n\n- ♻️ **`utils\u002Fdocuments.py`** — 将 `read_file` 中的所有文档文本提取逻辑抽取到一个专用模块中，并引入了一个 `EXTRACTORS` 注册表。现在，新增一种格式只需实现一个函数并在注册表中添加一行配置即可。行为未发生变化。\n","2026-03-20T22:36:04",{"id":199,"version":200,"summary_zh":201,"released_at":202},324207,"v0.11.24","### 新增\n\n- 📄 `read_file` 中的 **Office 文档文本提取** — 现在可自动将 `.docx`、`.xlsx` 和 `.pptx` 文件转换为文本，并以标准 JSON 格式返回，便于大语言模型读取。Word 文档会提取段落和表格内容；Excel 电子表格会将所有工作表渲染为制表符分隔的值；PowerPoint 演示文稿则会提取所有幻灯片上的文本。支持通过 `start_line`\u002F`end_line` 指定行范围进行选择。\n","2026-03-20T22:13:49",{"id":204,"version":205,"summary_zh":206,"released_at":207},324208,"v0.11.23","\n### Fixed\n\n- 🔐 **`_FILE` mutual exclusivity bypassed by empty env vars** — setting e.g. `OPEN_TERMINAL_API_KEY=\"\"` alongside `OPEN_TERMINAL_API_KEY_FILE` silently skipped the conflict check because empty strings are falsy. The Python helper (`_resolve_file_env`), `entrypoint.sh`, and `entrypoint-slim.sh` now test whether the variable is *set* (not merely non-empty), so any explicit assignment — including `=\"\"` — correctly triggers the mutual-exclusivity error.\n\n","2026-03-19T22:54:36",{"id":209,"version":210,"summary_zh":211,"released_at":212},324209,"v0.11.22","\n### Fixed\n\n- 🐛 **`\u002Fports` returns 500 in multi-user mode on restricted runtimes** — the endpoint triggered full user provisioning (`useradd`) just to filter ports by UID. On container runtimes that reject `useradd` (e.g. Azure Container Apps), this crashed with an unhandled exception. Now returns an empty port list when provisioning fails — an unprovisioned user has no ports to show. ([#80](https:\u002F\u002Fgithub.com\u002Fopen-webui\u002Fopen-terminal\u002Fissues\u002F80))\n- 🐳 **Docker-in-Docker broken in multi-user mode** — mounting the Docker socket (`-v \u002Fvar\u002Frun\u002Fdocker.sock:\u002Fvar\u002Frun\u002Fdocker.sock`) with `OPEN_TERMINAL_MULTI_USER=true` failed because only the default `user` account was added to the socket's group. Dynamically provisioned users now automatically inherit Docker socket group membership when the socket is mounted. ([#83](https:\u002F\u002Fgithub.com\u002Fopen-webui\u002Fopen-terminal\u002Fissues\u002F83))\n\n","2026-03-19T22:51:40",{"id":214,"version":215,"summary_zh":216,"released_at":217},324210,"v0.11.21","\n### Fixed\n\n- 🔍 **Port detection broken since v0.11.2** — `setcap cap_setgid+ep` on the system Python binary (added for multi-user `os.setgroups()`) made all Python processes non-dumpable, blocking `\u002Fproc\u002F[pid]\u002Ffd\u002F` access needed to resolve socket inodes to PIDs. Ports from user-spawned Python servers were silently filtered out. Fixed by copying the Python binary and granting `cap_setgid` only to the copy (`python3-ot`), used exclusively by the open-terminal server. The system `python3` stays capability-free so user processes remain dumpable. Slim and Alpine images had `setcap` removed entirely since they don't support multi-user mode. ([#85](https:\u002F\u002Fgithub.com\u002Fopen-webui\u002Fopen-terminal\u002Fissues\u002F85), [#63](https:\u002F\u002Fgithub.com\u002Fopen-webui\u002Fopen-terminal\u002Fissues\u002F63))\n- 📖 **README** — Image Variants table incorrectly listed multi-user mode as supported on slim and alpine images. Multi-user mode requires `sudo`, which only the full image includes.\n\n","2026-03-19T22:44:34",{"id":219,"version":220,"summary_zh":221,"released_at":222},324211,"v0.11.20","\n### Fixed\n\n- 👥 **Multi-user mode works when running as root** — `ensure_os_user()` no longer unconditionally requires `sudo`; when the process is already root (e.g. `user: \"0:0\"` in Docker Compose), user provisioning commands run directly. `check_environment()` now only requires `sudo` when not running as root, with an actionable error message pointing to the standard image or Terminals when neither root nor sudo is available. ([#60](https:\u002F\u002Fgithub.com\u002Fopen-webui\u002Fopen-terminal\u002Fissues\u002F60))\n\n","2026-03-15T23:16:25",{"id":224,"version":225,"summary_zh":226,"released_at":227},324212,"v0.11.18","\n### Added\n\n- ⚡ **Configurable log flush strategy** — new `OPEN_TERMINAL_LOG_FLUSH_INTERVAL` and `OPEN_TERMINAL_LOG_FLUSH_BUFFER` environment variables (or `log_flush_interval` \u002F `log_flush_buffer` in config.toml) control how frequently process output is flushed to disk. Default `0` preserves the existing per-chunk flush behaviour. Setting `OPEN_TERMINAL_LOG_FLUSH_INTERVAL=1` reduces fsyncs from ~250\u002Fsec to ~1\u002Fsec for high-output commands, preventing I\u002FO storms that can make ARM\u002FeMMC systems unresponsive. ([#65](https:\u002F\u002Fgithub.com\u002Fopen-webui\u002Fopen-terminal\u002Fissues\u002F65))\n\n### Changed\n\n- 🔧 **Centralized flush control** — per-chunk `flush()` calls removed from `PtyRunner`, `PipeRunner`, and `WinPtyRunner`; flushing is now managed entirely by `BoundedLogWriter` based on the configured interval and buffer settings. An explicit final flush is performed before writing the process end marker.\n\n","2026-03-15T21:27:36",{"id":229,"version":230,"summary_zh":231,"released_at":232},324213,"v0.11.17","\n### Fixed\n\n- 🌐 **Global pip packages in multi-user mode** — `OPEN_TERMINAL_PIP_PACKAGES` now installs to the system-wide site-packages (`sudo pip install`) when `OPEN_TERMINAL_MULTI_USER=true`, so all provisioned users share the same packages. Previously, packages were installed to `\u002Fhome\u002Fuser\u002F.local\u002F` and only accessible to the default user. ([#68](https:\u002F\u002Fgithub.com\u002Fopen-webui\u002Fopen-terminal\u002Fissues\u002F68))\n\n","2026-03-15T21:12:31",{"id":234,"version":235,"summary_zh":236,"released_at":237},324214,"v0.11.16","\n### Removed\n\n- 🧹 **Removed experimental `url` parameter from `\u002Ffiles\u002Fupload`** — this feature was never used by any known consumer (Open WebUI uses multipart uploads). The endpoint now only accepts direct file uploads.\n\n","2026-03-14T02:15:24",{"id":239,"version":240,"summary_zh":241,"released_at":242},324215,"v0.11.15","\n### Changed\n\n- 🖥️ **Redesigned startup output** — the CLI now displays Local and Network URLs, the generated API key, and a bind warning in a clean, modern key-value layout with color-coded labels. Network URL auto-detects your LAN IP when binding to `0.0.0.0`.\n- 🔒 **Bind warning** — a yellow warning is printed at startup when binding to `0.0.0.0`, nudging bare-metal users to restrict access with `--host 127.0.0.1`.\n\n","2026-03-13T22:44:27",{"id":244,"version":245,"summary_zh":246,"released_at":247},324216,"v0.11.14","\n### Fixed\n\n- 🏠 **Multi-user home directory hints** — `get_system_info()` no longer includes `as user 'user'` in the OpenAPI description when multi-user mode is active, removing a misleading hint that caused smaller LLMs to write to `\u002Fhome\u002Fuser` instead of their assigned directory. ([#57](https:\u002F\u002Fgithub.com\u002Fopen-webui\u002Fopen-terminal\u002Fissues\u002F57))\n- 🔄 **`\u002Fhome\u002Fusr` path rewrite** — `resolve_path()` now also rewrites `\u002Fhome\u002Fusr` (a common LLM hallucination) to the provisioned user's home directory, matching the existing `\u002Fhome\u002Fuser` rewrite.\n\n","2026-03-13T22:24:05",{"id":249,"version":250,"summary_zh":251,"released_at":252},324217,"v0.11.13","\n### Fixed\n\n- 🐛 **Recursive home directory ownership fix** — `chown` in `ensure_os_user()` now uses `-R` to recursively fix ownership of all files within a user's home directory when the OS user is recreated with a different UID (e.g. after container recreation with a persistent volume). Previously only the top-level directory was re-owned, leaving files inside with a mismatched UID. ([#62](https:\u002F\u002Fgithub.com\u002Fopen-webui\u002Fopen-terminal\u002Fissues\u002F62))\n\n","2026-03-13T19:58:39"]