arkcli-auth
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesearkcli auth
arkcli auth
CRITICAL — 开始前 MUST 先用 Read 工具读取 ,其中包含认证闸门、配置排查与共享安全规则
CRITICAL — 用户目标是其他业务命令时,必须先判断是不是被认证阻塞,再决定是否进入本 skill。
CRITICAL — 是身份/TTY 工作流,全域不注册 ;不要生成该 flag。
CRITICAL — Key 列表、当前 Profile 选中 Key、最近有调用的 Key 是三个不同事实。声称“最近使用”前,须完整分页并按真实 解析时区后取最大值;列表第一条、名称中的日期、 或 状态都不能代替最近调用证据。查询/聚合与披露边界见 API Key 查询与交付。
../arkcli-shared/SKILL.mdauth--dry-runLastAccessTimeCreateTimeActive⚠️ 0.1.16 变化总览(必读):
- SSO 登录引入 Gate 1+2:浏览器流后比对 SSO trn 与 ,4-case 分别走
is_default profile.OwnerTrn(新建) /BuildFirstProfile(复用) / 提示切 default / 提示新建。详见GUIDE_SKIP。docs/runtime/volc-sso.md - AK/SK 登录通道暂关:已注释,promptui 也移除"AK/SK"选项;SSO(火山)+
auth login --access-key / --secret-key(注册在 auth login,由 volc-sso 继承)是唯一登录入口。arkcli auth login --no-browser - auth status / auth whoami 输出新增 profile 切面字段:和
active_profile.{name,type,region,project,owner_trn};顶层profiles_summary[...]等老字段全部保留(向后兼容)。auth_method/logged_in/volc_sso/ark_api_key - Profile 管理迁移到 :
arkcli profile已 deprecated,详见config init/list/show/switch/delete。../arkcli-config/SKILL.md - 0.1.17 首登动态选 project:的 project 步骤改为经 IAM
BuildFirstProfile拉当前身份名下真实 active project 列表交互选(拉取失败/无权限回退兜底ListProjects,不阻断登录)。登录后想换 project 不必重登:default(拉同一列表重选,把 platform profile 重派生到新 project,个人版 plan profile 保留),详见arkcli profile project [<name>]。../arkcli-profile/SKILL.md - 1.0.4 起 交互式浏览器 SSO 分支支持借用本机 volcengine-cli 登录态:检测到
arkcli auth login且已ve >= 1.0.45时,直接接管 STS 落一份 arkcli identity (ve login, 不写 IDToken/refresh_token/ClientID; STS 由 volcengine-go-sdk 内部持 refresh_token 自动 refresh)。用户视角: 少一次浏览器授权; agent 视角:identity_store/<key>/metadata.json.source="ve"变成auth_method而非"sts", 但"sso"。检测失败 / ve 未登录 → 自动降级 arkcli 原生 SSO OAuth 流。详见logged_in=true的"volcengine-cli 登录态借用"节。references/arkcli-auth-login.md
CRITICAL — Before starting, you MUST first use the Read tool to read , which contains the authentication gates, configuration troubleshooting guidance, and shared security rules
CRITICAL — When the user's goal is another business command, you must first determine whether it is blocked by authentication before deciding whether to enter this skill.
CRITICAL — is an identity/TTY workflow, and is not registered anywhere in this workflow; do not generate that flag.
CRITICAL — The Key list, the Key selected for the current Profile, and the Key used most recently are three distinct facts. Before claiming that a Key was "used most recently," you must fully paginate through the list, parse the time zone from the actual , and select the maximum value. The first item in the list, a date in the name, , or status cannot serve as evidence of the most recent invocation. See API Key Query and Delivery for query, aggregation, and disclosure boundaries.
../arkcli-shared/SKILL.mdauth--dry-runLastAccessTimeCreateTimeActive⚠️ 0.1.16 Change Overview (Required Reading):
- SSO login introduces Gate 1+2: after the browser flow, compare the SSO trn with . Route the four cases respectively to
is_default profile.OwnerTrn(create a new Profile),BuildFirstProfile(reuse the existing Profile), a prompt to switch the default Profile, or a prompt to create a new Profile. SeeGUIDE_SKIP.docs/runtime/volc-sso.md - The AK/SK login channel is temporarily disabled: has been commented out, and the "AK/SK" option has also been removed from promptui. SSO (Volcengine) and
auth login --access-key / --secret-key(registered under auth login and inherited by volc-sso) are the only login entry points.arkcli auth login --no-browser - The /
auth statusoutput now includes Profile facet fields:auth whoamiandactive_profile.{name,type,region,project,owner_trn}. All legacy top-level fields, includingprofiles_summary[...], are retained for backward compatibility.auth_method/logged_in/volc_sso/ark_api_key - Profile management has moved to :
arkcli profileare deprecated. Seeconfig init/list/show/switch/delete.../arkcli-config/SKILL.md - Starting with 0.1.17, project selection during first login is dynamic: the project step in now uses IAM
BuildFirstProfileto fetch the real list of active projects under the current identity and lets the user select interactively. If the request fails or the user lacks permission, it falls back toListProjectswithout blocking login. To change the project after login, there is no need to log in again: usedefaultto fetch the same list and select another project. This re-derives the platform Profile for the new project while preserving the Personal plan Profile. Seearkcli profile project [<name>].../arkcli-profile/SKILL.md - Starting with 1.0.4, the interactive browser SSO branch of can borrow the local volcengine-cli login state: when
arkcli auth loginis detected and the user has runve >= 1.0.45, arkcli directly takes over the STS session and writes an arkcli identity (ve login; IDToken/refresh_token/ClientID are not written because the STS session is held internally by volcengine-go-sdk and automatically refreshed using refresh_token). From the user's perspective, this saves one browser authorization. From the agent's perspective,identity_store/<key>/metadata.json.source="ve"becomesauth_methodinstead of"sts", while"sso". If detection fails or ve is not logged in, arkcli automatically falls back to its native SSO OAuth flow. See the "Borrowing the volcengine-cli Login State" section inlogged_in=true.references/arkcli-auth-login.md
适用场景
Applicable Scenarios
- 第一次登录
arkcli - 切换到 Volc SSO
- 登录后重新获取或切换 ARK API Key
- 查看当前凭证状态
- 回答"我是谁 / 我的 IAM ID 是多少 / 我属于哪个账号"——用
arkcli auth whoami - 清理本地登录状态
- 其他业务 skill 因未登录、凭证过期、身份不匹配而被阻塞
- 云开发机 / CI 已注入 凭证,无交互引导 —— 用
VOLC_INIT_*(不是 SSO)arkcli init-volc
- Log in to for the first time
arkcli - Switch to Volc SSO
- Re-obtain or switch the ARK API Key after logging in
- View the current credential status
- Answer "Who am I / What is my identity / Who is the current user / Which account am I using / What is my IAM user ID" — use
arkcli auth whoami - Clear the local login state
- Another business skill is blocked because the user is not logged in, the credentials have expired, or the identity does not match
- Cloud development machines / CI already have credentials injected and require a non-interactive bootstrap — use
VOLC_INIT_*, not SSOarkcli init-volc
无交互引导(init-volc)
Non-Interactive Bootstrap (init-volc)
云开发机 / CI 等已经把火山凭证注入成 环境变量的场景,用 一条命令、零交互地落一个火山 platform profile 并设为 default,让后续 arkcli / OpenCode 调用开箱即用(数据面用 API Key,控制面用 STS)。
VOLC_INIT_*arkcli init-volc- 触发词:"云开发机引导 / 无交互初始化 / 已注入 VOLC_INIT 怎么让 arkcli ready / CI 里跳过 SSO"
- 跟 的区别:
auth login不登录、不交互、不联网,纯消费环境变量;本地终端用户首次引导仍走init-volc(SSO)auth login - 详细环境变量契约、落地行为、输出见
references/arkcli-auth-init-volc.md
In scenarios where cloud development machines, CI, or other environments have already injected Volcengine credentials as environment variables, can write a Volcengine platform Profile to local storage and set it as the default with a single zero-interaction command. Subsequent arkcli / OpenCode calls then work out of the box: the data plane uses an API Key, while the control plane uses STS.
VOLC_INIT_*arkcli init-volc- Trigger phrases: "cloud development machine bootstrap / non-interactive initialization / VOLC_INIT is already injected, how do I make arkcli ready / skip SSO in CI"
- Difference from :
auth logindoes not log in, interact, or access the network; it only consumes environment variables. First-time bootstrap for local terminal users still usesinit-volc(SSO)auth login - See for the detailed environment-variable contract, persistence behavior, and output
references/arkcli-auth-init-volc.md
Agent 快速执行顺序
Agent Quick Execution Order
待授权优先于重新登录。 本轮或用户提供的上一轮状态为 、用户尚未完成授权且没有 code 时,等待用户;不要重新执行任何 、 或原业务命令。可只读检查一次 :若已有所需的有效凭据则恢复原任务; 只说明尚未登录,不表示 pending 过期或丢失,仍须等待。仅收到 CLI 明确的会话过期/不存在错误或用户明确要求重启登录,才重开 Phase 1。
stage=authorize_pendingauth loginconfig initauth statuslogged_in=false- 业务命令开始前如果不确定认证状态,先执行
arkcli auth status - 需要识别当前用户身份("我创建的 / 我的 xxx" 语义)时,用 ,不要去
arkcli auth whoami里手动解 JWT~/.arkcli/.env - 未登录或凭证失效时,火山方舟场景直接通过 Bash 执行 (不要只是"提示用户去跑")。SSO 是 0.1.16 唯一可用登录通道,覆盖控制面 BFF + 数据面绝大多数能力
arkcli auth login volc-sso- 执行前用一句话告知用户:"检测到未登录,我现在为你启动 SSO 登录,请在弹出的浏览器中完成授权"
- Bash 调用必须设 (10 分钟)
timeout=600000 - 启动失败(浏览器没装、失败、端口被占用、超时等)→ 不原地重试,把 stderr 贴回给用户,请用户手动在终端跑对应租户的登录命令(火山:
open)arkcli auth login volc-sso - 命令成功后立即回到用户原始任务,不要停在 auth 结果
- agent / 沙箱 / CI 无浏览器登录走两段式 (AK/SK 通道 0.1.16 暂关,提到 AK/SK 时告知并引导走这里):agent 终端通常非 TTY,
--no-browser现为两段式,不再阻塞读 stdin(旧版在沙箱必报--no-browser—— 进程在拿到授权码前就被 EOF 打断):读取授权码失败: EOF- Phase 1:跑 。它打印授权 URL 并以 JSON 输出
arkcli auth login --no-browser后立即退出(不傻等)。把{"stage":"authorize_pending","authorize_url":"...","next_command":"..."}原样转发给用户,请他在任意设备浏览器完成 SSO,复制页面显示的 base64 授权码回来。authorize_url - Phase 2:拿到授权码后跑 完成登录(读 Phase 1 落盘的 PKCE/state 换 token)。
arkcli auth login --no-browser --code <授权码>必须连--code(单独写会报--no-browser)。--code 仅在 --no-browser 模式下有效 - 两段必须同一运行环境:Phase 1 落盘 、Phase 2 读它接力,两条命令须共享同一
~/.arkcli/.sso-pending.json/ 同一持久化卷(同一容器 / 开发机);跨容器或跨 HOME 派发会让 Phase 2 报「没有待完成的…会话」。期间不要动HOME。~/.arkcli/ - flag 位置:/
--no-browser注册在--code,并由auth login继承;两种入口都支持。Agent 示例统一用volc-sso,Phase 2 同时带arkcli auth login --no-browser。--no-browser --code - 出错恢复:/
会话过期(TTL 10min)→ 重跑 Phase 1(确保同一 HOME);没有待完成的会话/base64 解码失败/ token 交换瞬时失败 → pending 仍在盘,TTL 内纠正后直接重试 Phase 2(贴对当前 authorize_url 的码,必要时从同一 URL 重新授权拿新码),不必重跑 Phase 1。state 不匹配(CSRF) - 真人终端(TTY)下 仍是一条命令交互式(打印 URL 后当场粘贴),行为不变。
arkcli auth login --no-browser
- Phase 1:跑
- 用户明确要求挑选登录方式时,因 stdin 交互 agent 无法替用户选,让用户自己跑
arkcli auth login - 只有在用户明确要求清理本地凭证时,才执行
arkcli auth logout
Pending authorization takes priority over logging in again. If the current turn or the user-provided state from the previous turn is , the user has not completed authorization, and no code is available, wait for the user. Do not rerun any , , or original business command. You may perform one read-only check: if the required valid credentials already exist, resume the original task. only means that the user has not logged in; it does not mean that the pending session has expired or been lost, so you must still wait. Restart Phase 1 only when the CLI explicitly reports that the session has expired or does not exist, or when the user explicitly requests restarting login.
stage=authorize_pendingauth loginconfig initauth statuslogged_in=false- If you are unsure about the authentication state before starting a business command, run first.
arkcli auth status - When you need to identify the current user, such as for semantics such as "created by me" or "my xxx," use . Do not manually decode the JWT in
arkcli auth whoami.~/.arkcli/.env - When the user is not logged in or the credentials are invalid, run directly through Bash for Volcengine Ark scenarios; do not merely tell the user to run it. SSO is the only available login channel as of 0.1.16 and covers most control-plane BFF and data-plane capabilities.
arkcli auth login volc-sso- Before running it, tell the user in one sentence: "Authentication was not detected. I will now start SSO login for you. Please complete the authorization in the browser that opens."
- The Bash call must set (10 minutes).
timeout=600000 - If startup fails, such as because the browser is not installed, fails, the port is occupied, or the command times out, do not retry in place. Return the stderr to the user and ask them to run the login command for the corresponding tenant manually (Volcengine:
open).arkcli auth login volc-sso - Immediately return to the user's original task after the command succeeds. Do not stop at the authentication result.
- For agent, sandbox, or CI environments without a browser, use the two-stage flow. The AK/SK channel is temporarily disabled as of 0.1.16; when the user mentions AK/SK, explain this and direct them here. Agent terminals are usually non-TTY, and
--no-browseris now a two-stage flow that no longer blocks while reading stdin. The old version always failed in sandboxes with--no-browserbecause the process was interrupted by EOF before it received the authorization code.读取授权码失败: EOF- Phase 1: Run . It prints the authorization URL, outputs JSON such as
arkcli auth login --no-browser, and exits immediately instead of waiting indefinitely. Forward{"stage":"authorize_pending","authorize_url":"...","next_command":"..."}to the user exactly as-is and ask them to complete SSO in a browser on any device, then copy the base64 authorization code shown on the page.authorize_url - Phase 2: After receiving the authorization code, run to complete login. Phase 2 reads the PKCE/state persisted by Phase 1 and exchanges it for a token.
arkcli auth login --no-browser --code <authorization code>must be used together with--code; using it alone results in--no-browser.--code 仅在 --no-browser 模式下有效 - Both phases must run in the same runtime environment: Phase 1 writes , and Phase 2 reads it for handoff. Both commands must share the same
~/.arkcli/.sso-pending.jsonor persistent volume, such as the same container or development machine. Dispatching them across different containers or different HOME directories causes Phase 2 to reportHOME. Do not modify没有待完成的…会话during this period.~/.arkcli/ - Flag location: and
--no-browserare registered under--codeand inherited byauth login; both entry points support them. Agent examples consistently usevolc-sso, and Phase 2 includes botharkcli auth login --no-browserand--no-browser.--code - Error recovery: For or
会话过期(TTL 10min), rerun Phase 1 while ensuring it uses the same HOME. For没有待完成的会话,base64 解码失败, or a transient token-exchange failure, the pending session remains on disk. Correct the issue and retry Phase 2 directly within the TTL; paste the code associated with the currentstate 不匹配(CSRF), and reauthorize from the same URL for a new code if necessary. There is no need to rerun Phase 1.authorize_url - In a human-operated TTY, remains a single interactive command that prints the URL and accepts a pasted code immediately. Its behavior is unchanged.
arkcli auth login --no-browser
- Phase 1: Run
- When the user explicitly asks to choose a login method, an agent using stdin-based interaction cannot make the selection for them. Ask the user to run themselves.
arkcli auth login - Run only when the user explicitly requests that local credentials be cleared.
arkcli auth logout
核心规则
Core Rules
- 是默认入口;不要上来就
auth statuslogin - 登录成功后,应回到用户原始目标继续执行,而不是停在 auth 结果本身
- 是破坏性操作,必须由用户明确提出
auth logout - 会对敏感字段做掩码,可直接用于排障,并会展示当前生效的
auth statusproject_name - 成功后会输出
auth login;凭证存储位置是实现细节,不再回显路径auth_method - SSO 登录()与
arkcli auth login volc-sso都会在选中 API Key 之后写入凭证存储;0.1.16 final clean-slate 模型: 整 arkcli 同一时间只 active 一个 identity, 新 SSO 跟旧 sub 不一致时清空所有 profile (含跨 tenant) 重建auth apikey - API Key 必须按 profile 类型分池理解:/
platform个人版使用普通 API Key;coding-plan个人版使用agent-plan的专属 Key;Scene=RealAgentPlanPersonal/agent-plan-team使用coding-plan-team返回的席位 Key。普通池里“有 Key”不能证明 Agent Plan/团队版 Key 可用。GetSeatInfo - TTY 首登发现普通池为空时会先询问是否创建;确认后只调用一次 ,再最多读 3 次状态。Agent Plan 专属记录存在但非 Active 时会询问是否轮转;确认后也只轮转一次、最多读 3 次状态。非 TTY、用户拒绝或无专属记录时绝不写。
CreateApiKey - TTY 首登中,如果用户选择的 profile 类型在 API Key 获取阶段报错(例如 Agent Plan 轮转后检查 3 次仍为 ),CLI 会保留已选 region/project、从本轮候选中移除该失败类型,并重新让用户选择其他消费场景。失败类型不会再次 silent backfill,避免重复获取或二次轮转;这属于 profile 级重选,绝不会拿普通/Coding Plan Key 冒充 Agent Plan 专属 Key。
Restricted - v3 ve handoff 分支 (1.0.4 起, 仅火山 SSO 交互式登录): 检测到本机装有 且已
volcengine-cli >= 1.0.45时,ve login会先尝试借用其登录态直接落 arkcli identity (省一次浏览器授权)。落盘差异见arkcli auth login: 不落references/arkcli-auth-login.md(IDToken/refresh_token/ClientID 由 ve SDK 管), 但落token.json+sts.json;metadata.json.source="ve"显示auth whoami而非auth_method="sts", 是合法登录态。检测失败 / ve 未登录 → 自动降级 arkcli 原生 SSO OAuth。"sso" - 只列举并选择普通 API Key 池,写入 identity/.env 兼容凭证;它不读取或修复 Agent Plan 专属 Key、也不读取团队席位 Key。当前是 Plan profile 时优先使用
arkcli auth apikey或对应 Plan 的轮转/席位流程,不能把profile apikey refresh的auth apikey解读为 Plan Key 已恢复。它也不能让广场语音模型获得saved=true/+chat/+gen/+deploy/+code-example/usage能力。pricing - 创建、验证并保存一把普通 API Key到当前 identity/.env 兼容凭证;TTY 必须确认,非交互环境收到
arkcli auth apikey create后必须走共享 Skill 的宿主确认流程;只发一次requires_confirmation,随后最多做 3 次只读状态检查,成功输出不包含明文 Key。它同样不能创建或修复 Agent Plan 专属 Key、团队席位 Key;已有 Profile 要切换默认 Key 时仍用CreateApiKey。profile apikey refresh/use - 火山 Agent Plan 个人版/企业版 TTS 使用 的
arkcli-gen;个人版使用专属 Key,企业版使用席位 Key,不能用+gen --modality audio的普通 Key 替代。原生 ASR 同样使用已绑定的 Agent Plan Key,走auth apikey。其他未实现语音能力只说明边界。+understand asr/asr-align --audio-protocol ws-bidirectional|ws-unidirectional - 只查不切的 list API Key(只想看 account 下有哪些 key,不想切换当前 key): 跑 ,不要跑
arkcli api apikey.list --params '{"PageSize":100}' --page-all --format json— 后者是交互式选择并写入凭证存储,会改变当前生效 keyauth apikey - 当前已选 key 的元信息(name / suffix / project / 状态): 看 输出里的
auth status字段,不需要再调远端ark_api_key
- is the default entry point; do not start with
auth status.login - After login succeeds, return to the user's original goal and continue executing it instead of stopping at the authentication result.
- is destructive and must be explicitly requested by the user.
auth logout - masks sensitive fields, so its output can be used directly for troubleshooting. It also displays the currently effective
auth status.project_name - After succeeds, it outputs
auth login. The credential storage location is an implementation detail and is no longer echoed.auth_method - Both SSO login through and
arkcli auth login volc-ssowrite the selected API Key to the credential store. In the final clean-slate model introduced in 0.1.16, arkcli has only one active identity at a time. If a new SSO identity is inconsistent with the oldarkcli auth apikey, all Profiles, including those from other tenants, are cleared and rebuilt.sub - API Keys must be understood as pools separated by Profile type: and
platformPersonal use ordinary API Keys;coding-planPersonal uses a dedicated Key withagent-plan;Scene=RealAgentPlanPersonalandagent-plan-teamuse the seat Key returned bycoding-plan-team. The presence of a Key in the ordinary pool does not prove that an Agent Plan or team Key is available.GetSeatInfo - When the ordinary pool is empty during TTY first login, the CLI first asks whether to create one. After confirmation, it calls exactly once and then reads the status at most three times. When a dedicated Agent Plan record exists but is not Active, it asks whether to rotate it. After confirmation, it also rotates the Key exactly once and reads the status at most three times. In non-TTY environments, when the user declines, or when no dedicated record exists, it must never write anything.
CreateApiKey - If API Key acquisition fails for the Profile type selected during TTY first login, such as when an Agent Plan Key remains after three checks following rotation, the CLI preserves the selected region and project, removes the failed type from the current round's candidates, and asks the user to select another usage scenario. The failed type is never silently backfilled again, preventing repeated acquisition or a second rotation. This is a Profile-level reselection and never uses an ordinary or Coding Plan Key as a substitute for a dedicated Agent Plan Key.
Restricted - v3 ve handoff branch (available since 1.0.4, only for interactive Volcengine SSO login): when a local volcengine-cli version of at least 1.0.45 is detected and the user has run ,
ve loginfirst attempts to borrow that login state and directly create an arkcli identity, saving one browser authorization. The persistence differences are documented inarkcli auth login:references/arkcli-auth-login.mdis not written because IDToken/refresh_token/ClientID are managed by the ve SDK, buttoken.jsonandsts.jsonare written.metadata.json.source="ve"reportsauth whoamiinstead ofauth_method="sts", which is a valid authenticated state. If detection fails or ve is not logged in, arkcli automatically falls back to its native SSO OAuth flow."sso" - only enumerates and selects a Key from the ordinary API Key pool and writes it to the identity/.env-compatible credential store. It does not read or repair Agent Plan dedicated Keys or team seat Keys. When the current Profile is a Plan Profile, prefer
arkcli auth apikeyor the corresponding Plan rotation or seat flow. Do not interpretprofile apikey refreshreturningauth apikeyas evidence that the Plan Key has been restored. It also does not enablesaved=true,+chat,+gen,+deploy,+code-example, orusagecapabilities for marketplace speech models.pricing - creates, validates, and saves one ordinary API Key to the current identity/.env-compatible credential store. TTY use requires confirmation. In a non-interactive environment,
arkcli auth apikey createmust follow the host confirmation flow defined by the shared Skill. The command sendsrequires_confirmationexactly once and then performs at most three read-only status checks. Successful output does not include the plaintext Key. It likewise cannot create or repair Agent Plan dedicated Keys or team seat Keys. To switch the default Key for an existing Profile, continue to useCreateApiKey.profile apikey refresh/use - For TTS on Volcengine Agent Plan Personal/Enterprise, use 's
arkcli-gen. Personal uses a dedicated Key, while Enterprise uses a seat Key; an ordinary Key from+gen --modality audiocannot be substituted. Native ASR also uses the already-bound Agent Plan Key and theauth apikeyentry point. For other unimplemented speech capabilities, only explain their boundaries.+understand asr/asr-align --audio-protocol ws-bidirectional|ws-unidirectional - Read-only API Key list (only wanting to see which Keys exist under the account without switching the current Key): run . Do not run
arkcli api apikey.list --params '{"PageSize":100}' --page-all --format json; the latter interactively selects a Key, writes it to the credential store, and changes the currently effective Key.auth apikey - Metadata for the currently selected Key (name / suffix / project / status): inspect the field in the
ark_api_keyoutput. There is no need to make another remote request.auth status
与其他 skill 的串联
Integration with Other Skills
查询 Key 列表、辨别掩码与明文、向下游注入凭证前,先读 API Key 查询与交付。保留“查元数据 → 定位真实 ID → 必要时授权导出”的业务流程;不要默认回显全部明文。
- 、
arkcli-models、arkcli-chat、arkcli-gen、arkcli-deploy被鉴权错误阻塞时,先回到这里arkcli-usage - 如果用户其实是在排查 profile / base-url / region 覆盖问题,应转
../arkcli-config/SKILL.md
Before querying the Key list, distinguishing masked values from plaintext, or injecting credentials into downstream systems, read API Key Query and Delivery. Preserve the workflow of querying metadata, locating the real ID, and authorizing an export when necessary. Do not echo all plaintext values by default.
- If ,
arkcli-models,arkcli-chat,arkcli-gen, orarkcli-deployis blocked by an authentication error, return here.arkcli-usage - If the user is actually troubleshooting a Profile, base-url, or region override issue, redirect them to .
../arkcli-config/SKILL.md
自然语言触发词 + 跨技能指引表
Natural-Language Trigger and Cross-Skill Guidance Table
| 用户怎么说 | 走哪个命令/skill |
|---|---|
| "我是谁/我的身份/当前用户/哪个账号/我自己的 IAM 用户 ID" | |
| "查同事 zhangsan 的 IAM 用户 ID/查别人的 IAM 用户 ID" | 转 |
| "API Key 泄露/废弃旧 Key/换新 Key/rotate/轮换 API Key" | 转 |
| "命令突然报 key 失效/401/InvalidApiKey 但我没换过 key"(疑似后端轮换) | 转 |
| "看账号有哪些 Key/Key 列表/只查不切" | |
| "看当前 Profile 的 Key 库存" | 转 |
| "切换默认 Key/用另一个 Key" | 转 |
| "创建一把普通 API Key" | |
| "AK/SK 登录/access key/secret key" | 告知通道暂关:当前版本 AK/SK 登录通道暂时关闭,请使用 SSO 登录,运行 |
| What the user says | Which command/skill to use |
|---|---|
| "Who am I / my identity / current user / which account / my own IAM user ID" | |
| "Find colleague zhangsan's IAM user ID / find another person's IAM user ID" | Transfer to |
| "API Key leaked / deprecate an old Key / replace it / rotate the API Key" | Transfer to |
| "The command suddenly reports that the Key is invalid / 401 / InvalidApiKey even though I never changed it" (suspected backend rotation) | Transfer to |
| "Show the account's Keys / list Keys / list only without switching" | |
| "Show the current Profile's Key inventory" | Transfer to |
| "Switch the default Key / use another Key" | Transfer to |
| "Create an ordinary API Key" | |
| "AK/SK login / access key / secret key" | Explain that the channel is temporarily disabled: the AK/SK login channel is temporarily closed in the current version. Use SSO login by running |
命令一览
Command Overview
| 命令 | 说明 |
|---|---|
| 查看当前认证状态(凭证健康度) |
| 查看当前认证身份(用户名 / IAM 用户 ID / 账号 ID 等),脚本与 Skill 用 |
| 交互式选择登录方式(火山 SSO 浏览器 / 火山 SSO 无浏览器) |
| 浏览器 SSO 登录 |
| 无浏览器 SSO(cross-device)。TTY:一条命令交互式粘贴;非 TTY(agent/沙箱):Phase 1,打印 URL + |
| 无浏览器 SSO Phase 2:把 base64 授权码喂回完成登录(agent/沙箱两段式的第二步) |
| | 选择普通 API Key 并写入对应 identity store;不代表 Agent Plan 专属/团队席位 Key 可用 |
| | 创建、验证并保存一把普通 API Key 到当前身份;不输出明文 Key,不处理 Plan 专属/席位 Key |
| | 删除本地凭证 |
arkcli auth apikeyarkcli auth apikey createarkcli auth logout| Command | Description |
|---|---|
| View the current authentication state and credential health |
| View the currently authenticated identity, such as the username, IAM user ID, or account ID; intended for scripts and Skills |
| Interactively select a login method: Volcengine SSO in a browser or Volcengine SSO without a browser |
| Browser-based SSO login |
| Browserless SSO for cross-device use. In a TTY, this is one interactive command for pasting the code. In a non-TTY environment such as an agent or sandbox, Phase 1 prints the URL and |
| Browserless SSO Phase 2: feed the base64 authorization code back to complete login. This is the second step of the two-stage agent/sandbox flow |
| | Select an ordinary API Key and write it to the corresponding identity store; this does not mean that an Agent Plan dedicated Key or team seat Key is available |
| | Create, validate, and save an ordinary API Key for the current identity without exposing the plaintext Key; does not handle Plan dedicated Keys or seat Keys |
| | Delete local credentials |
arkcli auth apikeyarkcli auth apikey createarkcli auth logout参考
References
references/arkcli-auth-login.mdreferences/arkcli-auth-status.mdreferences/arkcli-auth-whoami.md
references/arkcli-auth-login.mdreferences/arkcli-auth-status.mdreferences/arkcli-auth-whoami.md