跳到主要内容

Profile Commands Reference

本页覆盖所有与 Hermes profiles 相关的命令。通用 CLI 命令请参阅 CLI Commands Reference

hermes profile

hermes profile <subcommand>

用于管理 profile 的顶层命令。直接运行 hermes profile 而不带子命令时,会显示帮助。

SubcommandDescription
list列出所有 profile
use设置当前激活(默认)的 profile
create创建新 profile
delete删除一个 profile
show显示某个 profile 的详细信息
alias重新生成某个 profile 的 shell alias
rename重命名一个 profile
export将 profile 导出为 tar.gz 压缩包
import从 tar.gz 压缩包导入 profile

hermes profile list

hermes profile list

列出所有 profile。当前激活的 profile 会带 * 标记。

示例:

$ hermes profile list
default
* work
dev
personal

没有额外选项。

hermes profile use

hermes profile use <name>

<name> 设为激活的 profile。之后所有不带 -phermes 命令都会默认使用这个 profile。

ArgumentDescription
<name>要激活的 profile 名称。使用 default 可切回基础 profile

示例:

hermes profile use work
hermes profile use default

hermes profile create

hermes profile create <name> [options]

创建一个新 profile。

Argument / OptionDescription
<name>新 profile 的名称。必须是合法目录名(字母数字、连字符、下划线)
--clone从当前 profile 复制 config.yaml.envSOUL.md
--clone-all从当前 profile 复制全部内容(配置、记忆、技能、会话、状态)
--clone-from <profile>配合 --clone--clone-all,指定复制来源 profile,而不是当前 profile
--no-alias跳过 wrapper script 创建

创建 profile 不会 自动把该 profile 目录变成终端命令的默认项目 / 工作区目录。如果你希望某个 profile 启动时总在指定项目下工作,请在该 profile 的 config.yaml 里设置 terminal.cwd

示例:

# Blank profile — needs full setup
hermes profile create mybot

# Clone config only from current profile
hermes profile create work --clone

# Clone everything from current profile
hermes profile create backup --clone-all

# Clone config from a specific profile
hermes profile create work2 --clone --clone-from work

hermes profile delete

hermes profile delete <name> [options]

删除一个 profile,并移除它的 shell alias。

Argument / OptionDescription
<name>要删除的 profile
--yes, -y跳过确认提示

示例:

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

这会永久删除该 profile 的整个目录,包括所有配置、记忆、会话和技能。不能删除当前处于激活状态的 profile。

hermes profile show

hermes profile show <name>

显示某个 profile 的详细信息,包括 home 目录、配置模型、gateway 状态、技能数量和配置文件状态。

这里展示的是该 profile 的 Hermes home 目录,而不是终端工作目录。终端命令的起始目录仍由 terminal.cwd 决定(或者在 local backend 且 cwd: "." 时使用命令启动目录)。

ArgumentDescription
<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 alias 脚本。如果 alias 被意外删除,或者你迁移 Hermes 安装后需要更新 wrapper,这个命令很有用。

Argument / OptionDescription
<name>要为其创建 / 更新 alias 的 profile
--remove删除 wrapper script,而不是创建它
--name <alias>自定义 alias 名称(默认等于 profile 名)

示例:

hermes profile alias work
# Creates/updates ~/.local/bin/work

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

hermes profile alias work --remove
# Removes the wrapper script

hermes profile rename

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

重命名一个 profile,同时更新其目录和 shell alias。

ArgumentDescription
<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 归档文件。

Argument / OptionDescription
<name>要导出的 profile
-o, --output <path>输出文件路径(默认:<name>.tar.gz

示例:

hermes profile export work
# Creates work.tar.gz in the current directory

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

hermes profile import

hermes profile import <archive> [options]

从 tar.gz 归档导入一个 profile。

Argument / OptionDescription
<archive>要导入的 tar.gz 文件路径
--name <name>导入后使用的 profile 名称(默认从归档中推断)

示例:

hermes profile import ./work-2026-03-29.tar.gz
# Infers profile name from the archive

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 下运行。它只会对这一次命令调用生效。

OptionDescription
-p <name>, --profile <name>本次命令要使用的 profile

示例:

hermes -p work chat -q "Check the server status"
hermes --profile dev gateway start
hermes -p personal skills list
hermes -p work config edit

hermes completion

hermes completion <shell>

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

ArgumentDescription
<shell>生成哪种 shell 的补全:bashzsh

示例:

# Install completions
hermes completion bash >> ~/.bashrc
hermes completion zsh >> ~/.zshrc

# Reload shell
source ~/.bashrc

安装完成后,tab 补全支持:

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

See also