aboutsummaryrefslogtreecommitdiffstats
path: root/cli/src/commands/init.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/src/commands/init.ts')
-rw-r--r--cli/src/commands/init.ts13
1 files changed, 11 insertions, 2 deletions
diff --git a/cli/src/commands/init.ts b/cli/src/commands/init.ts
index 64b85e0..4efc043 100644
--- a/cli/src/commands/init.ts
+++ b/cli/src/commands/init.ts
@@ -37,7 +37,7 @@ export async function init() {
return p.text({
message: "Enter finInst value",
initialValue: current,
- validate: v => v.trim() ? undefined : "Required"
+ validate: v => v?.trim() ? undefined : "Required"
}) as Promise<string>
},
redirectUri: () => {
@@ -63,7 +63,16 @@ export async function init() {
}),
}, { onCancel })
- const config: Config = { sb1, actual, mappings: existing.mappings ?? [] }
+ const anthropicApiKey = await p.password({
+ message: "Anthropic API key (optional, for AI features — leave blank to skip)",
+ })
+
+ const config: Config = {
+ sb1,
+ actual,
+ mappings: existing.mappings ?? [],
+ anthropicApiKey: (anthropicApiKey as string)?.trim() || existing.anthropicApiKey,
+ }
saveConfig(config)