用途:该技能用于配置和使用 Halo CLI 的身份认证,在运行文章、独立页面、插件、主题、附件、备份、瞬间、评论或通知等命令前先完成认证设置。
主要能力:支持 halo auth 与 halo auth profile,包括登录、查看当前认证、列出/查看/切换/删除配置文件、诊断凭证问题。
常用命令:halo auth login、halo auth current、halo auth profile list、halo auth profile current、halo auth profile get <name>、halo auth profile use <name>、halo auth profile delete <name>、halo auth profile doctor。
使用方式:bearer 认证使用 halo auth login --profile local --url http://127.0.0.1:8090 --auth-type bearer --token <token>;basic 认证使用 halo auth login --profile local --url http://127.0.0.1:8090 --auth-type basic --username admin --password <password>。非交互模式下必须提供 --profile、--url 与 --auth-type,basic 需 --username 和 --password,bearer 需 --token。可用 --json 获取结构化输出。
限制与注意:profile delete 为破坏性操作,非交互模式需使用 --force;配置文件元数据保存在 config,密钥保存在系统 keyring。该技能不负责内容、搜索、运维或评论通知相关命令。