Skip to main content

HTMLRun CLI

把本地 HTML 文件发布到 HTMLRun,生成可分享的在线链接。

安装

PyPI: https://pypi.org/project/htmlrun-cli/

pip install htmlrun-cli

使用

先在 https://html.run 创建 publish token:

htmlrun login --token h_xxxxxxxx
htmlrun publish report.html

login 会向服务端校验 token,无效时不写入本地配置并以非 0 退出码结束,所以脚本里可以 直接用它的退出码判断是否登录成功。

再次发布同一路径文件会追加新版本,并保持原链接不变。

命令

命令 说明
htmlrun login --token h_xxx [--base-url URL] 校验 token 并保存 token 和服务地址
htmlrun logout 清除本地 token
htmlrun whoami [--remote] 查看服务地址与 token 状态;--remote 联网查服务端
htmlrun publish FILE [-m 备注] [--new] [--no-inline] 发布 HTML 文件

环境变量

变量 作用
HTMLRUN_TOKEN publish token
HTMLRUN_BASE_URL 服务地址,默认 https://html.run
HTMLRUN_CONFIG_DIR 配置目录,默认 ~/.htmlrun

首次 login 会在配置文件里生成一个随机 client_id,用于在"已绑定设备"列表里区分机器。 它是随机 UUID,不采集硬件信息,也不参与鉴权。logout 不会清除它,这样同一台机器重新 登录仍算同一台设备。

Download files

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

Source Distribution

htmlrun_cli-0.3.0.tar.gz (13.5 kB view details)

Uploaded Source

Built Distribution

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

htmlrun_cli-0.3.0-py3-none-any.whl (14.4 kB view details)

Uploaded Python 3

File details

Details for the file htmlrun_cli-0.3.0.tar.gz.

File metadata

  • Download URL: htmlrun_cli-0.3.0.tar.gz
  • Upload date:
  • Size: 13.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for htmlrun_cli-0.3.0.tar.gz
Algorithm Hash digest
SHA256 dc153394c2dee2fb4f07ed38ce60160879f6542566740034b9af7e357507796b
MD5 e6fd3a2d807466023176004dbdfa6d9d
BLAKE2b-256 96c5e84f4db65e54db6d9c07b7ae81e8fb70255622fb1cf0de9e45108df188ef

See more details on using hashes here.

File details

Details for the file htmlrun_cli-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: htmlrun_cli-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 14.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for htmlrun_cli-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e9249edd57b174c30f4cf291d9233e01ad5401cc9caaa29cd4bffada4caeaef1
MD5 99e31f3ae19f3a41906d23b22827a6c7
BLAKE2b-256 186169a6d68e2f46da7943e823644dec35ff39489dedeee0c526496da37c4368

See more details on using hashes here.

Release history Release notifications | RSS feed

0.4.1

2 files

0.4.0

2 files

This release

0.3.0 This release

2 files

0.2.1

2 files

0.2.0

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page