Skip to main content

A Gradio component that provides a fully functional terminal using xterm.js and PTY

Project description

Gradio Terminal

A Gradio component that provides a fully functional terminal in your browser. This package uses xterm.js on the frontend and a PTY on the backend to provide a real shell experience.

Gradio Terminal

Installation

pip install gradio-terminal

Quick Start

Simple Usage

import gradio as gr
from gradio_terminal import Terminal
demo = gr.Blocks()
with demo:
    terminal = Terminal()
demo.launch()

API Reference

launch_terminal(port=5000, host="127.0.0.1", command="bash", share=False, **launch_kwargs)

Launch a standalone Gradio app with a terminal.

create_terminal_demo(port=5000, host="127.0.0.1", command="bash", height=400)

Create a Gradio Blocks demo with an embedded terminal.

TerminalServer(port=5000, host="127.0.0.1", command="bash")

Low-level terminal server for custom integrations.

  • start(): Start the server and return the URL
  • get_url(): Get the terminal server URL
  • stop(): Stop the terminal server

Requirements

  • Python 3.8+
  • Linux
  • Dependencies: gradio, flask, flask-socketio

Security Notice

This component provides shell access to your server. Use only in trusted environments.

License

This project is licensed under the Apache-2.0 License.

Acknowledgments

  • pyxtermjs - Inspiration for the terminal implementation
  • xterm.js - Terminal emulator for the browser
  • Gradio - The awesome ML demo framework

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

gradio_terminal-0.1.0.tar.gz (12.4 kB view details)

Uploaded Source

Built Distribution

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

gradio_terminal-0.1.0-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gradio_terminal-0.1.0.tar.gz
  • Upload date:
  • Size: 12.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gradio_terminal-0.1.0.tar.gz
Algorithm Hash digest
SHA256 89dcfd9a498ed76849ef5780629dd3cdd218acf768a5038b0de7abb6ecfbc50d
MD5 9a7e7f37c3c880f520d204c7db5c0d21
BLAKE2b-256 bb1b3f172935f95849a02ac23f6d7bebe836d4c4fe19eacc2ec702404fab19d1

See more details on using hashes here.

Provenance

The following attestation bundles were made for gradio_terminal-0.1.0.tar.gz:

Publisher: publish-to-pypi.yml on aben20807/gradio-terminal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for gradio_terminal-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5ede36cefb0ea61aeffb22869b8b980856edf9c513257a0ca6776882ce8b7df4
MD5 004cdd8ac9d47409d6a381e169ee6438
BLAKE2b-256 5a3d60a2f3e4cecaf72c10c82770189a5e4c1c288b1fa8547ea218bcd72efedb

See more details on using hashes here.

Provenance

The following attestation bundles were made for gradio_terminal-0.1.0-py3-none-any.whl:

Publisher: publish-to-pypi.yml on aben20807/gradio-terminal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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