onboarding
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseElevenLabs 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 initEvery command prints JSON. Act on it, and keep going until
is :
onboardnextdone- : what to do now, spelled out in
next.instruction - : the exact next command. Run it as given.
run - : what to tell the user. Tell them as written.
say - : facts for the next step, such as how the app loads the key and the SDK install command.
details - : rules for the whole setup. Follow them.
rules
What each means:
next- : run
run.run - : the approval page is open. Show
wait(it has the link), then runsayagain 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.run - : tell the user
ask_what_to_build, 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, runsay.run - : write what they asked for, as
write_codesays: the SDK alone, or the integration, with the skill that fits frominstructionwhen 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 waydetails.fetch_skillssays, then rundetails.load_key.run - : the code already uses the SDK, so there is nothing to build. Make sure the app loads the key the way
load_keysays, change nothing else, then rundetails.load_key.run - : do what
fixdescribes, then runsay. If it needs the user's shell, settings or secrets, ask them instead, as forrun.ask_user - : ask the user what
ask_usersays and wait for their answer, then runsay, unless they said no.run - : 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
offer_test. Runsayonly if they say yes.run - : tell the user
done, then anything they still have to do themselves, in one or two concrete steps.say
ElevenLabs CLI 会完成整个设置流程,并逐步告诉你接下来要做什么。在将要使用
该 key 的应用目录中(在 monorepo 中则为对应应用的目录),运行:
bash
npx -y @elevenlabs/cli@latest onboard init每个 命令都会输出 JSON。根据输出继续操作,直到 为 :
onboardnextdone- :现在要做什么,具体说明写在
next中。instruction - :要运行的下一个命令。按原样运行。
run - :要告诉用户的内容。按原文告知用户。
say - :下一步所需的信息,例如应用如何加载 key,以及 SDK 安装命令。
details - :整个设置流程的规则。请遵守这些规则。
rules
每种 的含义:
next- :运行
run。run - :授权页面已打开。显示
wait(其中包含链接),然后立即再次运行say,不要结束当前轮次。每当你向用户提供链接时,必须完整、准确地 按原样复制链接:缩短后的链接无法使用。run - :按
ask_what_to_build的内容告知用户,询问他们想构建什么,或者 是否只添加 SDK。在编写任何代码前等待用户回答。即使他们之前已经说过, 也要再次询问,并且不要替他们选择产品。收到回答后,运行say。run - :按照
write_code的说明编写用户要求的内容:仅添加 SDK, 或使用instruction中适合的 skill 完成集成。如果需要先在 ElevenLabs 中创建内容,例如 Agent,请使用 key 自行创建(在命令中加载 env 文件,但绝不打印它),不要编写让用户运行的脚本。按照details.fetch_skills的说明加载 key,然后运行details.load_key。run - :代码已经使用 SDK,因此无需构建任何内容。确保应用按照
load_key的说明加载 key,不做其他修改,然后运行details.load_key。run - :按照
fix的描述执行,然后运行say。如果需要使用用户的 shell、设置或 secrets,请改为向用户询问,与run相同。ask_user - :询问用户
ask_user所述内容并等待回答,然后运行say;如果用户 回答不要,则不要运行。run - :说明你完成了哪些设置,以及用户仍需自行完成的事项,例如 安装你新增的 packages。然后以
offer_test中的问题结束回复。只有用户同意后 才运行say。run - :将
done的内容告诉用户,然后说明用户仍需自行完成的事项, 最多列出一两个具体步骤。say
Rules
规则
- Never open, print or the env file;
catverifies it.onboard check - 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 or delete untracked files: the key is in one.
git clean - Don't write or change any code until a reply's is
nextorwrite_code.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
before you finish: it verifies the key and the code.
onboard check
- 绝不打开、打印或 env 文件;
cat会验证它。onboard check - 绝不在聊天中索要 API key,也不要接受用户粘贴的 key。如果出现这种情况, 告知用户前往 API keys 页面轮换它。
- 绝不将 key 写入代码;SDK 会读取 。
ELEVENLABS_API_KEY - 绝不运行 ,也不删除 untracked files:key 位于其中一个文件中。
git clean - 在回复中的 为
next或write_code之前,不要编写或修改任何代码。load_key - 任何仅为读取而下载的内容,例如 package 或 archive,都只能放在临时目录中, 绝不能放在项目中。
- 在用户同意测试请求之前,不要运行应用(或其启动脚本),也不要生成语音进行
测试。调用用户所需功能所必需的 API 是允许的,例如创建 Agent。代码编写完成后,
结束前运行 :它会验证 key 和代码。
onboard check
No npx
无 npx 时的操作
If isn't available (Node.js isn't installed), install the CLI (or
update it if it's already installed: , or run the
installer again), then run instead. Everything after
that is the same.
npxbrew upgrade elevenlabselevenlabs onboard init- macOS or Linux: , or
brew install elevenlabs/tap/elevenlabscurl --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 isn't found after the installer ran, use
in its place, here and in every the CLI gives.
elevenlabs~/.cargo/bin/elevenlabsrun如果 不可用(即未安装 Node.js),请安装 CLI(如果已经安装,则更新它:
运行 ,或者再次运行安装程序),然后改为运行
。后续操作完全相同。
npxbrew upgrade elevenlabselevenlabs onboard init- macOS 或 Linux:,或者运行
brew install elevenlabs/tap/elevenlabscurl --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"
如果运行安装程序后仍找不到 ,则在此处以及 CLI 给出的每个
命令中,改用 。
elevenlabsrun~/.cargo/bin/elevenlabs