diff options
| author | ivar <i@oiee.no> | 2026-03-15 22:53:10 +0100 |
|---|---|---|
| committer | ivar <i@oiee.no> | 2026-03-15 22:53:10 +0100 |
| commit | 1aa60ed7f0b0af6c55df4a32bf2620934df63e6d (patch) | |
| tree | deacb84cd3770ce139ecbc693bf2b987954c2347 /cli/src/commands/init.ts | |
| parent | 69448e29a85cad3a94b3be3ad33efbc52764528f (diff) | |
| download | sparebank1-actualbudget-1aa60ed7f0b0af6c55df4a32bf2620934df63e6d.tar.xz sparebank1-actualbudget-1aa60ed7f0b0af6c55df4a32bf2620934df63e6d.zip | |
Diffstat (limited to 'cli/src/commands/init.ts')
| -rw-r--r-- | cli/src/commands/init.ts | 13 |
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) |
