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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

cli2webui-0.2.0-py3-none-any.whl (17.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for cli2webui-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8c4a12facb0ac2848711d8d32602023db164753cde499e794d5f6ec91ee02c9b
MD5 fa252808adbddecb3e9614fe2c7f0d4e
BLAKE2b-256 c6ce964b81fab6584ac8fd8b2fa82e8b5201352d465786271fce76b73d47d420

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