Skip to main content

Lightweight CLI & GUI to connect local folders to OpenTerminal in OpenWebUI

Project description

โšก OpenWebUI Bridge

Connect any local folder to OpenTerminal in one click โ€” no Docker knowledge required.

OpenWebUI Bridge is a lightweight Windows desktop application that eliminates the need to manually run Docker commands when switching project workspaces for OpenWebUI's OpenTerminal.


Features

  • ๐Ÿš€ One-click workspace mounting โ€” browse, select, done
  • ๐Ÿ–ฅ๏ธ Desktop GUI with live Docker + container status
  • โŒจ๏ธ Full CLI (owui open ., owui status, etc.)
  • ๐Ÿ“‚ Windows Explorer integration โ€” right-click any folder โ†’ Open with OpenWebUI
  • ๐Ÿ”’ Safe โ€” validates paths, handles failures gracefully, never exposes API keys in logs
  • ๐Ÿ”” Desktop notifications for every state change
  • โš™๏ธ Persistent configuration stored in %APPDATA%\OpenWebUI Bridge\config.json
  • ๐Ÿ”Œ VS Code extension ready โ€” the CLI is the integration surface

Quick Start

1. Install

# Run as Administrator
installer\install.bat

2. First Launch

Launch OpenWebUI Bridge from the desktop shortcut or Start Menu.

The setup wizard will:

  1. Detect Docker Desktop
  2. Validate Docker is running
  3. Ask for your OpenTerminal API key, URL, and port
  4. Validate Docker with a test container
  5. Save configuration

3. Mount a Workspace

Via GUI: Click Browse, select your project folder, click ๐Ÿš€ Mount Workspace

Via CLI:

owui open .
owui open D:\Projects\MyApp

Via Explorer: Right-click any folder โ†’ Open with OpenWebUI


CLI Reference

owui open [PATH]           Mount a folder as /workspace
owui open .                Mount current directory
owui restart               Restart OpenTerminal container
owui stop                  Stop OpenTerminal container
owui status                Show Docker + container status
owui config                Show current configuration
owui config --set key=val  Update a configuration value
owui logs                  Show last 100 container log lines
owui logs --lines 200      Show last 200 lines
owui gui                   Launch the desktop GUI

Configuration keys

Key Description Default
openWebUIUrl URL to your OpenWebUI instance http://localhost:3000
apiKey OpenTerminal API key (required)
port Host port for OpenTerminal 8000
containerName Docker container name open-terminal
currentFolder Last mounted folder path (none)

How Folder Switching Works

When you select a new folder:

  1. Stop the existing open-terminal container
  2. Remove the container
  3. Recreate it with the same name, API key, and port โ€” bind-mounting your selected folder at /home/user
  4. Health check โ€” polls http://localhost:{port} until responding
  5. Notify โ€” desktop notification + status update

The Docker command used:

docker run -d \
  --name open-terminal \
  --restart unless-stopped \
  -p 8000:8000 \
  -v "D:\Projects\MyApp":/home/user \
  -e OPEN_TERMINAL_API_KEY=your-secret-key \
  ghcr.io/open-webui/open-terminal

The selected folder is bind-mounted directly as /home/user โ€” no named volume, no /workspace.

No changes are required to OpenTerminal or OpenWebUI.


Windows Explorer Integration

After installation, right-clicking any folder shows:

๐Ÿ“‚ Open with OpenWebUI

Clicking it:

  • Launches the Bridge (if not running)
  • Detects the selected folder
  • Mounts it as /home/user (or just opens OpenWebUI if already mounted)
  • Shows a desktop notification

Configuration File

Stored at %APPDATA%\OpenWebUI Bridge\config.json:

{
  "openWebUIUrl": "http://localhost:3000",
  "apiKey": "your-secret-key",
  "containerName": "open-terminal",
  "port": 8000,
  "currentFolder": "D:\\Projects\\Website"
}

Security: The API key is never shown in logs or the UI (masked as abcโ€ขโ€ขโ€ขโ€ขโ€ข).


Building from Source

Requirements

  • Python 3.10+
  • Docker Desktop (for testing)

Build

# Install build dependencies
pip install pyinstaller

# Build single-directory (recommended)
python build.py

# Build single-file portable executable
python build.py --onefile

# Output: dist/owui/ or dist/owui.exe

Run without building

# GUI
python owui_bridge.py

# CLI
python owui_bridge.py status
python owui_bridge.py open D:\Projects\MyApp

VS Code Extension Integration

The CLI is designed as the single integration surface for future extensions.

A VS Code extension simply needs to:

// Mount workspace when a folder is opened
const { execSync } = require('child_process');
execSync(`owui open "${workspaceFolder.uri.fsPath}"`, { stdio: 'inherit' });

No Docker SDK, no config parsing, no container management โ€” the Bridge handles everything.


Project Structure

owui-bridge/
โ”œโ”€โ”€ owui_bridge.py              # Unified entry point (GUI + CLI)
โ”œโ”€โ”€ build.py                    # PyInstaller build script
โ”œโ”€โ”€ installer/
โ”‚   โ”œโ”€โ”€ install.bat             # Windows installer (run as admin)
โ”‚   โ””โ”€โ”€ uninstall.bat           # Uninstaller
โ””โ”€โ”€ src/
    โ”œโ”€โ”€ config/
    โ”‚   โ””โ”€โ”€ config_manager.py   # Read/write %APPDATA% config JSON
    โ”œโ”€โ”€ core/
    โ”‚   โ””โ”€โ”€ docker_manager.py   # All Docker operations
    โ”œโ”€โ”€ cli/
    โ”‚   โ””โ”€โ”€ cli.py              # owui <command> entry point
    โ””โ”€โ”€ gui/
        โ”œโ”€โ”€ main_window.py      # Desktop GUI (tkinter)
        โ””โ”€โ”€ explorer_integration.py  # Windows Registry context menu

Troubleshooting

"Docker is not running" โ†’ Start Docker Desktop and wait for it to fully initialize.

"Failed to mount workspace" โ†’ Check that the path exists and Docker has file sharing permission for that drive (Docker Desktop โ†’ Settings โ†’ Resources โ†’ File Sharing).

Context menu not appearing โ†’ Re-run installer\install.bat as Administrator.

Container not becoming healthy โ†’ Check owui logs โ€” the container may still be pulling the image on first use. Wait a minute and try owui status again.

Config file location โ†’ %APPDATA%\OpenWebUI Bridge\config.json

Log file location โ†’ %APPDATA%\OpenWebUI Bridge\bridge.log

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

owui_bridge-0.1.0.tar.gz (21.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

owui_bridge-0.1.0-py3-none-any.whl (21.6 kB view details)

Uploaded Python 3

File details

Details for the file owui_bridge-0.1.0.tar.gz.

File metadata

  • Download URL: owui_bridge-0.1.0.tar.gz
  • Upload date:
  • Size: 21.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for owui_bridge-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ecea5ca7a1dc2722ceca3188ff3623bdd81059548aa04f58e921fc350dd3cd68
MD5 7186c61bf280996caeb95e84173deaf0
BLAKE2b-256 6264469c26378f8cbc4ff0b5446801e8f60e8e15a62348f1c0a3391eac81612b

See more details on using hashes here.

File details

Details for the file owui_bridge-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: owui_bridge-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 21.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for owui_bridge-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7b27a4b51bc7fd4985766325454fc7154046e19daf141f491a278355d5f1dd35
MD5 fa463a5536958dafc05282e0dde72b3d
BLAKE2b-256 7815bea369d4a46f0715e7c3026e75ab4204f22cc8b182d577e013d6cfa39272

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page