arkcli-config
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesearkcli config
arkcli config
⚠️ 0.1.16 起命令树迁移: 已标记 deprecated,请改用 (行为一致 + 新增 profile 切面字段 type/project/owner_trn/available_api_keys)。 保留(清整个本地状态,超出单 profile)。0.2.x 删除全部已 deprecated 子命令。
arkcli config init/list/show/switch/deletearkcli profile create/list/show/use/deletearkcli config resetCRITICAL — 开始前 MUST 先用 Read 工具读取 ,其中包含认证闸门、命令选择顺序与共享安全规则
CRITICAL — 配置类写操作前必须确认用户意图。 可能同步远端 Key 并回写本地库存或默认 Key,不能当作无配置副作用的准入探测。
../arkcli-shared/SKILL.mdprofile show/list/keys list⚠️ Command tree migration since 0.1.16: have been deprecated; use instead (same behavior + new profile dimension fields type/project/owner_trn/available_api_keys). is retained (clears the entire local state, extending beyond a single profile). All deprecated subcommands will be removed in 0.2.x.
arkcli config init/list/show/switch/deletearkcli profile create/list/show/use/deletearkcli config resetCRITICAL — Before starting, you MUST first use the Read tool to read , which contains the authentication gate, command selection order, and shared security rules
CRITICAL — User intent must be confirmed before configuration write operations. may synchronize remote Keys and write back to the local inventory or default Key, so they must not be treated as side-effect-free admission probes.
../arkcli-shared/SKILL.mdprofile show/list/keys list唤起信号(When To Trigger)
Trigger Signals (When To Trigger)
- 用户提到:、
profile、base-url覆盖混乱,或仍在使用已删除的全局api-key--region/--project-name - 用户现象:同一条业务命令“打到了错误环境/错误 base URL/错误账号”,怀疑是配置来源不一致
- 用户目标:初始化/更新 profile、切换默认 profile、重置本地配置文件
- 用户目标:启用、关闭或恢复 arkcli 的自动更新/更新提示策略
- The user mentions ,
profile,base-urloverride confusion, or is still using the removed globalapi-key--region/--project-name - The same business command “hits the wrong environment/wrong base URL/wrong account,” suggesting inconsistent configuration sources
- The user wants to initialize/update a profile, switch the default profile, or reset the local configuration file
- The user wants to enable, disable, or restore arkcli's automatic update/update prompt policy
反唤起信号(When NOT To Trigger)
Non-Trigger Signals (When NOT To Trigger)
- 用户要解决的是“未登录/401/鉴权失败/没有权限”:先走 ,必要时转
arkcli auth status../arkcli-auth/SKILL.md - 用户目标是业务功能(models/+chat/+gen/+deploy/usage 等):不要停留在 config,排除配置后回到原任务
- The user's issue is “not logged in/401/authentication failure/no permission”: first use , and if necessary, refer to
arkcli auth status../arkcli-auth/SKILL.md - The user's goal is a business feature (models/+chat/+gen/+deploy/usage, etc.): do not remain in config; after ruling out configuration issues, return to the original task
适用场景
Applicable Scenarios
- 初始化或更新 profile
- 查看当前解析后的配置
- 切换默认 profile
- 删除单个 profile 或重置整个本地配置
- 排查为什么业务命令连到了错误环境、错误账号或错误 base URL
- Initialize or update a profile
- View the currently resolved configuration
- Switch the default profile
- Delete a single profile or reset the entire local configuration
- Troubleshoot why business commands connect to the wrong environment, account, or base URL
Agent 快速执行顺序
Agent Quick Execution Order
- 先遵守 shared 的认证及宿主边界。普通 CLI 的当前身份/Profile 诊断用 、
arkcli auth status --format json;宿主禁止额外认证探测时,使用宿主已给的上下文,不自行探测。arkcli auth whoami --format json - Chat/Gen 的默认模型和路由用 ,按 Resources Skill 区分发现、兼容性和真实调用验证。仅查看默认模型不等于授权发送收费请求。
arkcli resources list --modality <text|image|video> --format json - 切换默认 profile:
arkcli profile use <name> - 创建 profile:(详见 arkcli-profile 子树,本 skill 不重复)
arkcli profile create --type=... - 是破坏性操作(清整个本地配置文件),必须确认用户意图
arkcli config reset - 更新策略只使用 allowlist 命令:
arkcli config set update.mode automatic|disabled - 用户明确需要 Profile 详情、清单或 Key 管理时才考虑 /
arkcli profile show;执行前说明可能同步并回写 Key。用户要求“不改配置/Key”时不执行它们,也不改用旧arkcli profile list绕过限制。config show/list
- First comply with the shared authentication and host-boundary rules. For current identity/Profile diagnostics with the regular CLI, use and
arkcli auth status --format json. When the host prohibits additional authentication probes, use the context already provided by the host and do not probe independently.arkcli auth whoami --format json - For default models and routing in Chat/Gen, use , distinguishing discovery, compatibility, and actual invocation validation according to the Resources Skill. Merely viewing default models does not authorize sending a billable request.
arkcli resources list --modality <text|image|video> --format json - Switch the default profile:
arkcli profile use <name> - Create a profile: (see the arkcli-profile subtree for details; this skill does not repeat them)
arkcli profile create --type=... - is destructive (it clears the entire local configuration file), so user intent must be confirmed
arkcli config reset - For update policy, use only the allowlisted command:
arkcli config set update.mode automatic|disabled - Only consider /
arkcli profile showwhen the user explicitly needs Profile details, a list, or Key management. Before execution, explain that Keys may be synchronized and written back. If the user requests “no configuration/Key changes,” do not execute these commands, and do not use the oldarkcli profile listcommands to circumvent the restriction.config show/list
配置归因(优先级)
Configuration Attribution (Priority)
arkcli- Profile 选择: flag >
--profile环境变量 >ARK_PROFILE的config.yaml> 第一个default_profile的 profile >type=platformsentinel"default" - API Key: >
--api-key> profile > 同 identity store > 产品ARK_API_KEY兼容值.env - Base URL: >
--base-url> profile 自定义值 > 按 Profile 的 Region/Type 派生 > 默认值ARK_BASE_URL - Region/Project: 由所选 Profile 持有;/
ARK_REGION不再覆盖运行时ARK_PROJECT_NAME
--api-key/--base-url排障时要明确”是谁覆盖了谁”,不要直接猜测。
0.1.16 修正:现在优先于--profile(对齐 CLI 行业惯例 flag > env > config)。0.1.15 及更早版本是 env > flag,与本规则相反。ARK_PROFILE
arkcli- Profile selection: flag >
--profileenvironment variable >ARK_PROFILEindefault_profile> the first profile withconfig.yaml> thetype=platformsentinel"default" - API Key: >
--api-key> profile > the same identity store > product-specificARK_API_KEYcompatibility value.env - Base URL: >
--base-url> custom profile value > value derived from the Profile's Region/Type > default valueARK_BASE_URL - Region/Project: held by the selected Profile; /
ARK_REGIONno longer override runtime behaviorARK_PROJECT_NAME
The flags are only for data-plane commands. When no Profile exists, they must be provided together; when overriding Base URL, an API Key must also be explicitly provided. Control-plane/local commands fail fast if they explicitly receive either flag.
--api-key/--base-urlWhen troubleshooting, clearly explain “who overrode whom”; do not guess.
0.1.16 correction:now takes precedence over--profile, aligning with the CLI industry convention of flag > env > config. In 0.1.15 and earlier versions, env took precedence over flag, which is the opposite of this rule.ARK_PROFILE
证据与结论
Evidence and Conclusions
说明本轮实际检查了什么、哪些来源覆盖仍未验证,不要求复述固定评测词句。 的 Profile 字段是持久切面摘要,不能据此声称临时 API Key/Base URL override 已验证或数据面调用一定成功。缺少证据时明确保留未知,不为补字段执行可能回写配置的命令。路径展示使用 ,不读取凭证文件。
auth whoami$HOME/...Explain what was actually checked in the current round and which override sources remain unverified; there is no need to repeat fixed evaluation wording. The Profile field in is a persistent profile-dimension summary and cannot be used to claim that temporary API Key/Base URL overrides have been verified or that a data-plane invocation will necessarily succeed. When evidence is missing, explicitly retain the unknown status and do not run commands that may write back configuration merely to fill in fields. Display paths as and do not read credential files.
auth whoami$HOME/...核心规则
Core Rules
- 本 skill 负责解释“为什么命令打到了错误环境/错误账号/错误 base URL”,并兼容历史 命令排障语义
config init/list/show/switch/delete - 常规准入沿 →
auth status/whoami,不把 Profile 管理命令当无副作用查询resources - profile 写操作(create / use / set-default / delete)走 子树
arkcli profile - 负责全量清理;
arkcli config reset只写更新策略。不要用它写任意 YAML 路径。arkcli config set update.mode <mode>
- This skill explains “why a command hit the wrong environment/wrong account/wrong base URL” and maintains compatibility with the troubleshooting semantics of the historical commands
config init/list/show/switch/delete - The standard admission path is →
auth status/whoami; do not treat Profile management commands as side-effect-free queriesresources - Profile write operations (create / use / set-default / delete) go through the subtree
arkcli profile - is responsible for full cleanup;
arkcli config resetonly writes the update policy. Do not use it to write arbitrary YAML paths.arkcli config set update.mode <mode>
Guard Checklist(必做)
Guard Checklist (Required)
- 只读意图:不执行可能回写 Key 的 ;脱敏不等于无副作用,命令名为 show/list 也不等于只读
profile show/list/keys list - 写操作确认:与
profile use/delete执行前必须复述影响范围并征得确认config reset - 全量清理提醒:删除
arkcli config reset,不会清理config.yaml/config.json(token)或 identity store;要清理凭证请用$HOME/.arkcli/.envarkcli auth logout
- Read-only intent: do not execute if they may write back Keys; redaction does not mean the absence of side effects, and command names such as show/list do not imply read-only operations
profile show/list/keys list - Write-operation confirmation: before executing or
profile use/delete, restate the scope of impact and obtain confirmationconfig reset - Full-cleanup warning: deletes
arkcli config reset, but does not clearconfig.yaml/config.json(token) or the identity store; use$HOME/.arkcli/.envto clear credentialsarkcli auth logout
与其他 skill 的串联
Connections to Other Skills
- profile 创建 / 切换 / 资源 default 设置 / API Key 管理 → 转 (推荐)或继续看本 skill 的兼容映射
arkcli-profile - 业务命令失败且怀疑是 、
--profile、API Key 来源或 Profile 的 Region/Project 不一致时,先转到这里--base-url - 配置问题排除后,再回到原始业务 skill 继续
- 配置仍无法解释问题时,再考虑转 或
../arkcli-auth/SKILL.md../arkcli-api-explorer/SKILL.md
- Profile creation/switching/resource default settings/API Key management → refer to (recommended), or continue with this skill's compatibility mapping
arkcli-profile - When a business command fails and ,
--profile, API Key source, or the Profile's Region/Project is suspected to be inconsistent, start here--base-url - After ruling out configuration issues, return to the original business skill
- If the configuration still cannot explain the problem, then consider referring to or
../arkcli-auth/SKILL.md../arkcli-api-explorer/SKILL.md
命令一览
Command Overview
| 命令 | 说明 | 状态 |
|---|---|---|
| 删除整个本地配置文件(保留) | ✅ 活跃 |
| 显式为当前 exact install 启用 automatic;从非 latest 版本恢复时先安装 latest 再执行 | ✅ 活跃 |
| 关闭静默自动安装,保留隐式版本检查、更新提示和手工 update | ✅ 活跃 |
| 查看 Profile;可能同步并回写 Key | ✅ Profile 管理,替代 |
| 列出 Profile;可能同步并回写各 Profile 的 Key | ✅ Profile 管理,替代 |
| 切换默认 profile | ✅ 替代 |
| 删除单个 profile | ✅ 替代 |
| 创建 profile(替代旧 | ✅ 替代 |
| 旧子命令,0.2.x 移除 | ⚠️ deprecated |
公开模式只有 和 。 保留隐式版本检查和更新提示,但绝不静默安装;显式 和 也始终可用。缺失 和历史配置中的 对外都按 处理,历史配置中的 继续按 兼容读取,但不得再建议用户设置 。
automaticdisableddisabledarkcli updatearkcli update --checkupdate.modenotifydisablednotifydisablednotifyWindows、macOS、Linux 的 fail-closed transaction 与六个产品/平台生产 gate 均已开启。stable 全局 npm postinstall 会将安装后版本与 registry 当前 比较:非 latest 持久化 ;当前 latest 不改 mode,已有 时为新 exact install 换发授权。postinstall 不立即执行版本替换。
latestdisabledautomatic| Command | Description | Status |
|---|---|---|
| Deletes the entire local configuration file (command retained) | ✅ Active |
| Explicitly enables automatic for the current exact install; when restoring from a non-latest version, install latest first | ✅ Active |
| Disables silent automatic installation while retaining implicit version checks, update prompts, and manual update | ✅ Active |
| View a Profile; may synchronize and write back Keys | ✅ Profile management, replaces |
| List Profiles; may synchronize and write back Keys for each Profile | ✅ Profile management, replaces |
| Switch the default Profile | ✅ Replaces |
| Delete a single Profile | ✅ Replaces |
| Create a Profile | ✅ Replaces |
| Legacy subcommands, removed in 0.2.x | ⚠️ Deprecated |
The only public modes are and . retains implicit version checks and update prompts, but never performs silent installation; explicit and are always available. Both a missing and the historical setting behave externally as . The historical setting in legacy configurations continues to be read compatibly as , but users must no longer be advised to set .
automaticdisableddisabledarkcli updatearkcli update --checkupdate.modenotifydisablednotifydisablednotifyThe fail-closed transaction and all six product/platform production gates for Windows, macOS, and Linux are enabled. The stable global npm postinstall compares the installed version with the registry's current : a non-latest version persistently uses ; the current latest does not change the mode, and when already exists, fresh authorization is issued for the new exact install. The postinstall does not immediately perform a version replacement.
latestdisabledautomatic新安装 enrollment
New Installation Enrollment
只有能证明“此前没有产品状态目录”且安装版本等于 registry 的 stable 全局 npm 新安装,才默认写入 并创建绑定当前 exact install 的惰性 pending evidence:
latestautomatic- 第一次成功的、符合安全条件的人工业务命令在一个策略事务中完成 pending → grace → active。
- 重新检查确认 exact-install consent 已 active 后,该 invocation 即可调度 automatic patch 更新。
由 npm 启动的全部 CLI 进程(包括其中的 )以及用户手工执行的 都不消耗 enrollment、不做隐式版本检查,也不调度 automatic。AI Skill、CI、非 TTY、Client Preview、、 和内部维护命令同样不消耗 enrollment,也不调度 automatic。更新成功后,下一次成功的人工业务命令只在 stderr 显示一次 结果,不修改 stdout 或业务退出码。
postinstall+connect+connectconfigupdate旧版本 -> 新版本当前生产 automatic 按明确产品策略关闭 24/48/72 小时与 10%/50%/100% cohort admission;原 rollout 实现与回归测试仍保留,在线 Probe 仍要求两次独立观测。普通 automatic 仍须满足 exact consent、实时 registry target/SRI/tarball 校验、reservation、退避和全部 staged-apply 安全边界。
每次 npm 重装都不得沿用旧 exact-install receipt。若安装版本等于当前 ,不改既有 mode: 换发新 receipt, / 历史 仍保持关闭。若安装版本不等于 ,持久化 。registry 失败时不改 mode、不发新 receipt; 也不会完成对齐。从非 latest 版本恢复时,先安装 latest,再明确执行 。长期锁定版本使用:
latestautomaticdisablednotifylatestdisabled--ignore-scriptsarkcli config set update.mode automaticbash
arkcli config set update.mode disabled
npm i @volcengine/ark-cli@<exact-version> -g --registry https://registry.npmjs.org为避免 registry 不可用时的不确定,需要确定锁版时仍建议先执行 再安装精确版本。 位于 ,安装 也不会自动改回 。 会尽力撤销 exact consent 后再清配置。npm 解析 与 postinstall 查询之间恰好发新版时,存在极小概率误判为非 latest 的竞态。
arkcli config set update.mode disableddisabled$HOME/.arkcli/config.yaml@latestautomaticarkcli config reset@latestOnly a stable global npm new installation for which it can be proven that no product state directory existed previously and that the installed version equals the registry's defaults to writing and creating lazy pending evidence bound to the current exact install:
latestautomatic- The first successful manual business command that satisfies the safety conditions completes pending → grace → active in a single policy transaction.
- After a recheck confirms that exact-install consent has become active, that invocation can schedule an automatic patch update.
All CLI processes launched by npm postinstall (including +connect) and manually executed +connect commands neither consume enrollment, perform implicit version checks, nor schedule automatic updates. AI Skill, CI, non-TTY, Client Preview, config, update, and internal maintenance commands likewise neither consume enrollment, perform implicit version checks, nor schedule automatic updates. After a successful update, the next successful manual business command displays the old version -> new version result once on stderr, without modifying stdout or the business exit code.
Current production automatic explicitly disables 24/48/72-hour and 10%/50%/100% cohort admission under the defined product policy. The original rollout implementation and regression tests are retained, and the online Probe still requires two independent observations. Ordinary automatic operation must still satisfy exact-install consent, real-time registry target/SRI/tarball verification, reservation, backoff, and all staged-apply safety boundaries.
Every npm reinstallation must not carry over an old exact-install receipt. If the installed version equals the current , the existing mode is not changed: the mode receives a newly issued receipt, while / the historical mode remains off. If the installed version does not equal , is persisted. A registry failure does not change the mode or issue a new receipt, and does not complete the alignment. To restore from a non-latest version, first install latest and then explicitly execute . For long-term version locking, use:
latestautomaticdisablednotifylatestdisabled--ignore-scriptsarkcli config set update.mode automaticbash
arkcli config set update.mode disabled
npm i @volcengine/ark-cli@<exact-version> -g --registry https://registry.npmjs.orgTo avoid uncertainty when the registry is unavailable, version locking still requires first executing and then installing the exact version. is stored in , and installing does not automatically change it back to . attempts to revoke exact consent before clearing the configuration. There is an extremely small race condition in which a new version is released exactly between npm resolving and the postinstall query, potentially causing a non-latest misclassification.
arkcli config set update.mode disableddisabled$HOME/.arkcli/config.yaml@latestautomaticarkcli config reset@latest参考
References
references/arkcli-config-init.mdreferences/arkcli-config-profile.mdreferences/evals.md
references/arkcli-config-init.mdreferences/arkcli-config-profile.mdreferences/evals.md