360 Secure SkillHub
360 安全技能中心

Halo Cli Auth

这是Halo CLI的认证前置技能,需完成认证才能使用Halo的内容、插件等其他命令。核心功能:支持Bearer Token和Basic Auth两种登录方式,可查看、切换、删除认证配置文件,还能诊断修复凭证问题。典型场景:首次配置认证、多环境配置切换、凭证故障排查。输入为带参数的CLI命令,输出为终端文本或JSON数据。

ruibaby
ruibaby
热度 51.28
最近更新 2026-05-11 17:34:16
分类:开发依赖:纯提示词应用场景:DevOps

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add halo-cli-auth
Metadata
name
halo-cli-auth
version
1.0.0
description
Use when working with Halo CLI login, bearer token or basic auth, profile setup, profile switching, current profile inspection, or fixing missing keyring credentials.
references
["../halo-cli-shared"]
metadata
{"openclaw":{"category":"developer-tools","requires":{"bins":["halo"]},"cliHelp":"halo auth --help"}}

Halo CLI Auth

Use this skill for halo auth and halo auth profile.

If authentication is not set up yet, do this first before running post, single-page, plugin, theme, attachment, backup, moment, comment, or notification commands.

Commands

halo auth --help
halo auth login --help
halo auth profile --help

Main workflows:

  • 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

Common Flows

Login with bearer token:

halo auth login \
  --profile local \
  --url http://127.0.0.1:8090 \
  --auth-type bearer \
  --token <token>

Login with basic auth:

halo auth login \
  --profile local \
  --url http://127.0.0.1:8090 \
  --auth-type basic \
  --username admin \
  --password <password>

Inspect and switch profiles:

halo auth current
halo auth profile list
halo auth profile use production
halo auth profile get production --json

Diagnose broken credentials:

halo auth profile doctor
halo auth profile delete production --force
halo auth login --profile production --url https://halo.example.com --auth-type bearer --token <token>

Rules

  • In non-interactive mode, halo auth login requires --profile, --url, and --auth-type.
  • basic auth requires --username and --password.
  • bearer auth requires --token.
  • Use --json when another tool needs structured output.
  • profile delete is destructive; use --force in non-interactive mode.
  • Profile metadata lives in config, but secrets live in the system keyring.

Routing

  • Use halo-cli-content for posts and single pages.
  • Use halo-cli-search for public site search.
  • Use halo-cli-operations for themes, plugins, attachments, backups, and moments.
  • Use halo-cli-moderation-notifications for comments, replies, and notifications.