diff --git a/docs/features/chat-conversations/chat-features/code-execution/index.md b/docs/features/chat-conversations/chat-features/code-execution/index.md index fffb88a6..c9d40ee9 100644 --- a/docs/features/chat-conversations/chat-features/code-execution/index.md +++ b/docs/features/chat-conversations/chat-features/code-execution/index.md @@ -54,8 +54,9 @@ If you are running a multi-user or organizational deployment, **Jupyter is not r - **Full shell access** — models can install packages, run scripts in any language, use system tools like ffmpeg, git, curl, etc. - **Container isolation** — runs in its own Docker container, separate from Open WebUI and other services. - **Rich pre-installed toolset** — the Docker image comes with Python 3.12, data science libraries, build tools, networking utilities, and more. +- **Built-in file browser** — browse, preview, create, delete, upload, and download files directly from the chat controls panel. -Open Terminal is connected to Open WebUI as an easy to connect [OpenAPI Tool Server](/features/extensibility/plugin/tools/openapi-servers/open-webui), not as a built-in code execution engine. +Open Terminal can be connected to Open WebUI as a [native integration](/features/extensibility/open-terminal#native-integration-recommended) via **Settings → Integrations** (recommended) or as a generic [OpenAPI Tool Server](/features/extensibility/plugin/tools/openapi-servers/open-webui). When using the native integration, Open Terminal endpoints are automatically injected as always-on tools into every chat. :::note Open Terminal currently operates as a **single shared instance** — there is no automatic per-user container provisioning yet. Each user connects to the same container unless separate instances are deployed manually. @@ -72,7 +73,7 @@ Open Terminal currently operates as a **single shared instance** — there is no | **Isolation** | ✅ Browser sandbox | ❌ Shared environment | ✅ Container-level (when using Docker) | | **Multi-user safety** | ✅ Per-user by design | ⚠️ Not isolated | ⚠️ Single instance (per-user containers planned) | | **File generation** | ❌ Very limited | ✅ Full support | ✅ Full support with upload/download | -| **Setup** | None (built-in) | Admin configures globally | Each user adds as a Tool Server | +| **Setup** | None (built-in) | Admin configures globally | Native integration via Settings → Integrations, or as a Tool Server | | **Recommended for orgs** | ✅ Safe default | ❌ Not without isolation | ✅ Per-user by design | | **Enterprise scalability** | ✅ Client-side, no server load | ❌ Single shared instance | ⚠️ Manual per-user instances | diff --git a/docs/features/extensibility/open-terminal/index.md b/docs/features/extensibility/open-terminal/index.md index 6332c6ce..9fb3f5d0 100644 --- a/docs/features/extensibility/open-terminal/index.md +++ b/docs/features/extensibility/open-terminal/index.md @@ -189,11 +189,13 @@ When a terminal is connected, the chat controls panel gains a **Files** tab: - **Browse** directories on the remote terminal filesystem - **Preview** text files, images, and PDFs inline +- **Create folders** using the new folder button in the breadcrumb bar +- **Delete** files and folders via the context menu (⋯) on each entry - **Download** any file to your local machine - **Upload** files by dragging and dropping them onto the directory listing - **Attach** files to the current chat by downloading them through the file browser -The file browser remembers your last-visited directory between panel open/close cycles. +The file browser remembers your last-visited directory between panel open/close cycles and automatically syncs the terminal's working directory to match. ### Generic OpenAPI Tool Server @@ -578,6 +580,70 @@ curl "http://localhost:8000/files/glob?pattern=*.py&path=/home/user/project&type } ``` +#### Create a Directory + +**`POST /files/mkdir`** + +Creates a directory at the specified path. Parent directories are created automatically if they don't exist. + +**Request body:** + +| Field | Type | Description | +| :--- | :--- | :--- | +| `path` | string | Path of the directory to create. | + +```bash +curl -X POST http://localhost:8000/files/mkdir \ + -H "Authorization: Bearer " \ + -H "Content-Type: application/json" \ + -d '{"path": "/home/user/project/src"}' +``` + +```json +{"path": "/home/user/project/src"} +``` + +#### Delete a File or Directory + +**`DELETE /files/delete`** + +Deletes a file or directory. Directories are removed recursively. + +| Parameter | Type | Description | +| :--- | :--- | :--- | +| `path` | string | Path to the file or directory to delete. | + +```bash +curl -X DELETE "http://localhost:8000/files/delete?path=/home/user/old-file.txt" \ + -H "Authorization: Bearer " +``` + +```json +{"path": "/home/user/old-file.txt", "type": "file"} +``` + +#### Get or Set Working Directory + +**`GET /files/cwd`** — Returns the server's current working directory. + +**`POST /files/cwd`** — Changes the server's working directory. + +```bash +# Get current working directory +curl "http://localhost:8000/files/cwd" \ + -H "Authorization: Bearer " + +# Set working directory +curl -X POST http://localhost:8000/files/cwd \ + -H "Authorization: Bearer " \ + -H "Content-Type: application/json" \ + -d '{"path": "/home/user/project"}' +``` + +```json +{"cwd": "/home/user/project"} +``` + ### File Transfer #### Upload a File diff --git a/docs/features/extensibility/plugin/tools/index.mdx b/docs/features/extensibility/plugin/tools/index.mdx index b9e1c1dd..462c81b6 100644 --- a/docs/features/extensibility/plugin/tools/index.mdx +++ b/docs/features/extensibility/plugin/tools/index.mdx @@ -22,6 +22,7 @@ Because there are several ways to integrate "Tools" in Open WebUI, it's importan | **Native MCP (HTTP)** | `Settings > Connections` | Standard MCP servers reachable via HTTP/SSE | External MCP Servers | | **MCP via Proxy (MCPO)** | `Settings > Connections` | Local stdio-based MCP servers (e.g., Claude Desktop tools) | [MCPO Adapter](https://github.com/open-webui/mcpo) | | **OpenAPI Servers** | `Settings > Connections` | Standard REST/OpenAPI web services | External Web APIs | +| **Open Terminal** | `Settings > Integrations` | Full shell access in an isolated Docker container (always-on) | [Open Terminal](https://github.com/open-webui/open-terminal) | ### 1. Native Features (Built-in) These are deeply integrated into Open WebUI and generally don't require external scripts.