Skip to main content

A remote terminal API.

Project description

⚡ Open Terminal

A 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.

Why Open Terminal?

AI 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.

You can run it two ways:

  • 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.
  • 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.

Getting Started

Docker (recommended)

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

That's it — you're up and running at http://localhost:8000.

[!TIP] If you don't set an API key, one is generated automatically. Grab it with docker logs open-terminal.

Customizing the Docker Environment

The default image ships with a broad set of tools, but you can tailor it to your needs. Fork the repo, edit the Dockerfile to add or remove system packages, Python libraries, or language runtimes, then build your own image:

docker build -t my-terminal .
docker run -d --name open-terminal -p 8000:8000 my-terminal

Bare Metal

No Docker? No problem. Open Terminal is a standard Python package:

# One-liner with uvx (no install needed)
uvx open-terminal run --host 0.0.0.0 --port 8000 --api-key your-secret-key

# Or install globally with pip
pip install open-terminal
open-terminal run --host 0.0.0.0 --port 8000 --api-key your-secret-key

[!CAUTION] On bare metal, commands run directly on your machine with your user's permissions. Use Docker if you want sandboxed execution.

Using with Open WebUI

Open Terminal integrates with Open 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:

Direct Connection

Users 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.

  1. Go to User Settings → Integrations → Open Terminal
  2. Add the terminal URL and API key
  3. Enable the connection

System-Level Connection

Admins can configure Open Terminal connections for their users from the admin panel. 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.

  1. Go to Admin Settings → Integrations → Open Terminal
  2. Add the terminal URL and API key
  3. Enable the connection

For isolated, per-user terminal containers, see Terminals, which requires an enterprise license for production use.

API Docs

Full interactive API documentation is available at http://localhost:8000/docs once your instance is running.

Star History

Star History Chart

[!TIP] Need multi-tenant? Check out Terminals, which provisions and manages isolated Open Terminal containers per user with a single authenticated API entry point.

License

MIT — see LICENSE for details.

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

open_terminal-0.4.1.tar.gz (20.4 kB view details)

Uploaded Source

Built Distribution

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

open_terminal-0.4.1-py3-none-any.whl (17.3 kB view details)

Uploaded Python 3

File details

Details for the file open_terminal-0.4.1.tar.gz.

File metadata

  • Download URL: open_terminal-0.4.1.tar.gz
  • Upload date:
  • Size: 20.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.0

File hashes

Hashes for open_terminal-0.4.1.tar.gz
Algorithm Hash digest
SHA256 833fa82830620acbe4a59e8a420ead78ecd73552a712a9f58cd86a77c008ab00
MD5 c211f7f3d06d76c4eb224ac2a3d5813a
BLAKE2b-256 f880c2781310f9063eb2fcd93b04ae1b72922ab1d6704d2d90309f248254f0e6

See more details on using hashes here.

File details

Details for the file open_terminal-0.4.1-py3-none-any.whl.

File metadata

File hashes

Hashes for open_terminal-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ecf1d9caac20fac7fa80ec81a2dbb395abea6cbce1c655cdbffcc340c4acb840
MD5 c4dfb1dcf146f08b817fe2cb82eda92c
BLAKE2b-256 44d62218d3ae12b1dafb8d9e9866418e66fed4699f9be8180d889302e9e1e694

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