Lumen CLI マニュアル 開発中
lumen-cli は Lumen のオプションの CLI(Rust 製)で、Python SDK に依存しないコマンドラインワークフロー機能を提供します。
インストール
bash
cargo install lumen-cli
# または
curl -fsSL https://lumen.lurus.cn/install.sh | sh概要
lumen <command> [options]| コマンド | 用途 |
|---|---|
doctor | 環境セルフチェック:Token、ネットワーク、ディスク、Python 依存関係 |
init | プロジェクトルートに lumen.yaml 設定テンプレートを生成 |
agent | Agent レベルの操作:一覧 / trace / replay / export |
mcp | MCP 互換レイヤー:Lumen の機能を Claude/Codex に公開 |
workflow | lumen.yaml に基づくワークフロー実行器 |
deploy | Agent 定義を Kova Cluster にプッシュ |
config | ローカル CLI 設定の参照/変更 |
コマンド詳細
bash
# doctor — 環境自検(退出码 0 全通过 / 1 至少一项失败)
lumen doctor
# ✓ LURUS_API_KEY present ✓ python3.11 detected ✓ /var/lumen writable (5.2 GB free)
# ✗ port 7070 occupied — close the process or set LUMEN_PORT
# init — 项目根生成 lumen.yaml(templates: langgraph / bare / multi-agent)
lumen init --template langgraph
# agent
lumen agent list # 列出本地/远端 Agent
lumen agent trace <run-id> # 打印 trace 树
lumen agent replay <run-id> # 不消耗 Token 重放
lumen agent export <run-id> # 导出 JSON / HAR / OTel
# mcp — 启动 MCP 服务端,暴露 Trace/Replay/Cost 为工具
lumen mcp serve --port 3333 # 或 --manifest ./my-tools.yaml
# Claude Code / Codex 的 mcp_servers 指向 http://127.0.0.1:3333 即可调用
# workflow — 按 lumen.yaml 执行多 Agent 编排
lumen workflow run # 默认 pipeline;-e prod 指定环境;--dry-run 不实际调 LLM
# deploy — 推送 Agent 定义到 Kova Cluster
lumen deploy --target kova://my-cluster
# config
lumen config get api_key
lumen config set api_key sk-xxxx
lumen config unset telemetry.endpointreplay と dry-run はどちらも料金がかかりません
lumen agent replay <run-id> は履歴から再生し、Token を消費しません;lumen workflow run --dry-run はオーケストレーションフローを最後まで実行しますが実際には LLM を呼び出しません。lumen.yaml の設定を検証するのに適しています。終了コード
| Code | 意味 |
|---|---|
0 | 成功 |
1 | 一般エラー |
2 | パラメータエラー |
3 | 設定不足 |
4 | ネットワークエラー |
5 | リモートサービスがエラーを返した |