Skip to content

Commit 2977ba8

Browse files
committed
fix(cli): correct environment variable names and optimize configuration prompts
1 parent c4a8b87 commit 2977ba8

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

src/client/acontext-cli/cmd/docker.go

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -296,25 +296,23 @@ func promptEnvConfig() (*docker.EnvConfig, error) {
296296
return nil, fmt.Errorf("failed to get LLM Base URL: %w", err)
297297
}
298298

299-
// Prompt for Root API Bearer Token (with default)
299+
// Prompt for Root API Bearer Token
300300
var rootAPIBearerToken string
301-
rootTokenPrompt := &survey.Input{
302-
Message: "4. Set up Root API Bearer Token:",
301+
if err := survey.AskOne(&survey.Input{
302+
Message: "4. Pass a string to build Acontext token (format: sk-ac-xxxx):",
303303
Default: "your-root-api-bearer-token",
304-
Help: "This token is used for root API access (e.g., for creating projects)",
305-
}
306-
if err := survey.AskOne(rootTokenPrompt, &rootAPIBearerToken); err != nil {
304+
Help: "'sk-ac-' prefix will be added automatically. Enter token part only (xxxx).",
305+
}, &rootAPIBearerToken); err != nil {
307306
return nil, fmt.Errorf("failed to get Root API Bearer Token: %w", err)
308307
}
309308

310309
// Prompt for Core Config YAML File (optional)
311310
var coreConfigYAMLFile string
312-
coreConfigPrompt := &survey.Input{
313-
Message: "5. Enter Core Config YAML File path (optional):",
311+
if err := survey.AskOne(&survey.Input{
312+
Message: "5. Configure Acontext by Passing an existing config.yaml (optional):",
314313
Default: "./config.yaml",
315-
Help: "Path to your core config.yaml file (e.g., ./config.yaml). Leave empty to use env vars only.",
316-
}
317-
if err := survey.AskOne(coreConfigPrompt, &coreConfigYAMLFile); err != nil {
314+
Help: "Path to config.yaml file. Leave empty to use env vars only.",
315+
}, &coreConfigYAMLFile); err != nil {
318316
return nil, fmt.Errorf("failed to get Core Config YAML File: %w", err)
319317
}
320318

src/client/acontext-cli/internal/docker/docker-compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ services:
157157
DATABASE_PASSWORD: ${DATABASE_PASSWORD:-helloworld}
158158
DATABASE_NAME: ${DATABASE_NAME:-acontext}
159159
DATABASE_EXPORT_PORT: ${DATABASE_EXPORT_PORT:-5432}
160-
REDIST_HOST: acontext-server-redis
160+
REDIS_HOST: acontext-server-redis
161161
REDIS_PASSWORD: ${REDIS_PASSWORD:-helloworld}
162162
REDIS_EXPORT_PORT: ${REDIS_EXPORT_PORT:-6379}
163163
RABBITMQ_HOST: ${RABBITMQ_HOST:-acontext-server-rabbitmq}

0 commit comments

Comments
 (0)