create-hedgeboard 1.1.3 → 1.3.0

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/index.js +34 -26
  2. package/package.json +5 -2
package/index.js CHANGED
@@ -51,7 +51,7 @@ function parseArgs() {
51
51
  npx create-hedgeboard --key YOUR_API_KEY --dir ./my-workspace
52
52
 
53
53
  Options:
54
- --key, -k Your HedgeBoard API key (required)
54
+ --key, -k Your HB SEC Filing Data API key (optional)
55
55
  --dir, -d Output directory (default: ./hedgeboard)
56
56
  --help, -h Show this help
57
57
  `);
@@ -60,12 +60,8 @@ function parseArgs() {
60
60
  }
61
61
 
62
62
  if (!opts.key) {
63
- console.error(
64
- "Error: --key is required.\n" +
65
- " Get your API key at https://www.hedgeboardhq.com/dashboard\n\n" +
66
- " Usage: npx create-hedgeboard --key YOUR_API_KEY"
67
- );
68
- process.exit(1);
63
+ // Key is optional — platform works without it
64
+ opts.key = "";
69
65
  }
70
66
 
71
67
  return opts;
@@ -156,15 +152,17 @@ async function main() {
156
152
 
157
153
  banner();
158
154
 
159
- // 1. Validate API key against the app
160
- process.stdout.write(` ${c.gray}◆${c.reset} Validating API key ${c.dim}...${c.reset} `);
161
- try {
162
- const resp = await fetchBuffer(`${APP_URL}/api/data-sources?key=${key}`);
163
- const data = JSON.parse(resp.toString());
164
- if (data.error) throw new Error(data.error);
165
- console.log(`${c.green}✓${c.reset}`);
166
- } catch (err) {
167
- console.log(`${c.green}✓${c.reset} ${c.dim}(offline)${c.reset}`);
155
+ // 1. Validate API key against the app (if provided)
156
+ if (key) {
157
+ process.stdout.write(` ${c.gray}◆${c.reset} Validating API key ${c.dim}...${c.reset} `);
158
+ try {
159
+ const resp = await fetchBuffer(`${APP_URL}/api/data-sources?key=${key}`);
160
+ const data = JSON.parse(resp.toString());
161
+ if (data.error) throw new Error(data.error);
162
+ console.log(`${c.green}✓${c.reset}`);
163
+ } catch (err) {
164
+ console.log(`${c.green}✓${c.reset} ${c.dim}(offline)${c.reset}`);
165
+ }
168
166
  }
169
167
 
170
168
  // 2. Download toolkit from S3
@@ -205,13 +203,20 @@ async function main() {
205
203
  process.exit(1);
206
204
  }
207
205
 
208
- // 4. Write .env with the user's API key
209
- process.stdout.write(` ${c.gray}◆${c.reset} Configuring API key ${c.dim}...${c.reset} `);
206
+ // 4. Write .env with the user's API key (if provided)
207
+ process.stdout.write(` ${c.gray}◆${c.reset} Configuring workspace ${c.dim}...${c.reset} `);
210
208
  const envPath = path.join(absDir, ".env");
211
- fs.writeFileSync(
212
- envPath,
213
- `# HedgeBoard API\nHEDGEBOARD_API_KEY=${key}\nHEDGEBOARD_API_URL=${API_URL}\n`
214
- );
209
+ if (key) {
210
+ fs.writeFileSync(
211
+ envPath,
212
+ `# HedgeBoard Data Sources\nHEDGEBOARD_API_KEY=${key}\nHEDGEBOARD_API_URL=${API_URL}\n`
213
+ );
214
+ } else {
215
+ fs.writeFileSync(
216
+ envPath,
217
+ `# HedgeBoard Data Sources\n# Add your HB SEC Filing Data key from: https://www.hedgeboardhq.com/dashboard\nHEDGEBOARD_API_KEY=\nHEDGEBOARD_API_URL=${API_URL}\n`
218
+ );
219
+ }
215
220
  console.log(`${c.green}✓${c.reset}`);
216
221
 
217
222
  // 5. Summary
@@ -222,15 +227,18 @@ async function main() {
222
227
  ${c.dim} ─────────────────────────────────────${c.reset}
223
228
 
224
229
  ${c.bold}Directory${c.reset} ${c.cyan}${relDir}/${c.reset}
225
- ${c.bold}API Key${c.reset} ${c.dim}${key.slice(0, 8)}${"•".repeat(12)}${key.slice(-4)}${c.reset}
230
+ ${key
231
+ ? `${c.bold}API Key${c.reset} ${c.dim}${key.slice(0, 8)}${"•".repeat(12)}${key.slice(-4)}${c.reset}`
232
+ : `${c.bold}API Key${c.reset} ${c.dim}not set — add from dashboard${c.reset}`
233
+ }
226
234
  ${c.bold}API URL${c.reset} ${c.dim}${API_URL}${c.reset}
227
235
 
228
236
  ${c.bold}What's inside:${c.reset}
229
237
  ${c.gray}├──${c.reset} ${c.white}INSTRUCTIONS.md${c.reset} ${c.dim}Agent instructions & prompt${c.reset}
230
- ${c.gray}├──${c.reset} ${c.white}data/${c.reset} ${c.dim}SEC data fetching modules${c.reset}
238
+ ${c.gray}├──${c.reset} ${c.white}data/${c.reset} ${c.dim}Data source adapters${c.reset}
231
239
  ${c.gray}├──${c.reset} ${c.white}viz/${c.reset} ${c.dim}Dashboard templates & charts${c.reset}
232
240
  ${c.gray}├──${c.reset} ${c.white}brand/${c.reset} ${c.dim}Your brand settings${c.reset}
233
- ${c.gray}├──${c.reset} ${c.white}modules/${c.reset} ${c.dim}Shared helpers${c.reset}
241
+ ${c.gray}├──${c.reset} ${c.white}modules/${c.reset} ${c.dim}356 analysis recipes + indexes${c.reset}
234
242
  ${c.gray}└──${c.reset} ${c.white}output/${c.reset} ${c.dim}Generated dashboards land here${c.reset}
235
243
 
236
244
  ${c.dim} ─────────────────────────────────────${c.reset}
@@ -243,7 +251,7 @@ ${c.dim} ───────────────────────
243
251
  ${c.cyan}2.${c.reset} Ask something:
244
252
  ${c.magenta}"Give me a company overview of Apple"${c.reset}
245
253
 
246
- ${c.cyan}3.${c.reset} Customize your brand at:
254
+ ${c.cyan}3.${c.reset} Connect data sources at:
247
255
  ${c.underline}https://www.hedgeboardhq.com/dashboard${c.reset}
248
256
  `);
249
257
  }
package/package.json CHANGED
@@ -1,15 +1,18 @@
1
1
  {
2
2
  "name": "create-hedgeboard",
3
- "version": "1.1.3",
3
+ "version": "1.3.0",
4
4
  "description": "Set up a HedgeBoard financial intelligence workspace",
5
5
  "bin": {
6
- "create-hedgeboard": "./index.js"
6
+ "create-hedgeboard": "index.js"
7
7
  },
8
8
  "keywords": [
9
9
  "hedgeboard",
10
10
  "finance",
11
11
  "ai",
12
+ "ai-agent",
12
13
  "claude",
14
+ "codex",
15
+ "openai",
13
16
  "sec",
14
17
  "edgar"
15
18
  ],