跳到主要内容

Profile 命令参考

本页面涵盖所有与 Hermes profiles 相关的命令。常规 CLI 命令请参阅 CLI 命令参考

hermes profile

hermes profile <子命令>

管理 profiles 的顶层命令。运行 hermes profile 而不带子命令显示帮助。

子命令描述
list列出所有 profiles。
use设置活动(默认)profile。
create创建新 profile。
delete删除 profile。
show显示 profile 详情。
alias重新生成 profile 的 shell 别名。
rename重命名 profile。
export将 profile 导出为 tar.gz 归档。
import从 tar.gz 归档导入 profile。

hermes profile list

hermes profile list

列出所有 profiles。当前活动的 profile 用 * 标记。

示例:

$ hermes profile list
default
* work
dev
personal

无选项。

hermes profile use

hermes profile use <name>

<name> 设置为活动 profile。所有后续 hermes 命令(不带 -p)将使用此 profile。

参数描述
<name>要激活的 profile 名称。使用 default 返回基础 profile。

示例:

hermes profile use work
hermes profile use default

hermes profile create

hermes profile create <name> [options]

创建新 profile。

参数 / 选项描述
<name>新 profile 的名称。必须是有效的目录名(字母、数字、连字符、下划线)。
--clone从当前 profile 复制 config.yaml.envSOUL.md
--clone-all从当前 profile 复制所有内容(配置、记忆、技能、会话、状态)。
--clone-from <profile>从特定 profile 而不是当前 profile 克隆。与 --clone--clone-all 一起使用。
--no-alias跳过包装脚本创建。

示例:

# 空白 profile — 需要完整设置
hermes profile create mybot

# 从当前 profile 仅克隆配置
hermes profile create work --clone

# 从当前 profile 克隆所有内容
hermes profile create backup --clone-all

# 从特定 profile 克隆配置
hermes profile create work2 --clone --clone-from work

hermes profile delete

hermes profile delete <name> [options]

删除 profile 并移除其 shell 别名。

参数 / 选项描述
<name>要删除的 profile。
--yes, -y跳过确认提示。

示例:

hermes profile delete mybot
hermes profile delete mybot --yes
注意

这会永久删除 profile 的整个目录,包括所有配置、记忆、会话和技能。无法删除当前活动的 profile。

hermes profile show

hermes profile show <name>

显示 profile 的详细信息,包括其主目录、配置的模型、网关状态、技能数量和配置文件状态。

参数描述
<name>要检查的 profile。

示例:

$ hermes profile show work
Profile: work
Path: ~/.hermes/profiles/work
Model: anthropic/claude-sonnet-4 (anthropic)
Gateway: stopped
Skills: 12
.env: exists
SOUL.md: exists
Alias: ~/.local/bin/work

hermes profile alias

hermes profile alias <name> [options]

~/.local/bin/<name> 重新生成 shell 别名脚本。如果别名被意外删除或移动 Hermes 安装后需要更新,这很有用。

参数 / 选项描述
<name>要创建/更新别名的 profile。
--remove删除包装脚本而不是创建它。
--name <alias>自定义别名名称(默认:profile 名称)。

示例:

hermes profile alias work
# 创建/更新 ~/.local/bin/work

hermes profile alias work --name mywork
# 创建 ~/.local/bin/mywork

hermes profile alias work --remove
# 删除包装脚本

hermes profile rename

hermes profile rename <old-name> <new-name>

重命名 profile。更新目录和 shell 别名。

参数描述
<old-name>当前 profile 名称。
<new-name>新 profile 名称。

示例:

hermes profile rename mybot assistant
# ~/.hermes/profiles/mybot → ~/.hermes/profiles/assistant
# ~/.local/bin/mybot → ~/.local/bin/assistant

hermes profile export

hermes profile export <name> [options]

将 profile 导出为压缩 tar.gz 归档。

参数 / 选项描述
<name>要导出的 profile。
-o, --output <path>输出文件路径(默认:<name>.tar.gz)。

示例:

hermes profile export work
# 在当前目录创建 work.tar.gz

hermes profile export work -o ./work-2026-03-29.tar.gz

hermes profile import

hermes profile import <archive> [options]

从 tar.gz 归档导入 profile。

参数 / 选项描述
<archive>要导入的 tar.gz 归档路径。
--name <name>导入 profile 的名称(默认:从归档推断)。

示例:

hermes profile import ./work-2026-03-29.tar.gz
# 从归档推断 profile 名称

hermes profile import ./work-2026-03-29.tar.gz --name work-restored

hermes -p / hermes --profile

hermes -p <name> <command> [options]
hermes --profile <name> <command> [options]

全局标志,用于在特定 profile 下运行任何 Hermes 命令而不更改粘性默认设置。这会在命令执行期间覆盖活动 profile。

选项描述
-p <name>, --profile <name>此命令使用的 profile。

示例:

hermes -p work chat -q "检查服务器状态"
hermes --profile dev gateway start
hermes -p personal skills list
hermes -p work config edit

hermes completion

hermes completion <shell>

生成 shell 补全脚本。包括 profile 名称和 profile 子命令的补全。

参数描述
<shell>生成补全的 shell:bashzsh

示例:

# 安装补全
hermes completion bash >> ~/.bashrc
hermes completion zsh >> ~/.zshrc

# 重新加载 shell
source ~/.bashrc

安装后,tab 补全适用于:

  • hermes profile <TAB> — 子命令(list、use、create 等)
  • hermes profile use <TAB> — profile 名称
  • hermes -p <TAB> — profile 名称

另请参阅