Decision: abx config init collects the template-deploy prerequisites
Status: implemented Implemented: 2026-09-30
Problem
abx install (and abx template deploy) stop with "Missing ACR namespace"
and "Alibaba Cloud AK/SK credentials not found" unless the user already
knows about --acr-namespace, ACR_NAMESPACE, and
ALICLOUD_ACCESS_KEY_ID / ALICLOUD_ACCESS_KEY_SECRET. abx config init
only asked for the sandbox API key, the region, and the LLM API key, so the
first time a user tried to install a template was also the first time they
heard about those prerequisites.
access_key_id / access_key_secret were already config keys. The ACR
namespace was not: it lived only as a flag, a process variable, or a raw
.env line.
Decision
acr_namespaceis a config key, stored in~/.abx/.envasACR_NAMESPACE.config get/config set/config listtreat it like the other env-stored keys. Resolution stays CLI flag, thenACR_NAMESPACEin the process environment, then./.env, then~/.abx/.env.- The guided wizard prompts for six items, each skippable with Enter: sandbox API key, region, LLM API key, ACR namespace, AccessKey ID, AccessKey Secret. The two API keys and the AccessKey secret stay masked.
--yesand non-TTY sessions printabx config setlines for the namespace and the AccessKey pair next to the existing ones.- The missing-prerequisite errors name
abx config initandabx config setfirst.
Not changed
- A flag or an exported variable still wins over the stored value.
- Pressing Enter still skips a prompt and does not overwrite a stored value with an empty string.
- CI guidance still says to pass
--acr-namespaceexplicitly when a build must not depend on the surrounding environment.
Test strategy
tests/test_cli/test_config_init.py: the wizard writesACR_NAMESPACE,ALICLOUD_ACCESS_KEY_ID, andALICLOUD_ACCESS_KEY_SECRET; empty answers create no.env; the three secrets go through the masked prompt;--yesprints the new commands.tests/test_cli/test_config_commands.py:config set acr_namespacewritesACR_NAMESPACEandconfig getreads it back.
Files changed
src/agent_sandbox/cli/commands/config_cmd.pysrc/agent_sandbox/cli/commands/template.py(error text)docs/{en,zh}/reference/cli-reference.md,configuration.mddocs/{en,zh}/guide/cli-tutorial.md,e2e-template-workflow.mdCHANGELOG.md