Skip to main content

scholai-cli

scholai 课件生成管线的 Python CLI。

由 @scholai/openclaw-scholai plugin 的 skill 通过 metadata.openclaw.install: [kind: uv] 自动安装;也可独立使用:

uv tool install scholai-cli
scholai course vfd-url --run-id 260422-abc12345-article-01

管线 atom 列表

通用(kind-agnostic)

  • scholai course vfd-url — URL → intermediate/VFD.json
  • scholai course iod — VFD → intermediate/IOD.json
  • scholai course publish --kind <article|mindmap> — POST 对应 kind 的 publish-facing 产物到 scholai 平台

article kind

  • scholai course pd — IOD + VFD → intermediate/PD.md
  • scholai course txd-gen — 含图占位符的 intermediate/TXD.md
  • scholai course txd-imagegen — 生成占位图 + intermediate/TXD_final.md
  • scholai course txd-render-html — TXD_final → output/article.html

publish payload: output/article.html。

mindmap kind

  • scholai course mmd-gen — IOD → output/mindmap.md(Markmap 风格 Markdown,严格按 IOD keywords 平铺,不扩展)
  • scholai course mmd-render-html — mindmap.md → output/mindmap.html(markmap-autoloader 本地预览,含「保存为 PNG」按钮,零 LLM 调用)

publish payload: output/mindmap.md(Markdown,不是 HTML —— scholai 后端的 MARKDOWN_KINDS 白名单包含 mindmap,传 HTML 会被 400 拒绝;最终页面由后端用 markmap 渲染)。

video kind

atom 类型 输入 输出
vfd-url 复用 input/source.json (type=url) intermediate/VFD.json
ssd-gen LLM 文本 VFD.json intermediate/SSD.json
ssd-imagegen LLM 图像 SSD.json intermediate/images/SEG-NN.jpg + manifest.json
tts-gen edge-tts CLI SSD.json intermediate/audio/SEG-NN.mp3 + durations.json
video-compose moviepy + ffmpeg SSD + images + audio output/video.mp4 + output/cover.jpg + intermediate/SSD.srt
lark-send lark-cli output/video.mp4 + cover.jpg + chat_type/chat_native_id output/lark_send.json(消息 ID)

publish payload: 无(本期 MVP 跳过 publish 与 OSS;视频通过 lark-send 直接推回原 IM 会话)。

Token 用量查询

运行 scholai usage <subcommand> 查询 LLM 调用用量。

命令

scholai usage today                          # 今天的用量
scholai usage yesterday                      # 昨天的用量
scholai usage range --from 2026-05-01 --to 2026-05-06   # 日期区间
scholai usage run <run_id>                   # 单次 run 的用量

# 可选:按 skill 过滤(today / yesterday / range)
scholai usage today --skill article

配置价格(可选)

创建 ~/.openclaw/scholai-usage/pricing.toml(dev 模式为 ~/.openclaw-dev/scholai-usage/pricing.toml):

[chat."deepseek-chat"]
prompt = 2.0          # 元/百万 token,cache miss
prompt_cached = 0.5   # 元/百万 token,cache hit(可省略,省略回落到 prompt 价)
completion = 8.0

[chat."glm-4-plus"]
prompt = 5.0
completion = 5.0

[image."cogview-3"]
per_call = 0.06       # 元/张

没有此文件时,命令仍可用,只显示 token 数量,不计算金额。

数据文件位置

文件 路径
per-run 用量 <openclaw_home>/agents/<bot_id>/workspace/runs/<run_id>/logs/usage.jsonl
按天汇总 <openclaw_home>/scholai-usage/<YYYY-MM-DD>.jsonl
价格配置 <openclaw_home>/scholai-usage/pricing.toml

<openclaw_home> 由 openclaw 注入的 OPENCLAW_STATE_DIR 确定(dev 模式为 ~/.openclaw-dev)。

开发

cd packages/scholai-cli
uv sync --all-extras
uv run pytest

Metadata

Release files for scholai-cli 0.1.23

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for scholai-cli 0.1.23
File Size Uploaded Provenance Actions
scholai_cli-0.1.23.tar.gz 105.8 kB Without provenance Details for scholai_cli-0.1.23.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for scholai-cli 0.1.23
File Interpreter ABI Platform Actions
scholai_cli-0.1.23-py3-none-any.whl Python 3 none any Details for scholai_cli-0.1.23-py3-none-any.whl

Total release size: 250.7 kB

Release files / scholai_cli-0.1.23.tar.gz

Download URL scholai_cli-0.1.23.tar.gz
Size 105.8 kB
Tags Source
SHA-256 checksum
How to use checksums
80a5f4eaf1d3eefb1f95ef8899ea5b6bf8366c7b92d2ca175eb03b116fb41667
BLAKE2b-256 checksum
How to use checksums
cd3ec4c1dd80c7a01fefbca022af0e9800c2e1cb4cd987f696b53b69a7eaacbe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release files / scholai_cli-0.1.23-py3-none-any.whl

Download URL scholai_cli-0.1.23-py3-none-any.whl
Size 144.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4af24791b8565a82359e59cc639865a56b9ce43016832f46a905d50bc8c39985
BLAKE2b-256 checksum
How to use checksums
5522234bc645abb2e101a571c748c7e1615845f1b00c54051326d933e1642e6e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Security for scholai-cli 0.1.23

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.23 This release

2 release files No provenance

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