用途:本技能面向 Halo CLI 的认证与连接配置,适用于需要登录 Halo 实例、保存或切换配置档(profile)、在多环境间切换,以及检查存储凭据是否正常的场景。它不负责直接管理文章、页面、插件、主题或附件。使用前需先阅读 ../halo-shared/SKILL.md 了解全局用法、JSON 输出行为、配置档选择和安全约定。
主要能力:支持 bearer token 与 basic auth 两种登录方式,可将凭据保存为具名配置档;可查看当前配置档、列出、获取、切换、删除配置档,并可用 doctor 检查配置档与凭据的一致性。
必要用法:核心命令为 halo auth <command> [flags] 与 halo auth profile <command> [flags]。登录示例:halo auth login --profile local --url http://127.0.0.1:8090 --auth-type bearer --token <your-token>;basic auth 需 --username 与 --password。查看当前配置档用 halo auth current,列出用 halo auth profile list,切换用 halo auth profile use local,删除用 halo auth profile delete <name> --force,诊断用 halo auth profile doctor。多数命令支持 --json 以供自动化解析,非交互场景建议显式传全部登录参数并用 --force。
限制与安全:配置档元数据保存在 config,实际凭据单独存于系统 keyring;删除配置档应同时移除其保存的凭据;在共享系统上避免将明文密码或 token 直接写入 shell 历史。具体版本、平台或价格信息暂未提供。