arkcli config
⚠️ Command tree migration since 0.1.16:
arkcli config init/list/show/switch/delete
have been deprecated; use
arkcli profile create/list/show/use/delete
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.
CRITICAL — Before starting, you MUST first use the Read tool to read ../arkcli-shared/SKILL.md
, which contains the authentication gate, command selection order, and shared security rules
CRITICAL — User intent must be confirmed before configuration write operations. profile show/list/keys list
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.
Trigger Signals (When To Trigger)
- The user mentions , , override confusion, or is still using the removed global
- 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
Non-Trigger Signals (When NOT To Trigger)
- The user's issue is “not logged in/401/authentication failure/no permission”: first use , and if necessary, refer to
- 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
- 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 Quick Execution Order
- First comply with the shared authentication and host-boundary rules. For current identity/Profile diagnostics with the regular CLI, use
arkcli auth status --format json
and arkcli auth whoami --format json
. When the host prohibits additional authentication probes, use the context already provided by the host and do not probe independently.
- For default models and routing in Chat/Gen, use
arkcli resources list --modality <text|image|video> --format json
, distinguishing discovery, compatibility, and actual invocation validation according to the Resources Skill. Merely viewing default models does not authorize sending a billable request.
- Switch the default profile:
arkcli profile use <name>
- Create a profile:
arkcli profile create --type=...
(see the arkcli-profile subtree for details; this skill does not repeat them)
- is destructive (it clears the entire local configuration file), so user intent must be confirmed
- For update policy, use only the allowlisted command:
arkcli config set update.mode automatic|disabled
- Only consider / when 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 old commands to circumvent the restriction.
Configuration Attribution (Priority)
resolution precedence, from highest to lowest:
- Profile selection: flag > environment variable > in > the first profile with > the sentinel
- API Key: > > profile > the same identity store > product-specific compatibility value
- Base URL: > > custom profile value > value derived from the Profile's Region/Type > default value
- Region/Project: held by the selected Profile; / no longer override runtime behavior
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.
When troubleshooting, clearly explain “who overrode whom”; do not guess.
0.1.16 correction:
now takes precedence over
, 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.
Evidence and Conclusions
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.
Core Rules
- 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
config init/list/show/switch/delete
commands
- The standard admission path is → ; do not treat Profile management commands as side-effect-free queries
- Profile write operations (create / use / set-default / delete) go through the subtree
- is responsible for full cleanup;
arkcli config set update.mode <mode>
only writes the update policy. Do not use it to write arbitrary YAML paths.
Guard Checklist (Required)
- Read-only intent: do not execute
profile show/list/keys list
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
- Write-operation confirmation: before executing or , restate the scope of impact and obtain confirmation
- Full-cleanup warning: deletes , but does not clear (token) or the identity store; use to clear credentials
Connections to Other Skills
- Profile creation/switching/resource default settings/API Key management → refer to (recommended), or continue with this skill's compatibility mapping
- When a business command fails and , , API Key source, or the Profile's Region/Project is suspected to be inconsistent, start here
- 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-api-explorer/SKILL.md
Command Overview
| Command | Description | Status |
|---|
| Deletes the entire local configuration file (command retained) | ✅ Active |
arkcli config set update.mode automatic
| Explicitly enables automatic for the current exact install; when restoring from a non-latest version, install latest first | ✅ Active |
arkcli config set update.mode disabled
| Disables silent automatic installation while retaining implicit version checks, update prompts, and manual update | ✅ Active |
arkcli profile show [--profile <name>]
| 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 |
arkcli profile use <name>
| Switch the default Profile | ✅ Replaces |
arkcli profile delete <name>
| Delete a single Profile | ✅ Replaces |
arkcli profile create --type=...
| Create a Profile | ✅ Replaces |
arkcli config init/list/show/switch/delete
| 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
.
The 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.
New Installation Enrollment
Only 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:
- 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
arkcli config set update.mode automatic
. For long-term version locking, use:
bash
arkcli config set update.mode disabled
npm i @volcengine/ark-cli@<exact-version> -g --registry https://registry.npmjs.org
To avoid uncertainty when the registry is unavailable, version locking still requires first executing
arkcli config set update.mode disabled
and then installing the exact version.
is stored in
$HOME/.arkcli/config.yaml
, 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.
References
references/arkcli-config-init.md
references/arkcli-config-profile.md