ray-finance 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/cli/setup.js +18 -6
  2. package/package.json +1 -1
package/dist/cli/setup.js CHANGED
@@ -6,11 +6,17 @@ import { heading, dim } from "./format.js";
6
6
  function stepHeader(current, total) {
7
7
  return chalk.dim(`Step ${current}/${total}`);
8
8
  }
9
+ const theme = {
10
+ style: {
11
+ answer: (text) => chalk.yellowBright(text),
12
+ highlight: (text) => chalk.yellowBright(text),
13
+ },
14
+ };
9
15
  export async function runSetup() {
10
16
  const inquirer = (await import("inquirer")).default;
11
17
  console.log(`\n${heading("Ray Finance Setup")}\n`);
12
18
  if (isConfigured()) {
13
- const { proceed } = await inquirer.prompt([{
19
+ const { proceed } = await inquirer.prompt([{ theme,
14
20
  type: "confirm",
15
21
  name: "proceed",
16
22
  message: "Ray is already configured. Reconfigure?",
@@ -19,7 +25,7 @@ export async function runSetup() {
19
25
  if (!proceed)
20
26
  return;
21
27
  }
22
- const { setupMode } = await inquirer.prompt([{
28
+ const { setupMode } = await inquirer.prompt([{ theme,
23
29
  type: "list",
24
30
  name: "setupMode",
25
31
  message: "How would you like to set up Ray?",
@@ -31,14 +37,14 @@ export async function runSetup() {
31
37
  let canLink = false;
32
38
  if (setupMode === "managed") {
33
39
  console.log(stepHeader(1, 3));
34
- const { userName } = await inquirer.prompt([{
40
+ const { userName } = await inquirer.prompt([{ theme,
35
41
  type: "input",
36
42
  name: "userName",
37
43
  message: "Your name:",
38
44
  default: config.userName !== "User" ? config.userName : undefined,
39
45
  }]);
40
46
  console.log(stepHeader(2, 3));
41
- const { hasKey } = await inquirer.prompt([{
47
+ const { hasKey } = await inquirer.prompt([{ theme,
42
48
  type: "list",
43
49
  name: "hasKey",
44
50
  message: "Do you have a Ray API key?",
@@ -71,7 +77,7 @@ export async function runSetup() {
71
77
  }
72
78
  console.log(dim(" Complete checkout, then paste your key below.\n"));
73
79
  }
74
- const { rayApiKey } = await inquirer.prompt([{
80
+ const { rayApiKey } = await inquirer.prompt([{ theme,
75
81
  type: "password",
76
82
  name: "rayApiKey",
77
83
  message: "Ray API key:",
@@ -96,12 +102,14 @@ export async function runSetup() {
96
102
  console.log(stepHeader(1, 4));
97
103
  const answers = await inquirer.prompt([
98
104
  {
105
+ theme,
99
106
  type: "input",
100
107
  name: "userName",
101
108
  message: "Your name:",
102
109
  default: config.userName !== "User" ? config.userName : undefined,
103
110
  },
104
111
  {
112
+ theme,
105
113
  type: "password",
106
114
  name: "anthropicKey",
107
115
  message: "Anthropic API key:",
@@ -109,6 +117,7 @@ export async function runSetup() {
109
117
  validate: (v) => v.length > 0 || "Required",
110
118
  },
111
119
  {
120
+ theme,
112
121
  type: "list",
113
122
  name: "model",
114
123
  message: "AI model:",
@@ -120,18 +129,21 @@ export async function runSetup() {
120
129
  default: config.model,
121
130
  },
122
131
  {
132
+ theme,
123
133
  type: "password",
124
134
  name: "plaidClientId",
125
135
  message: "Plaid production client ID (enter to skip):",
126
136
  default: config.plaidClientId || undefined,
127
137
  },
128
138
  {
139
+ theme,
129
140
  type: "password",
130
141
  name: "plaidSecret",
131
142
  message: "Plaid production secret (enter to skip):",
132
143
  default: config.plaidSecret || undefined,
133
144
  },
134
145
  {
146
+ theme,
135
147
  type: "password",
136
148
  name: "dbEncryptionKey",
137
149
  message: "Database encryption key (enter to skip):",
@@ -168,7 +180,7 @@ export async function runSetup() {
168
180
  // Ask to link first account
169
181
  if (canLink) {
170
182
  console.log(stepHeader(setupMode === "managed" ? 3 : 4, setupMode === "managed" ? 3 : 4));
171
- const { wantLink } = await inquirer.prompt([{
183
+ const { wantLink } = await inquirer.prompt([{ theme,
172
184
  type: "confirm",
173
185
  name: "wantLink",
174
186
  message: "Link your first bank account now?",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ray-finance",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Local-first CLI that turns your bank data into a personal AI financial advisor",
5
5
  "type": "module",
6
6
  "license": "MIT",