onboarding

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

ElevenLabs Onboarding

ElevenLabs 入门配置

The ElevenLabs CLI runs the whole setup and tells you each step. From the folder of the app that will use the key (in a monorepo, that app's folder), run:
bash
npx -y @elevenlabs/cli@latest onboard init
Every
onboard
command prints JSON. Act on it, and keep going until
next
is
done
:
  • next
    : what to do now, spelled out in
    instruction
    .
  • run
    : the exact next command. Run it as given.
  • say
    : what to tell the user. Tell them as written.
  • details
    : facts for the next step, such as how the app loads the key and the SDK install command.
  • rules
    : rules for the whole setup. Follow them.
What each
next
means:
  • run
    : run
    run
    .
  • wait
    : the approval page is open. Show
    say
    (it has the link), then run
    run
    again right away, without ending your turn. Whenever you give the user the link, copy it whole, exactly as printed: a shortened link doesn't work.
  • ask_what_to_build
    : tell the user
    say
    , which asks what they want to build or whether to just add the SDK, and wait for their answer before writing any code. Ask it even if they said earlier, and don't pick a product for them. Once they answer, run
    run
    .
  • write_code
    : write what they asked for, as
    instruction
    says: the SDK alone, or the integration, with the skill that fits from
    details.fetch_skills
    when there is one. If it needs something made in ElevenLabs first, like an agent, make it yourself with the key (load the env file in the command, never print it), not a script for the user to run. Load the key the way
    details.load_key
    says, then run
    run
    .
  • load_key
    : the code already uses the SDK, so there is nothing to build. Make sure the app loads the key the way
    details.load_key
    says, change nothing else, then run
    run
    .
  • fix
    : do what
    say
    describes, then run
    run
    . If it needs the user's shell, settings or secrets, ask them instead, as for
    ask_user
    .
  • ask_user
    : ask the user what
    say
    says and wait for their answer, then run
    run
    , unless they said no.
  • offer_test
    : say what you set up and anything the user still has to do themselves, like installing the packages you added. Then end your reply with the question in
    say
    . Run
    run
    only if they say yes.
  • done
    : tell the user
    say
    , then anything they still have to do themselves, in one or two concrete steps.
ElevenLabs CLI 会完成整个设置流程,并逐步告诉你接下来要做什么。在将要使用 该 key 的应用目录中(在 monorepo 中则为对应应用的目录),运行:
bash
npx -y @elevenlabs/cli@latest onboard init
每个
onboard
命令都会输出 JSON。根据输出继续操作,直到
next
为
done
:
  • next
    :现在要做什么,具体说明写在
    instruction
    中。
  • run
    :要运行的下一个命令。按原样运行。
  • say
    :要告诉用户的内容。按原文告知用户。
  • details
    :下一步所需的信息,例如应用如何加载 key,以及 SDK 安装命令。
  • rules
    :整个设置流程的规则。请遵守这些规则。
每种
next
的含义:
  • run
    :运行
    run
    。
  • wait
    :授权页面已打开。显示
    say
    (其中包含链接),然后立即再次运行
    run
    ,不要结束当前轮次。每当你向用户提供链接时,必须完整、准确地 按原样复制链接:缩短后的链接无法使用。
  • ask_what_to_build
    :按
    say
    的内容告知用户,询问他们想构建什么,或者 是否只添加 SDK。在编写任何代码前等待用户回答。即使他们之前已经说过, 也要再次询问,并且不要替他们选择产品。收到回答后,运行
    run
    。
  • write_code
    :按照
    instruction
    的说明编写用户要求的内容:仅添加 SDK, 或使用
    details.fetch_skills
    中适合的 skill 完成集成。如果需要先在 ElevenLabs 中创建内容,例如 Agent,请使用 key 自行创建(在命令中加载 env 文件,但绝不打印它),不要编写让用户运行的脚本。按照
    details.load_key
    的说明加载 key,然后运行
    run
    。
  • load_key
    :代码已经使用 SDK,因此无需构建任何内容。确保应用按照
    details.load_key
    的说明加载 key,不做其他修改,然后运行
    run
    。
  • fix
    :按照
    say
    的描述执行,然后运行
    run
    。如果需要使用用户的 shell、设置或 secrets,请改为向用户询问,与
    ask_user
    相同。
  • ask_user
    :询问用户
    say
    所述内容并等待回答,然后运行
    run
    ;如果用户 回答不要,则不要运行。
  • offer_test
    :说明你完成了哪些设置,以及用户仍需自行完成的事项,例如 安装你新增的 packages。然后以
    say
    中的问题结束回复。只有用户同意后 才运行
    run
    。
  • done
    :将
    say
    的内容告诉用户,然后说明用户仍需自行完成的事项, 最多列出一两个具体步骤。

Rules

规则

  • Never open, print or
    cat
    the env file;
    onboard check
    verifies it.
  • Never ask for an API key in chat, and never accept one pasted there. If one appears, tell the user to rotate it on the API keys page.
  • Never put the key in code; the SDK reads
    ELEVENLABS_API_KEY
    .
  • Never run
    git clean
    or delete untracked files: the key is in one.
  • Don't write or change any code until a reply's
    next
    is
    write_code
    or
    load_key
    .
  • Put anything you download only to read, like a package or an archive, in a temp folder, never in the project.
  • Don't run the app (or its start script) or make speech to try it until the user says yes to the test request. API calls that what they asked for needs, like creating an agent, are fine. Once the code is written, run
    onboard check
    before you finish: it verifies the key and the code.
  • 绝不打开、打印或
    cat
    env 文件;
    onboard check
    会验证它。
  • 绝不在聊天中索要 API key,也不要接受用户粘贴的 key。如果出现这种情况, 告知用户前往 API keys 页面轮换它。
  • 绝不将 key 写入代码;SDK 会读取
    ELEVENLABS_API_KEY
    。
  • 绝不运行
    git clean
    ,也不删除 untracked files:key 位于其中一个文件中。
  • 在回复中的
    next
    为
    write_code
    或
    load_key
    之前,不要编写或修改任何代码。
  • 任何仅为读取而下载的内容,例如 package 或 archive,都只能放在临时目录中, 绝不能放在项目中。
  • 在用户同意测试请求之前,不要运行应用(或其启动脚本),也不要生成语音进行 测试。调用用户所需功能所必需的 API 是允许的,例如创建 Agent。代码编写完成后, 结束前运行
    onboard check
    :它会验证 key 和代码。

No npx

无 npx 时的操作

If
npx
isn't available (Node.js isn't installed), install the CLI (or update it if it's already installed:
brew upgrade elevenlabs
, or run the installer again), then run
elevenlabs onboard init
instead. Everything after that is the same.
  • macOS or Linux:
    brew install elevenlabs/tap/elevenlabs
    , or
    curl --proto '=https' --tlsv1.2 -LsSf https://github.com/elevenlabs/cli/releases/latest/download/elevenlabs-cli-installer.sh | sh
  • Windows:
    powershell -ExecutionPolicy ByPass -c "irm https://github.com/elevenlabs/cli/releases/latest/download/elevenlabs-cli-installer.ps1 | iex"
If
elevenlabs
isn't found after the installer ran, use
~/.cargo/bin/elevenlabs
in its place, here and in every
run
the CLI gives.
如果
npx
不可用(即未安装 Node.js),请安装 CLI(如果已经安装,则更新它: 运行
brew upgrade elevenlabs
,或者再次运行安装程序),然后改为运行
elevenlabs onboard init
。后续操作完全相同。
  • macOS 或 Linux:
    brew install elevenlabs/tap/elevenlabs
    ,或者运行
    curl --proto '=https' --tlsv1.2 -LsSf https://github.com/elevenlabs/cli/releases/latest/download/elevenlabs-cli-installer.sh | sh
  • Windows:
    powershell -ExecutionPolicy ByPass -c "irm https://github.com/elevenlabs/cli/releases/latest/download/elevenlabs-cli-installer.ps1 | iex"
如果运行安装程序后仍找不到
elevenlabs
,则在此处以及 CLI 给出的每个
run
命令中,改用
~/.cargo/bin/elevenlabs
。