Skip to main content

Module gen_key

Module gen_key 

Source
Expand description

futucli gen-key: 生成新 API Key 并追加到 keys.json

明文 key 只会打印到 stdout 一次,用户必须立即保存;文件中只存 SHA-256 hash。

Structs§

GenKeyCommand
KeyPrintView 🔒

Functions§

build_allowed_machines 🔒
组装 allowed_machines 列表
default_keys_path 🔒
默认 keys.json 路径:按 OS 取 dirs::config_dir() (macOS ~/Library/Application Support/futu/ / Linux ~/.config/futu/ / Windows %APPDATA%\futu\)
detect_futu_mcp_path 🔒
探测 futu-mcp 的绝对路径,生成 gen-key 输出里的 MCP 配置模板时用。
parse_acc_ids_csv 🔒
v1.4.35: 解析 --allowed-acc-ids 10001,10002,10003HashSet<u64>
parse_expires 🔒
解析 --expires 参数:30d / 24h / 2026-06-30T23:59:59Z
parse_scopes 🔒
print_result 🔒
run