Skip to main content

A tool to convert CLI tools to web interfaces

Project description

CLI2WebUI

将命令行工具转换为Web界面的工具。

安装

pip install cli2webui

使用方法

基本用法:

cli2webui <command>

例如:

cli2webui ls  # 将ls命令转换为web界面
cli2webui --port 5600 ls  # 在指定端口运行
cli2webui --host 0.0.0.0 --port 8080 ls  # 指定主机和端口

支持的参数:

  • --port: 指定web服务器端口(默认:5000)
  • --host: 指定web服务器主机(默认:localhost)

功能特点

  • 自动解析命令行工具的帮助信息
  • 生成交互式Web界面
  • 实时显示命令执行输出
  • 支持自定义端口和主机
  • 支持大多数常见的命令行工具

工作原理

CLI2WebUI 通过以下步骤工作:

  1. 解析命令行工具的帮助信息
  2. 生成对应的Web表单界面
  3. 启动本地Web服务器
  4. 执行用户通过Web界面提交的命令
  5. 实时显示命令执行结果

开发

要参与开发,请按以下步骤操作:

# 克隆仓库
git clone https://github.com/wangmaobin/cli2webui.git

# 安装开发依赖
cd cli2webui
pip install -e .

# 运行测试
python -m pytest

许可证

MIT License

作者

Wang Maobin (wangmaobin@iscas.ac.cn)

贡献

欢迎提交 Issue 和 Pull Request!

更新日志

v0.2.0

  • 支持自定义端口和主机
  • 改进了命令行参数处理
  • 优化了web界面响应性
  • 添加了更多命令行工具支持

v0.1.0

  • 初始版本发布
  • 基本的命令行转Web功能
  • 支持实时输出显示

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

cli2webui-0.2.1.tar.gz (17.6 kB view details)

Uploaded Source

Built Distribution

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

cli2webui-0.2.1-py3-none-any.whl (17.9 kB view details)

Uploaded Python 3

File details

Details for the file cli2webui-0.2.1.tar.gz.

File metadata

  • Download URL: cli2webui-0.2.1.tar.gz
  • Upload date:
  • Size: 17.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for cli2webui-0.2.1.tar.gz
Algorithm Hash digest
SHA256 e01863559838cce646556673f20c5028d776f1cf29968712704c1b02bc5f0713
MD5 ad9ba84597d88eb935201ccde5599cb5
BLAKE2b-256 1116bd1318503dab99395b106fa9cfea0f8e9a90c9e21d7236f100f398f401f9

See more details on using hashes here.

File details

Details for the file cli2webui-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: cli2webui-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 17.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for cli2webui-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e30296b9468f562f0911472139eb129adb6de756871fe7c0a21e792dca33b190
MD5 3ab950c2404eaa191412912efacd2eaa
BLAKE2b-256 b07f72184cf4c50ea6cf251aeec70dc13c00db43065ef17e288299879ab2463e

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