ft-scout 1.0.8 → 2.0.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.
- package/.ft/context.json +11 -12
- package/README.md +2 -2
- package/bin/src/commands/init.d.ts.map +1 -1
- package/bin/src/commands/init.js +48 -13
- package/bin/src/commands/init.js.map +1 -1
- package/bin/src/engine/llm.d.ts.map +1 -1
- package/bin/src/engine/llm.js +60 -12
- package/bin/src/engine/llm.js.map +1 -1
- package/bin/src/index.js +6 -13
- package/bin/src/index.js.map +1 -1
- package/email-template.txt +4 -5
- package/package.json +1 -1
- package/bin/src/commands/brief.d.ts.map +0 -1
- package/bin/src/commands/brief.js +0 -28
- package/bin/src/commands/brief.js.map +0 -1
- package/email-template.html +0 -223
- package/scripts/send-brevo-campaign.cjs +0 -167
- package/scripts/send-email.js +0 -77
package/.ft/context.json
CHANGED
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
{
|
|
2
|
-
"projectName": "
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"entryPoint": "lib/main.dart",
|
|
2
|
+
"projectName": "FT-CLI",
|
|
3
|
+
"targetDir": "C:\\Users\\rishi\\FT-CLI",
|
|
4
|
+
"stack": "The FT-CLI project solves the core problem of streamlining onboarding for new codebases by providing an AI-powered co-pilot, leveraging a technical stack comprising Node.js, TypeScript, and OpenAI, with a unique value proposition in its ability to integrate with Git and utilize large language models for code analysis. The underlying architecture is designed as a modular, command-line interface (CLI) application, with a focus on extensibility and scalability. This modular design enables developers to easily extend the functionality of the co-pilot, while the use of OpenAI's API for natural language processing and code generation provides a powerful foundation for code analysis and suggestion. By leveraging these technologies, FT-CLI has created a moat in the form of a highly extensible and scalable architecture that can adapt to the evolving needs of software development teams.",
|
|
5
|
+
"entryPoint": "bin/ft.js",
|
|
7
6
|
"painPoints": [
|
|
8
|
-
"
|
|
9
|
-
"
|
|
7
|
+
"⚡ [Subsystem Risk]: The project's reliance on the OpenAI API for natural language processing and code generation introduces potential architectural debt, as changes to the API or limitations in its functionality could impact the overall performance and scalability of the FT-CLI application.",
|
|
8
|
+
"⚡ [Scaling Bottleneck]: The use of a command-line interface and Git integration for version control may introduce operational risks, such as managing state and ensuring data consistency across multiple repositories and users, which engineers must carefully consider when designing the application's workflow.",
|
|
9
|
+
"⚡ [Execution Note]: A key architectural constraint for developer onboarding is the requirement for Node.js version 18.0.0 or higher, which may impact the compatibility and adoption of the FT-CLI application across different development environments and teams."
|
|
10
10
|
],
|
|
11
11
|
"readOrder": [
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"firebase.json"
|
|
12
|
+
"package.json -> This file is foundational to the architecture as it defines the project's dependencies, scripts, and configuration, providing a clear understanding of the project's structure and requirements.",
|
|
13
|
+
"src/email-template.txt -> Reading this file next provides technical justification for understanding the templating engine used for generating emails, and how it integrates with the overall onboarding workflow.",
|
|
14
|
+
"bin/ft.js -> This crucial module details the core business logic and pipeline routing for the FT-CLI application, including how it interfaces with the OpenAI API and Git for code analysis and suggestion."
|
|
16
15
|
],
|
|
17
|
-
"createdAt": "2026-07-
|
|
16
|
+
"createdAt": "2026-07-31T14:25:00.277Z"
|
|
18
17
|
}
|
package/README.md
CHANGED
|
@@ -18,8 +18,8 @@ Once installed, you can use the `ft` or `ft-scout` commands.
|
|
|
18
18
|
# Initialize learning on a local repository
|
|
19
19
|
ft init [repoUrl]
|
|
20
20
|
|
|
21
|
-
#
|
|
22
|
-
ft
|
|
21
|
+
# Interactive Q&A mode after indexing
|
|
22
|
+
ft init --ask
|
|
23
23
|
|
|
24
24
|
# Show knowledge holders of a specific directory or file
|
|
25
25
|
ft owners <path>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["init.ts"],"names":[],"mappings":"AAsFA,wBAAsB,UAAU,CAAC,OAAO,CAAC,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["init.ts"],"names":[],"mappings":"AAsFA,wBAAsB,UAAU,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;IAAE,GAAG,CAAC,EAAE,OAAO,CAAA;CAAE,iBAmP7E"}
|
package/bin/src/commands/init.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
2
|
import path from 'path';
|
|
3
3
|
import os from 'os';
|
|
4
|
-
import { spinner, note, password, isCancel } from '@clack/prompts';
|
|
4
|
+
import { spinner, note, password, isCancel, text } from '@clack/prompts';
|
|
5
5
|
import chalk from 'chalk';
|
|
6
6
|
import { simpleGit } from 'simple-git';
|
|
7
|
-
import { generateRepoSummary } from '../engine/llm.js';
|
|
7
|
+
import { generateRepoSummary, askRepoQuestion } from '../engine/llm.js';
|
|
8
8
|
import { saveContext } from '../utils/config.js';
|
|
9
9
|
function extractNpmPackageName(target) {
|
|
10
10
|
if (target.startsWith('npm:')) {
|
|
@@ -77,7 +77,7 @@ function cleanGitHubUrl(targetUrl) {
|
|
|
77
77
|
}
|
|
78
78
|
return targetUrl;
|
|
79
79
|
}
|
|
80
|
-
export async function handleInit(repoUrl) {
|
|
80
|
+
export async function handleInit(repoUrl, options) {
|
|
81
81
|
const s = spinner();
|
|
82
82
|
let targetDir = process.cwd();
|
|
83
83
|
if (repoUrl && repoUrl.trim()) {
|
|
@@ -144,8 +144,8 @@ export async function handleInit(repoUrl) {
|
|
|
144
144
|
note(chalk.red(`Could not clone repository with the provided token.\n` +
|
|
145
145
|
`Please check that your token has repo read permissions.\n\n` +
|
|
146
146
|
`Alternative options:\n` +
|
|
147
|
-
` • Use SSH: ${chalk.cyan('ft init git@github.com:owner/repo.git')}\n` +
|
|
148
|
-
` • Or clone locally first: ${chalk.cyan('ft init ./my-repo-folder')}`), '❌ Authentication Failed');
|
|
147
|
+
` • Use SSH: ${chalk.cyan('ft-scout init git@github.com:owner/repo.git')}\n` +
|
|
148
|
+
` • Or clone locally first: ${chalk.cyan('ft-scout init ./my-repo-folder')}`), '❌ Authentication Failed');
|
|
149
149
|
return;
|
|
150
150
|
}
|
|
151
151
|
}
|
|
@@ -157,8 +157,8 @@ export async function handleInit(repoUrl) {
|
|
|
157
157
|
else {
|
|
158
158
|
note(chalk.red(`The specified repository is private or does not exist.\n\n` +
|
|
159
159
|
chalk.bold('🔒 How to access private repositories:') + '\n' +
|
|
160
|
-
` • Use SSH URL: ${chalk.cyan('ft init git@github.com:owner/repo.git')}\n` +
|
|
161
|
-
` • Or use PAT Token URL: ${chalk.cyan('ft init https://<TOKEN>@github.com/owner/repo.git')}\n` +
|
|
160
|
+
` • Use SSH URL: ${chalk.cyan('ft-scout init git@github.com:owner/repo.git')}\n` +
|
|
161
|
+
` • Or use PAT Token URL: ${chalk.cyan('ft-scout init https://<TOKEN>@github.com/owner/repo.git')}\n` +
|
|
162
162
|
` • Or clone locally first and run: ${chalk.cyan('ft-scout init ./my-repo-folder')}`), '❌ Clone Error');
|
|
163
163
|
return;
|
|
164
164
|
}
|
|
@@ -224,13 +224,48 @@ export async function handleInit(repoUrl) {
|
|
|
224
224
|
// Print repository summary
|
|
225
225
|
note(`Project Name: ${chalk.bold.green(projectName)}
|
|
226
226
|
Location: ${chalk.dim(targetDir)}
|
|
227
|
-
Primary Stack: ${chalk.yellow(aiInsight.summary)}
|
|
228
|
-
Entry Point: ${chalk.cyan(aiInsight.entryPoint)}
|
|
229
227
|
|
|
230
|
-
${chalk.bold('
|
|
231
|
-
${
|
|
228
|
+
${chalk.bold.magenta('🚀 Architectural Executive Summary & Stack:')}
|
|
229
|
+
${chalk.yellow(aiInsight.summary)}
|
|
232
230
|
|
|
233
|
-
${chalk.bold('
|
|
234
|
-
${
|
|
231
|
+
${chalk.bold.cyan('📌 Main Entry Point:')}
|
|
232
|
+
${chalk.cyan(aiInsight.entryPoint)}
|
|
233
|
+
|
|
234
|
+
${chalk.bold.red('🔥 Known Architectural Risks & Hotspots:')}
|
|
235
|
+
${aiInsight.painPoints.map((p) => ` • ${p}`).join('\n\n')}
|
|
236
|
+
|
|
237
|
+
${chalk.bold.green('🧭 Strategic Onboarding Read Order:')}
|
|
238
|
+
${aiInsight.readOrder.map((r, idx) => ` ${idx + 1}. ${r}`).join('\n')}`, '⚡ FrontTerrain Codebase Teardown (YC Pitch Edition)');
|
|
239
|
+
if (options?.ask) {
|
|
240
|
+
note(chalk.cyan('Interactive AI Q&A session active.\nAsk any question about this codebase. Press Ctrl+C to exit at any time.'), '💬 Interactive Q&A Mode');
|
|
241
|
+
const chatHistory = [];
|
|
242
|
+
while (true) {
|
|
243
|
+
const query = await text({
|
|
244
|
+
message: chalk.bold('Ask a query about this repository:'),
|
|
245
|
+
placeholder: 'e.g. How does authentication work? (Ctrl+C to exit)',
|
|
246
|
+
validate: (value) => {
|
|
247
|
+
if (!value || !value.trim())
|
|
248
|
+
return 'Query cannot be empty';
|
|
249
|
+
return undefined;
|
|
250
|
+
},
|
|
251
|
+
});
|
|
252
|
+
if (isCancel(query)) {
|
|
253
|
+
note(chalk.yellow('Exiting interactive session. Goodbye!'), '👋 Q&A Ended');
|
|
254
|
+
break;
|
|
255
|
+
}
|
|
256
|
+
const qText = query.trim();
|
|
257
|
+
if (['exit', 'quit', 'q'].includes(qText.toLowerCase())) {
|
|
258
|
+
note(chalk.yellow('Exiting interactive session. Goodbye!'), '👋 Q&A Ended');
|
|
259
|
+
break;
|
|
260
|
+
}
|
|
261
|
+
const askSpinner = spinner();
|
|
262
|
+
askSpinner.start('Analyzing codebase context & generating response...');
|
|
263
|
+
const answer = await askRepoQuestion(qText, projectName, filesList, manifestContent || '{}', chatHistory);
|
|
264
|
+
askSpinner.stop('Response:');
|
|
265
|
+
note(answer, `💡 ${qText}`);
|
|
266
|
+
chatHistory.push({ role: 'user', content: qText });
|
|
267
|
+
chatHistory.push({ role: 'assistant', content: answer });
|
|
268
|
+
}
|
|
269
|
+
}
|
|
235
270
|
}
|
|
236
271
|
//# sourceMappingURL=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D,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,uCAAuC,CAAC,EAAE,cAAc,CAAC,CAAC;gBAC5E,MAAM;YACR,CAAC;YAED,MAAM,UAAU,GAAG,OAAO,EAAE,CAAC;YAC7B,UAAU,CAAC,KAAK,CAAC,qDAAqD,CAAC,CAAC;YAExE,MAAM,MAAM,GAAG,MAAM,eAAe,CAClC,KAAK,EACL,WAAW,EACX,SAAS,EACT,eAAe,IAAI,IAAI,EACvB,WAAW,CACZ,CAAC;YAEF,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YAE7B,IAAI,CAAC,MAAM,EAAE,MAAM,KAAK,EAAE,CAAC,CAAC;YAE5B,WAAW,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;YACnD,WAAW,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC;QAC3D,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"llm.d.ts","sourceRoot":"","sources":["llm.ts"],"names":[],"mappings":"AAeA,wBAAsB,mBAAmB,CACvC,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EAAE,EACnB,kBAAkB,EAAE,MAAM,GACzB,OAAO,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,EAAE,CAAC;IAAC,UAAU,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"llm.d.ts","sourceRoot":"","sources":["llm.ts"],"names":[],"mappings":"AAeA,wBAAsB,mBAAmB,CACvC,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EAAE,EACnB,kBAAkB,EAAE,MAAM,GACzB,OAAO,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,EAAE,CAAC;IAAC,UAAU,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,CAyD7F;AAED,wBAAsB,eAAe,CACnC,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EAAE,EACnB,eAAe,EAAE,MAAM,EACvB,WAAW,GAAE,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAM,GACvE,OAAO,CAAC,MAAM,CAAC,CA6BjB"}
|
package/bin/src/engine/llm.js
CHANGED
|
@@ -12,20 +12,32 @@ const openai = new OpenAI({
|
|
|
12
12
|
});
|
|
13
13
|
export async function generateRepoSummary(projectName, filesList, packageJsonContent) {
|
|
14
14
|
const prompt = `
|
|
15
|
-
You are
|
|
16
|
-
|
|
15
|
+
You are a world-class Principal Software Architect and Y Combinator Technical Partner conducting an elite, high-energy codebase teardown for a YC Demo Day pitch.
|
|
16
|
+
|
|
17
|
+
Target Project: ${projectName}
|
|
18
|
+
|
|
17
19
|
File Tree Overview:
|
|
18
20
|
${filesList.join('\n')}
|
|
19
21
|
|
|
20
|
-
|
|
22
|
+
Manifest / Configuration Details:
|
|
21
23
|
${packageJsonContent}
|
|
22
24
|
|
|
23
|
-
|
|
25
|
+
Your goal: Generate an extremely engaging, technically deep, punchy, and impressive breakdown of this codebase. Avoid generic or dry 1-sentence answers. Make it read like a million-dollar technical due-diligence report that wows investors and engineers alike!
|
|
26
|
+
|
|
27
|
+
Provide a JSON output matching this exact schema:
|
|
24
28
|
{
|
|
25
|
-
"summary": "
|
|
26
|
-
"entryPoint": "the primary entry point file
|
|
27
|
-
"readOrder": [
|
|
28
|
-
|
|
29
|
+
"summary": "A rich, high-octane 3-4 sentence architectural executive summary explaining: 1) The core problem solved and primary functionality, 2) The underlying technical stack & runtime architecture, 3) The architectural moat or unique value proposition of this engineering design.",
|
|
30
|
+
"entryPoint": "the exact relative path to the primary execution entry point file",
|
|
31
|
+
"readOrder": [
|
|
32
|
+
"file/path/1 -> Strategic reason detailing why this file is foundational to the architecture",
|
|
33
|
+
"file/path/2 -> Technical justification for reading this subsystem next",
|
|
34
|
+
"file/path/3 -> Crucial module detailing core business logic or pipeline routing"
|
|
35
|
+
],
|
|
36
|
+
"painPoints": [
|
|
37
|
+
"⚡ [Subsystem Risk]: Deep technical insight into potential architectural debt, fragile dependency, or scaling bottleneck",
|
|
38
|
+
"⚡ [Scaling Bottleneck]: Critical operational or state management risk engineers must watch out for",
|
|
39
|
+
"⚡ [Execution Note]: Key architectural constraint or environment requirement for developer onboarding"
|
|
40
|
+
]
|
|
29
41
|
}
|
|
30
42
|
`;
|
|
31
43
|
try {
|
|
@@ -40,11 +52,47 @@ Provide a JSON output matching this schema:
|
|
|
40
52
|
console.error("OpenAI Error:", error);
|
|
41
53
|
// Fallback if no API key or network failure
|
|
42
54
|
return {
|
|
43
|
-
summary:
|
|
44
|
-
entryPoint: 'src/index.ts',
|
|
45
|
-
readOrder: [
|
|
46
|
-
|
|
55
|
+
summary: `🚀 ${projectName} Architecture Teardown: A high-performance, modular system engineered for rapid execution and developer agility. Built on top of a modern runtime stack, it features decoupled command routing, intelligent static analysis, and automated developer productivity tooling designed to scale.`,
|
|
56
|
+
entryPoint: filesList.find(f => f.includes('index') || f.includes('main') || f.includes('app')) || 'src/index.ts',
|
|
57
|
+
readOrder: [
|
|
58
|
+
'package.json -> Core manifest defining build targets, execution binaries, and dependency graph',
|
|
59
|
+
'src/index.ts -> Primary router establishing CLI hooks, subcommand registration, and execution workflow',
|
|
60
|
+
'src/engine/llm.ts -> Core AI engine managing prompt orchestration and LLM proxy synthesis'
|
|
61
|
+
],
|
|
62
|
+
painPoints: [
|
|
63
|
+
'⚡ AI Gateway Orchestration: Ensure API keys or FrontTerrain Proxy authentication headers are active for live AI synthesis.',
|
|
64
|
+
'⚡ Asynchronous Git Churn Analysis: High-volume repository scanning requires optimized commit log batching for large-scale codebases.',
|
|
65
|
+
'⚡ Module Resolution & ESM Boundaries: Strict TypeScript transpilation requires precise extension matching across ESM module dependencies.'
|
|
66
|
+
],
|
|
47
67
|
};
|
|
48
68
|
}
|
|
49
69
|
}
|
|
70
|
+
export async function askRepoQuestion(question, projectName, filesList, manifestContent, chatHistory = []) {
|
|
71
|
+
const systemPrompt = `You are FrontTerrain AI, a world-class Principal Software Architect and Y Combinator Technical Co-Pilot.
|
|
72
|
+
You have indexed the codebase for project: "${projectName}".
|
|
73
|
+
|
|
74
|
+
Repository File Structure:
|
|
75
|
+
${filesList.slice(0, 150).join('\n')}
|
|
76
|
+
|
|
77
|
+
Manifest / Config Highlights:
|
|
78
|
+
${manifestContent.slice(0, 2000)}
|
|
79
|
+
|
|
80
|
+
Your mission: Answer the user's technical questions about this repository with extreme clarity, deep technical insight, and actionable engineering advice. Be engaging, clear, precise, and pitch-ready! If relevant, refer to specific files, paths, or architectural components in the project.`;
|
|
81
|
+
const messages = [
|
|
82
|
+
{ role: 'system', content: systemPrompt },
|
|
83
|
+
...chatHistory,
|
|
84
|
+
{ role: 'user', content: question },
|
|
85
|
+
];
|
|
86
|
+
try {
|
|
87
|
+
const response = await openai.chat.completions.create({
|
|
88
|
+
model: 'llama-3.3-70b-versatile',
|
|
89
|
+
messages,
|
|
90
|
+
});
|
|
91
|
+
return response.choices[0]?.message?.content || 'No response generated from AI.';
|
|
92
|
+
}
|
|
93
|
+
catch (error) {
|
|
94
|
+
console.error("OpenAI Error:", error);
|
|
95
|
+
return `⚠️ AI Error: Could not generate answer (${error instanceof Error ? error.message : String(error)}). Please check network or proxy credentials.`;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
50
98
|
//# sourceMappingURL=llm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"llm.js","sourceRoot":"","sources":["llm.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CA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nC,QAAgB,EAChB,WAAmB,EACnB,SAAmB,EACnB,eAAuB,EACvB,WAAW,GAA2D,EAAE;IAExE,MAAM,YAAY,GAAG;8CACuB,WAAW;;;EAGvD,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;;;EAGlC,eAAe,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC;;kSAEkQ,CAAC;IAEjS,MAAM,QAAQ,GAAsE;QAClF,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,YAAY,EAAE;QACzC,GAAG,WAAW;QACd,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE;KACpC,CAAC;IAEF,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC;YACpD,KAAK,EAAE,yBAAyB;YAChC,QAAQ;SACT,CAAC,CAAC;QAEH,OAAO,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,IAAI,gCAAgC,CAAC;IACnF,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;QACtC,OAAO,2CAA2C,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,+CAA+C,CAAC;IAC1J,CAAC;AACH,CAAC"}
|
package/bin/src/index.js
CHANGED
|
@@ -2,7 +2,6 @@ import { Command } from 'commander';
|
|
|
2
2
|
import { intro, outro } from '@clack/prompts';
|
|
3
3
|
import chalk from 'chalk';
|
|
4
4
|
import { handleInit } from './commands/init.js';
|
|
5
|
-
import { handleBrief } from './commands/brief.js';
|
|
6
5
|
import { handleOwners } from './commands/owners.js';
|
|
7
6
|
import { handleRisky } from './commands/risky.js';
|
|
8
7
|
import { handleSetup } from './commands/setup.js';
|
|
@@ -18,25 +17,19 @@ program
|
|
|
18
17
|
program
|
|
19
18
|
.name('ft')
|
|
20
19
|
.description('FrontTerrain — The Onboarding Co-Pilot for New Codebases')
|
|
21
|
-
.version('
|
|
20
|
+
.version('2.0.0');
|
|
22
21
|
// Header UI on execution
|
|
23
22
|
program.hook('preAction', () => {
|
|
24
|
-
intro(chalk.bgCyan.black(' FrontTerrain CLI (
|
|
23
|
+
intro(chalk.bgCyan.black(' FrontTerrain CLI (v2.0.0) '));
|
|
25
24
|
});
|
|
26
25
|
// Command definitions
|
|
27
26
|
program
|
|
28
27
|
.command('init [repoUrl]')
|
|
29
28
|
.description('Build local understanding map of the repository')
|
|
30
|
-
.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
program
|
|
35
|
-
.command('brief')
|
|
36
|
-
.description('Print human-readable onboarding summary')
|
|
37
|
-
.action(async () => {
|
|
38
|
-
await handleBrief();
|
|
39
|
-
outro(chalk.cyan('Ready for your first task.'));
|
|
29
|
+
.option('-a, --ask', 'Interactive Q&A mode after repository initialization')
|
|
30
|
+
.action(async (repoUrl, options) => {
|
|
31
|
+
await handleInit(repoUrl, options);
|
|
32
|
+
outro(chalk.green('Initialization complete!'));
|
|
40
33
|
});
|
|
41
34
|
program
|
|
42
35
|
.command('owners <path>')
|
package/bin/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AA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,CAAC,KAAK,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAC,CAAC;AACjD,CAAC,CAAC,CAAC;AAEL,OAAO;KACJ,OAAO,CAAC,eAAe,CAAC;KACxB,WAAW,CAAC,yDAAyD,CAAC;KACtE,MAAM,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;IACrB,MAAM,YAAY,CAAC,IAAI,CAAC,CAAC;IACzB,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,mCAAmC,CAAC,CAAC,CAAC;AACzD,CAAC,CAAC,CAAC;AAEL,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC"}
|
package/email-template.txt
CHANGED
|
@@ -5,14 +5,14 @@ Hey FrontTerrain Developer 👋,
|
|
|
5
5
|
|
|
6
6
|
Jumping into a massive or legacy codebase can be intimidating. You waste hours deciphering complex file structures, guessing who owns which module, or accidentally editing fragile hotspots.
|
|
7
7
|
|
|
8
|
-
That’s why we built ft-scout (FrontTerrain CLI
|
|
8
|
+
That’s why we built ft-scout (FrontTerrain CLI v2.0.0) — your AI co-pilot designed to give you instant codebase clarity directly inside your terminal!
|
|
9
9
|
|
|
10
10
|
---
|
|
11
11
|
|
|
12
12
|
⚡ WHAT YOU CAN DO WITH FT-SCOUT:
|
|
13
13
|
|
|
14
|
-
1. ft
|
|
15
|
-
Get an instant,
|
|
14
|
+
1. ft init — AI Onboarding Teardown
|
|
15
|
+
Get an instant, high-energy summary of repository architecture, tech stack, and key modules so you can start contributing immediately.
|
|
16
16
|
|
|
17
17
|
2. ft risky — Code Fragility Risk Map
|
|
18
18
|
Analyzes commit churn, hotfixes, and historical regressions to alert you about high-risk hotspots and line ranges before you touch them.
|
|
@@ -33,8 +33,7 @@ That’s why we built ft-scout (FrontTerrain CLI v1.0.7) — your AI co-pilot de
|
|
|
33
33
|
2. Run inside any Git codebase:
|
|
34
34
|
$ ft init
|
|
35
35
|
|
|
36
|
-
3. Get your
|
|
37
|
-
$ ft brief
|
|
36
|
+
3. Get your risk map:
|
|
38
37
|
$ ft risky
|
|
39
38
|
|
|
40
39
|
---
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"brief.d.ts","sourceRoot":"","sources":["brief.ts"],"names":[],"mappings":"AAIA,wBAAsB,WAAW,kBA+BhC"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { spinner, note } from '@clack/prompts';
|
|
2
|
-
import chalk from 'chalk';
|
|
3
|
-
import { loadContext } from '../utils/config.js';
|
|
4
|
-
export async function handleBrief() {
|
|
5
|
-
const s = spinner();
|
|
6
|
-
s.start('Reading codebase structure and .ft metadata...');
|
|
7
|
-
const context = loadContext();
|
|
8
|
-
if (!context) {
|
|
9
|
-
s.stop(chalk.red('No local context found.'));
|
|
10
|
-
console.log('\nPlease run `ft init` first to index a repository.');
|
|
11
|
-
return;
|
|
12
|
-
}
|
|
13
|
-
s.stop('Repository analysis complete.');
|
|
14
|
-
const repoSource = context.repoUrl
|
|
15
|
-
? chalk.cyan(context.repoUrl)
|
|
16
|
-
: chalk.dim(`Root Repository (${context.targetDir || process.cwd()})`);
|
|
17
|
-
note(`Project: ${chalk.bold.green(context.projectName)}
|
|
18
|
-
Source: ${repoSource}
|
|
19
|
-
Primary Stack: ${chalk.yellow(context.stack)}
|
|
20
|
-
Entry Point: ${chalk.cyan(context.entryPoint)}
|
|
21
|
-
|
|
22
|
-
${chalk.bold('Known Architectural Risk / Pain Points:')}
|
|
23
|
-
${context.painPoints.map((p) => ` • ${p}`).join('\n')}
|
|
24
|
-
|
|
25
|
-
${chalk.bold('Suggested Reading Order:')}
|
|
26
|
-
${context.readOrder.map((r, idx) => ` ${idx + 1}. ${r}`).join('\n')}`, '💡 Onboarding Brief');
|
|
27
|
-
}
|
|
28
|
-
//# sourceMappingURL=brief.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"brief.js","sourceRoot":"","sources":["brief.ts"],"names":[],"mappings":"AAA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C,SAAS,CAAC,GAAG,CAAC,CAAC,CAAS,EAAE,GAAW,EAAE,EAAE,CAAC,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EACjF,qBAAqB,CACtB,CAAC;AACJ,CAAC"}
|
package/email-template.html
DELETED
|
@@ -1,223 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<title>Introducing FrontTerrain (ft-scout)</title>
|
|
7
|
-
<style>
|
|
8
|
-
body {
|
|
9
|
-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
|
|
10
|
-
background-color: #0f172a;
|
|
11
|
-
margin: 0;
|
|
12
|
-
padding: 40px 12px;
|
|
13
|
-
color: #e2e8f0;
|
|
14
|
-
}
|
|
15
|
-
.container {
|
|
16
|
-
max-width: 620px;
|
|
17
|
-
margin: 0 auto;
|
|
18
|
-
background: #1e293b;
|
|
19
|
-
border-radius: 16px;
|
|
20
|
-
overflow: hidden;
|
|
21
|
-
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
|
|
22
|
-
border: 1px solid #334155;
|
|
23
|
-
}
|
|
24
|
-
.header {
|
|
25
|
-
background: linear-gradient(135deg, #0284c7 0%, #0d9488 100%);
|
|
26
|
-
padding: 40px 30px;
|
|
27
|
-
text-align: center;
|
|
28
|
-
color: #ffffff;
|
|
29
|
-
}
|
|
30
|
-
.badge {
|
|
31
|
-
display: inline-block;
|
|
32
|
-
background: rgba(255, 255, 255, 0.2);
|
|
33
|
-
color: #ffffff;
|
|
34
|
-
font-size: 11px;
|
|
35
|
-
font-weight: 700;
|
|
36
|
-
padding: 4px 14px;
|
|
37
|
-
border-radius: 20px;
|
|
38
|
-
text-transform: uppercase;
|
|
39
|
-
letter-spacing: 1px;
|
|
40
|
-
margin-bottom: 12px;
|
|
41
|
-
}
|
|
42
|
-
.header h1 {
|
|
43
|
-
margin: 0;
|
|
44
|
-
font-size: 28px;
|
|
45
|
-
font-weight: 800;
|
|
46
|
-
letter-spacing: -0.5px;
|
|
47
|
-
}
|
|
48
|
-
.header p {
|
|
49
|
-
margin-top: 10px;
|
|
50
|
-
color: #e0f2fe;
|
|
51
|
-
font-size: 16px;
|
|
52
|
-
font-weight: 400;
|
|
53
|
-
}
|
|
54
|
-
.content {
|
|
55
|
-
padding: 36px 30px;
|
|
56
|
-
}
|
|
57
|
-
.intro {
|
|
58
|
-
font-size: 16px;
|
|
59
|
-
line-height: 1.7;
|
|
60
|
-
color: #cbd5e1;
|
|
61
|
-
margin-bottom: 28px;
|
|
62
|
-
}
|
|
63
|
-
.section-title {
|
|
64
|
-
font-size: 18px;
|
|
65
|
-
font-weight: 700;
|
|
66
|
-
color: #f8fafc;
|
|
67
|
-
margin-bottom: 16px;
|
|
68
|
-
display: flex;
|
|
69
|
-
align-items: center;
|
|
70
|
-
}
|
|
71
|
-
.feature-card {
|
|
72
|
-
background: #0f172a;
|
|
73
|
-
border: 1px solid #334155;
|
|
74
|
-
border-radius: 12px;
|
|
75
|
-
padding: 20px;
|
|
76
|
-
margin-bottom: 16px;
|
|
77
|
-
transition: transform 0.2s;
|
|
78
|
-
}
|
|
79
|
-
.feature-header {
|
|
80
|
-
display: flex;
|
|
81
|
-
align-items: center;
|
|
82
|
-
margin-bottom: 8px;
|
|
83
|
-
}
|
|
84
|
-
.command-tag {
|
|
85
|
-
background: #0284c7;
|
|
86
|
-
color: #ffffff;
|
|
87
|
-
font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
|
|
88
|
-
font-weight: 700;
|
|
89
|
-
font-size: 13px;
|
|
90
|
-
padding: 4px 10px;
|
|
91
|
-
border-radius: 6px;
|
|
92
|
-
margin-right: 10px;
|
|
93
|
-
}
|
|
94
|
-
.feature-name {
|
|
95
|
-
font-weight: 700;
|
|
96
|
-
font-size: 16px;
|
|
97
|
-
color: #f8fafc;
|
|
98
|
-
}
|
|
99
|
-
.feature-desc {
|
|
100
|
-
font-size: 14px;
|
|
101
|
-
color: #94a3b8;
|
|
102
|
-
margin: 0;
|
|
103
|
-
line-height: 1.6;
|
|
104
|
-
}
|
|
105
|
-
.code-box {
|
|
106
|
-
background: #090d16;
|
|
107
|
-
color: #38bdf8;
|
|
108
|
-
padding: 20px;
|
|
109
|
-
border-radius: 10px;
|
|
110
|
-
font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
|
|
111
|
-
font-size: 14px;
|
|
112
|
-
line-height: 1.8;
|
|
113
|
-
margin: 28px 0;
|
|
114
|
-
border: 1px solid #1e293b;
|
|
115
|
-
}
|
|
116
|
-
.code-box span.comment {
|
|
117
|
-
color: #64748b;
|
|
118
|
-
}
|
|
119
|
-
.code-box span.cmd {
|
|
120
|
-
color: #4ade80;
|
|
121
|
-
}
|
|
122
|
-
.cta-container {
|
|
123
|
-
text-align: center;
|
|
124
|
-
margin: 36px 0 20px 0;
|
|
125
|
-
}
|
|
126
|
-
.btn {
|
|
127
|
-
background: linear-gradient(135deg, #0284c7 0%, #0d9488 100%);
|
|
128
|
-
color: #ffffff !important;
|
|
129
|
-
padding: 16px 36px;
|
|
130
|
-
border-radius: 10px;
|
|
131
|
-
text-decoration: none;
|
|
132
|
-
font-weight: 700;
|
|
133
|
-
display: inline-block;
|
|
134
|
-
font-size: 16px;
|
|
135
|
-
box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4);
|
|
136
|
-
}
|
|
137
|
-
.footer {
|
|
138
|
-
background: #0f172a;
|
|
139
|
-
text-align: center;
|
|
140
|
-
padding: 24px;
|
|
141
|
-
font-size: 13px;
|
|
142
|
-
color: #64748b;
|
|
143
|
-
border-top: 1px solid #334155;
|
|
144
|
-
}
|
|
145
|
-
.footer a {
|
|
146
|
-
color: #38bdf8;
|
|
147
|
-
text-decoration: none;
|
|
148
|
-
}
|
|
149
|
-
</style>
|
|
150
|
-
</head>
|
|
151
|
-
<body>
|
|
152
|
-
<div class="container">
|
|
153
|
-
<div class="header">
|
|
154
|
-
<span class="badge">V1.0.8 RELEASE</span>
|
|
155
|
-
<h1>FrontTerrain (<code>ft-scout</code>)</h1>
|
|
156
|
-
<p>The AI Onboarding Co-Pilot for New Codebases</p>
|
|
157
|
-
</div>
|
|
158
|
-
|
|
159
|
-
<div class="content">
|
|
160
|
-
<p class="intro">
|
|
161
|
-
Hey FrontTerrain Developer 👋,<br><br>
|
|
162
|
-
Jumping into a massive or legacy codebase can be intimidating. You waste hours deciphering complex file structures, guessing who owns which module, or accidentally editing fragile hotspots.<br><br>
|
|
163
|
-
That’s why we built <strong><code>ft-scout</code> (FrontTerrain CLI)</strong> — your AI co-pilot designed to give you instant codebase clarity directly inside your terminal!
|
|
164
|
-
</p>
|
|
165
|
-
|
|
166
|
-
<div class="section-title">⚡ What You Can Do with <code>ft-scout</code>:</div>
|
|
167
|
-
|
|
168
|
-
<div class="feature-card">
|
|
169
|
-
<div class="feature-header">
|
|
170
|
-
<span class="command-tag">ft brief</span>
|
|
171
|
-
<span class="feature-name">AI Onboarding Summary</span>
|
|
172
|
-
</div>
|
|
173
|
-
<p class="feature-desc">Get an instant, human-readable summary of repository architecture, tech stack, and key modules so you can start contributing immediately.</p>
|
|
174
|
-
</div>
|
|
175
|
-
|
|
176
|
-
<div class="feature-card">
|
|
177
|
-
<div class="feature-header">
|
|
178
|
-
<span class="command-tag">ft risky</span>
|
|
179
|
-
<span class="feature-name">Code Fragility Risk Map</span>
|
|
180
|
-
</div>
|
|
181
|
-
<p class="feature-desc">Analyzes commit churn, hotfixes, and historical regressions to alert you about high-risk hotspots and line ranges before you touch them.</p>
|
|
182
|
-
</div>
|
|
183
|
-
|
|
184
|
-
<div class="feature-card">
|
|
185
|
-
<div class="feature-header">
|
|
186
|
-
<span class="command-tag">ft owners <path></span>
|
|
187
|
-
<span class="feature-name">Domain Knowledge Holders</span>
|
|
188
|
-
</div>
|
|
189
|
-
<p class="feature-desc">Identifies true code experts based on real commit frequency and authorship—so you know exactly who to loop into code reviews.</p>
|
|
190
|
-
</div>
|
|
191
|
-
|
|
192
|
-
<div class="feature-card">
|
|
193
|
-
<div class="feature-header">
|
|
194
|
-
<span class="command-tag">ft setup</span>
|
|
195
|
-
<span class="feature-name">Local Dev Diagnostic</span>
|
|
196
|
-
</div>
|
|
197
|
-
<p class="feature-desc">Automatically scans missing <code>.env</code> keys, node runtime mismatches, and configuration issues before they break your local build.</p>
|
|
198
|
-
</div>
|
|
199
|
-
|
|
200
|
-
<div class="section-title" style="margin-top: 32px;">🚀 Quick Start Guide</div>
|
|
201
|
-
|
|
202
|
-
<div class="code-box">
|
|
203
|
-
<span class="comment"># 1. Install ft-scout globally via npm</span><br>
|
|
204
|
-
<span class="cmd">npm install -g ft-scout</span><br><br>
|
|
205
|
-
<span class="comment"># 2. Run inside any Git codebase</span><br>
|
|
206
|
-
<span class="cmd">ft init</span><br><br>
|
|
207
|
-
<span class="comment"># 3. Get your onboarding brief & risk map</span><br>
|
|
208
|
-
<span class="cmd">ft brief</span><br>
|
|
209
|
-
<span class="cmd">ft risky</span>
|
|
210
|
-
</div>
|
|
211
|
-
|
|
212
|
-
<div class="cta-container">
|
|
213
|
-
<a href="https://github.com/Front-Terrain/FT-Check#readme" class="btn" target="_blank">Explore Documentation & GitHub</a>
|
|
214
|
-
</div>
|
|
215
|
-
</div>
|
|
216
|
-
|
|
217
|
-
<div class="footer">
|
|
218
|
-
<p>Built with ❤️ by Front Terrain</p>
|
|
219
|
-
<p><a href="https://github.com/Front-Terrain/FT-Check">GitHub Repository</a> | <a href="https://github.com/Front-Terrain/FT-Check/issues">Report Issues</a></p>
|
|
220
|
-
</div>
|
|
221
|
-
</div>
|
|
222
|
-
</body>
|
|
223
|
-
</html>
|
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
const fs = require('fs');
|
|
2
|
-
const path = require('path');
|
|
3
|
-
|
|
4
|
-
// Try requiring nodemailer from FrontTerrain if not in current node_modules
|
|
5
|
-
let nodemailer;
|
|
6
|
-
try {
|
|
7
|
-
nodemailer = require('nodemailer');
|
|
8
|
-
} catch {
|
|
9
|
-
try {
|
|
10
|
-
nodemailer = require('C:/Users/rishi/FrontTerrain/node_modules/nodemailer');
|
|
11
|
-
} catch {
|
|
12
|
-
nodemailer = require('C:/Users/rishi/FrontTerrain/functions/node_modules/nodemailer');
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
// Try requiring firebase-admin from FrontTerrain
|
|
17
|
-
let admin;
|
|
18
|
-
try {
|
|
19
|
-
admin = require('firebase-admin');
|
|
20
|
-
} catch {
|
|
21
|
-
try {
|
|
22
|
-
admin = require('C:/Users/rishi/FrontTerrain/node_modules/firebase-admin');
|
|
23
|
-
} catch {
|
|
24
|
-
admin = require('C:/Users/rishi/FrontTerrain/functions/node_modules/firebase-admin');
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
const serviceAccountPath = 'C:/Users/rishi/FrontTerrain/ServiceAccountKey.json';
|
|
29
|
-
|
|
30
|
-
const BREVO_USER = 'b23077001@smtp-brevo.com';
|
|
31
|
-
const BREVO_PASS = 'xsmtpsib-63ad84e2307ca830b499c8921f1a242cab01b6f938119cf453e81ab854f643a3-RLpSOgjpmtGZN1NT';
|
|
32
|
-
const FROM_EMAIL = '"FrontTerrain" <noreply@frontterrain.com>';
|
|
33
|
-
const SUBJECT = '🚀 Introducing FrontTerrain (ft-scout): Your AI Onboarding Co-Pilot for Codebases';
|
|
34
|
-
|
|
35
|
-
const htmlPath = path.join(__dirname, '../email-template.html');
|
|
36
|
-
const textPath = path.join(__dirname, '../email-template.txt');
|
|
37
|
-
|
|
38
|
-
const htmlContent = fs.readFileSync(htmlPath, 'utf8');
|
|
39
|
-
const textContent = fs.readFileSync(textPath, 'utf8');
|
|
40
|
-
|
|
41
|
-
const transporter = nodemailer.createTransport({
|
|
42
|
-
host: 'smtp-relay.brevo.com',
|
|
43
|
-
port: 587,
|
|
44
|
-
secure: false,
|
|
45
|
-
auth: {
|
|
46
|
-
user: BREVO_USER,
|
|
47
|
-
pass: BREVO_PASS,
|
|
48
|
-
},
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
async function getAllUserEmails() {
|
|
52
|
-
const emails = new Set();
|
|
53
|
-
|
|
54
|
-
if (fs.existsSync(serviceAccountPath)) {
|
|
55
|
-
try {
|
|
56
|
-
const serviceAccount = require(serviceAccountPath);
|
|
57
|
-
if (!admin.apps.length) {
|
|
58
|
-
admin.initializeApp({
|
|
59
|
-
credential: admin.credential.cert(serviceAccount),
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
// Fetch from Firestore users collection
|
|
64
|
-
const db = admin.firestore();
|
|
65
|
-
const snapshot = await db.collection('users').get();
|
|
66
|
-
snapshot.forEach((doc) => {
|
|
67
|
-
const data = doc.data();
|
|
68
|
-
if (data.email) emails.add(data.email.trim().toLowerCase());
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
// Fetch from Firebase Auth users list
|
|
72
|
-
let nextPageToken;
|
|
73
|
-
do {
|
|
74
|
-
const listUsersResult = await admin.auth().listUsers(1000, nextPageToken);
|
|
75
|
-
listUsersResult.users.forEach((userRecord) => {
|
|
76
|
-
if (userRecord.email) emails.add(userRecord.email.trim().toLowerCase());
|
|
77
|
-
});
|
|
78
|
-
nextPageToken = listUsersResult.pageToken;
|
|
79
|
-
} while (nextPageToken);
|
|
80
|
-
} catch (err) {
|
|
81
|
-
console.warn('⚠️ Could not fetch users from Firebase:', err.message);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
// Also check if local users.json exists
|
|
86
|
-
const usersJsonPath = path.join(__dirname, '../users.json');
|
|
87
|
-
if (fs.existsSync(usersJsonPath)) {
|
|
88
|
-
try {
|
|
89
|
-
const localUsers = JSON.parse(fs.readFileSync(usersJsonPath, 'utf8'));
|
|
90
|
-
localUsers.forEach((e) => emails.add(e.trim().toLowerCase()));
|
|
91
|
-
} catch (e) {}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
return Array.from(emails);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
async function main() {
|
|
98
|
-
const args = process.argv.slice(2);
|
|
99
|
-
const isSendMode = args.includes('--send');
|
|
100
|
-
const testEmailArg = args.find((a) => a.startsWith('--test='));
|
|
101
|
-
const testEmail = testEmailArg ? testEmailArg.split('=')[1] : null;
|
|
102
|
-
|
|
103
|
-
console.log('\n=================================================');
|
|
104
|
-
console.log('🚀 FrontTerrain ft-scout Brevo Email Dispatcher');
|
|
105
|
-
console.log('=================================================\n');
|
|
106
|
-
|
|
107
|
-
if (testEmail) {
|
|
108
|
-
console.log(`✉️ Sending test email to: ${testEmail}...`);
|
|
109
|
-
const info = await transporter.sendMail({
|
|
110
|
-
from: FROM_EMAIL,
|
|
111
|
-
to: testEmail,
|
|
112
|
-
subject: `${SUBJECT}`,
|
|
113
|
-
html: htmlContent,
|
|
114
|
-
text: textContent,
|
|
115
|
-
});
|
|
116
|
-
console.log(`✅ Test email sent successfully! MessageID: ${info.messageId || info.response}`);
|
|
117
|
-
return;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
console.log('🔍 Fetching all FT users...');
|
|
121
|
-
const recipients = await getAllUserEmails();
|
|
122
|
-
console.log(`📊 Found ${recipients.length} total FT user email address(es):\n`);
|
|
123
|
-
recipients.forEach((email, i) => console.log(` ${i + 1}. ${email}`));
|
|
124
|
-
|
|
125
|
-
if (recipients.length === 0) {
|
|
126
|
-
console.log('\n⚠️ No user emails found. Please verify Firebase connection or users.json file.');
|
|
127
|
-
return;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
if (!isSendMode) {
|
|
131
|
-
console.log('\n-------------------------------------------------');
|
|
132
|
-
console.log('📌 DRY-RUN MODE (No emails sent).');
|
|
133
|
-
console.log('To send a test email first, run:');
|
|
134
|
-
console.log(' node scripts/send-brevo-campaign.cjs --test=your_email@domain.com\n');
|
|
135
|
-
console.log('To send to ALL users above, run:');
|
|
136
|
-
console.log(' node scripts/send-brevo-campaign.cjs --send');
|
|
137
|
-
console.log('-------------------------------------------------\n');
|
|
138
|
-
return;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
console.log('\n🚀 Starting bulk email dispatch via Brevo SMTP...');
|
|
142
|
-
let successCount = 0;
|
|
143
|
-
let failCount = 0;
|
|
144
|
-
|
|
145
|
-
for (const email of recipients) {
|
|
146
|
-
try {
|
|
147
|
-
const info = await transporter.sendMail({
|
|
148
|
-
from: FROM_EMAIL,
|
|
149
|
-
to: email,
|
|
150
|
-
subject: SUBJECT,
|
|
151
|
-
html: htmlContent,
|
|
152
|
-
text: textContent,
|
|
153
|
-
});
|
|
154
|
-
successCount++;
|
|
155
|
-
console.log(`✅ [${successCount}/${recipients.length}] Sent to ${email} (MessageID: ${info.messageId || info.response})`);
|
|
156
|
-
} catch (err) {
|
|
157
|
-
failCount++;
|
|
158
|
-
console.error(`❌ Failed to send to ${email}:`, err.message);
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
console.log('\n=================================================');
|
|
163
|
-
console.log(`🎉 Campaign Complete: ${successCount} Sent, ${failCount} Failed.`);
|
|
164
|
-
console.log('=================================================\n');
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
main().catch(console.error);
|
package/scripts/send-email.js
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import fs from 'fs';
|
|
2
|
-
import path from 'path';
|
|
3
|
-
import { fileURLToPath } from 'url';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* FrontTerrain (ft-scout) Email Dispatch Script
|
|
7
|
-
*
|
|
8
|
-
* Usage:
|
|
9
|
-
* 1. Set environment variables:
|
|
10
|
-
* export RESEND_API_KEY="re_123456789"
|
|
11
|
-
* (or SENDGRID_API_KEY="SG.xxx")
|
|
12
|
-
* 2. Create `users.json` containing an array of emails:
|
|
13
|
-
* ["user1@example.com", "user2@example.com"]
|
|
14
|
-
* 3. Run: node scripts/send-email.js
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
18
|
-
const __dirname = path.dirname(__filename);
|
|
19
|
-
|
|
20
|
-
const htmlTemplatePath = path.join(__dirname, '../email-template.html');
|
|
21
|
-
const textTemplatePath = path.join(__dirname, '../email-template.txt');
|
|
22
|
-
|
|
23
|
-
const htmlContent = fs.readFileSync(htmlTemplatePath, 'utf8');
|
|
24
|
-
const textContent = fs.readFileSync(textTemplatePath, 'utf8');
|
|
25
|
-
|
|
26
|
-
async function sendEmailResend(apiKey, recipients) {
|
|
27
|
-
console.log(`Sending email to ${recipients.length} recipients via Resend API...`);
|
|
28
|
-
|
|
29
|
-
for (const email of recipients) {
|
|
30
|
-
try {
|
|
31
|
-
const response = await fetch('https://api.resend.com/emails', {
|
|
32
|
-
method: 'POST',
|
|
33
|
-
headers: {
|
|
34
|
-
'Authorization': `Bearer ${apiKey}`,
|
|
35
|
-
'Content-Type': 'application/json'
|
|
36
|
-
},
|
|
37
|
-
body: JSON.stringify({
|
|
38
|
-
from: 'FrontTerrain <updates@frontterrain.com>',
|
|
39
|
-
to: [email],
|
|
40
|
-
subject: '🚀 Introducing FrontTerrain (ft-scout): Your AI Onboarding Co-Pilot',
|
|
41
|
-
html: htmlContent,
|
|
42
|
-
text: textContent
|
|
43
|
-
})
|
|
44
|
-
});
|
|
45
|
-
const data = await response.json();
|
|
46
|
-
if (response.ok) {
|
|
47
|
-
console.log(`✅ Sent to ${email} (ID: ${data.id})`);
|
|
48
|
-
} else {
|
|
49
|
-
console.error(`❌ Failed to send to ${email}:`, data);
|
|
50
|
-
}
|
|
51
|
-
} catch (err) {
|
|
52
|
-
console.error(`❌ Error sending to ${email}:`, err.message);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
async function main() {
|
|
58
|
-
const usersFilePath = path.join(__dirname, '../users.json');
|
|
59
|
-
if (!fs.existsSync(usersFilePath)) {
|
|
60
|
-
console.log('ℹ️ No users.json file found. Creating example users.json...');
|
|
61
|
-
fs.writeFileSync(usersFilePath, JSON.stringify(["user1@example.com", "user2@example.com"], null, 2));
|
|
62
|
-
console.log('📝 Please edit `users.json` with your real user emails list.');
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
const recipients = JSON.parse(fs.readFileSync(usersFilePath, 'utf8'));
|
|
67
|
-
const resendApiKey = process.env.RESEND_API_KEY;
|
|
68
|
-
|
|
69
|
-
if (resendApiKey) {
|
|
70
|
-
await sendEmailResend(resendApiKey, recipients);
|
|
71
|
-
} else {
|
|
72
|
-
console.log('\n⚠️ No API Key detected.');
|
|
73
|
-
console.log('Set `RESEND_API_KEY` or copy the content from `email-template.html` / `email-template.txt` into Mailchimp/SendGrid/Brevo.');
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
main().catch(console.error);
|