careervivid 2.1.31 → 2.1.33
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/dist/agent/QueryEngine.js +2 -2
- package/dist/api.d.ts +9 -0
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +4 -0
- package/dist/commands/agent/configurator.d.ts.map +1 -1
- package/dist/commands/agent/configurator.js +11 -17
- package/dist/commands/agent/index.js +5 -5
- package/dist/commands/interview.d.ts.map +1 -1
- package/dist/commands/interview.js +22 -4
- package/dist/commands/jobs.d.ts.map +1 -1
- package/dist/commands/jobs.js +110 -1
- package/dist/commands/resumes.d.ts.map +1 -1
- package/dist/commands/resumes.js +41 -1
- package/package.json +2 -1
|
@@ -99,12 +99,12 @@ export class QueryEngine {
|
|
|
99
99
|
// Vertex AI mode — uses gcloud Application Default Credentials
|
|
100
100
|
this.ai = new GoogleGenAI({ vertexai: true, project, location });
|
|
101
101
|
// Vertex AI uses a different model namespace
|
|
102
|
-
this.model = options.model || 'gemini-
|
|
102
|
+
this.model = options.model || 'gemini-1.5-flash';
|
|
103
103
|
}
|
|
104
104
|
else {
|
|
105
105
|
// Gemini API mode — requires an API key
|
|
106
106
|
this.ai = new GoogleGenAI({ apiKey: apiKey || '' });
|
|
107
|
-
this.model = options.model || 'gemini-
|
|
107
|
+
this.model = options.model || 'gemini-1.5-flash';
|
|
108
108
|
}
|
|
109
109
|
this.systemInstruction = options.systemInstruction || CODING_AGENT_SYSTEM_PROMPT;
|
|
110
110
|
this.tools = options.tools || [];
|
package/dist/api.d.ts
CHANGED
|
@@ -136,6 +136,15 @@ export declare function resumeUpdate(payload: {
|
|
|
136
136
|
resumeId: string;
|
|
137
137
|
message: string;
|
|
138
138
|
} | ApiError>;
|
|
139
|
+
/** Parse raw text into a structured Resume and save it */
|
|
140
|
+
export declare function resumeCreate(payload: {
|
|
141
|
+
title?: string;
|
|
142
|
+
baseContent: string;
|
|
143
|
+
}): Promise<{
|
|
144
|
+
success: boolean;
|
|
145
|
+
title: string;
|
|
146
|
+
resumeId: string;
|
|
147
|
+
} | ApiError>;
|
|
139
148
|
export declare function resumeDelete(payload: {
|
|
140
149
|
resumeId: string;
|
|
141
150
|
}): Promise<{
|
package/dist/api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,YAAY,CAAC;AAChD,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,SAAS,CAAC;AAEhD,MAAM,WAAW,cAAc;IAC3B,IAAI,EAAE,QAAQ,CAAC;IACf,UAAU,EAAE,UAAU,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,aAAa;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,YAAY;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,QAAQ;IACrB,OAAO,EAAE,IAAI,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EA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C/C,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;CAC1B,GAAG,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,WAAW,EAAE,WAAW,CAAA;CAAE,GAAG,QAAQ,CAAC,CAErE;AAED,8CAA8C;AAC9C,wBAAsB,gBAAgB,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAAE,YAAY,EAAE,WAAW,EAAE,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,QAAQ,CAAC,CAIzH;AAID,MAAM,WAAW,YAAY;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED,MAAM,WAAW,mBAAmB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,YAAY,EAAE,CAAC;CACjC;AAED,2CAA2C;AAC3C,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,mBAAmB,GAAG,QAAQ,CAAC,CAEhF"}
|
package/dist/api.js
CHANGED
|
@@ -208,6 +208,10 @@ export async function resumesList() {
|
|
|
208
208
|
export async function resumeUpdate(payload) {
|
|
209
209
|
return cfRequest("POST", "cliResumeUpdate", payload);
|
|
210
210
|
}
|
|
211
|
+
/** Parse raw text into a structured Resume and save it */
|
|
212
|
+
export async function resumeCreate(payload) {
|
|
213
|
+
return cfRequest("POST", "cliResumeCreate", payload);
|
|
214
|
+
}
|
|
211
215
|
export async function resumeDelete(payload) {
|
|
212
216
|
return cfRequest("POST", "cliResumeDelete", payload);
|
|
213
217
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configurator.d.ts","sourceRoot":"","sources":["../../../src/commands/agent/configurator.ts"],"names":[],"mappings":"AAEA,OAAO,EAA0D,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAI3G,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAKpD,CAAC;AAEF,eAAO,MAAM,SAAS;;;;;
|
|
1
|
+
{"version":3,"file":"configurator.d.ts","sourceRoot":"","sources":["../../../src/commands/agent/configurator.ts"],"names":[],"mappings":"AAEA,OAAO,EAA0D,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAI3G,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAKpD,CAAC;AAEF,eAAO,MAAM,SAAS;;;;;GAmBrB,CAAC;AAEF,eAAO,MAAM,UAAU;;;;;GA+BtB,CAAC;AAEF,wBAAsB,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,CAsEpD;AAED,wBAAsB,mBAAmB,CAAC,OAAO,GAAE,GAAQ,GAAG,OAAO,CAAC;IACpE,gBAAgB,EAAE,WAAW,CAAC;IAC9B,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC,CAiKD"}
|
|
@@ -3,33 +3,27 @@ import pkg from "enquirer";
|
|
|
3
3
|
import { loadConfig, saveConfig, setProviderKey, getProviderKey } from "../../config.js";
|
|
4
4
|
const { prompt } = pkg;
|
|
5
5
|
export const MODEL_CREDIT_COST = {
|
|
6
|
-
"gemini-
|
|
7
|
-
"gemini-
|
|
8
|
-
"gemini-
|
|
9
|
-
"gemini-
|
|
6
|
+
"gemini-2.0-flash-lite-preview-02-05": 0.5,
|
|
7
|
+
"gemini-1.5-flash": 1,
|
|
8
|
+
"gemini-2.0-flash": 1,
|
|
9
|
+
"gemini-1.5-pro": 2,
|
|
10
10
|
};
|
|
11
11
|
export const CV_MODELS = [
|
|
12
12
|
{
|
|
13
|
-
name: `⚡ gemini-
|
|
14
|
-
value: "gemini-
|
|
15
|
-
cost: 0.5,
|
|
16
|
-
careerVivid: true,
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
name: `⚡ gemini-2.5-flash ${chalk.gray("[1 credit/turn — default]")}`,
|
|
20
|
-
value: "gemini-2.5-flash",
|
|
13
|
+
name: `⚡ gemini-2.0-flash ${chalk.gray("[1 credit/turn — default]")}`,
|
|
14
|
+
value: "gemini-2.0-flash",
|
|
21
15
|
cost: 1,
|
|
22
16
|
careerVivid: true,
|
|
23
17
|
},
|
|
24
18
|
{
|
|
25
|
-
name: `🚀 gemini-
|
|
26
|
-
value: "gemini-
|
|
27
|
-
cost:
|
|
19
|
+
name: `🚀 gemini-2.0-flash-lite ${chalk.gray("[0.5 credit/turn — fastest]")}`,
|
|
20
|
+
value: "gemini-2.0-flash-lite-preview-02-05",
|
|
21
|
+
cost: 0.5,
|
|
28
22
|
careerVivid: true,
|
|
29
23
|
},
|
|
30
24
|
{
|
|
31
|
-
name: `🧠 gemini-
|
|
32
|
-
value: "gemini-
|
|
25
|
+
name: `🧠 gemini-1.5-pro ${chalk.gray("[2 credits/turn — deep reasoning]")}`,
|
|
26
|
+
value: "gemini-1.5-pro",
|
|
33
27
|
cost: 2,
|
|
34
28
|
careerVivid: true,
|
|
35
29
|
},
|
|
@@ -15,8 +15,8 @@ export function registerAgentCommand(program) {
|
|
|
15
15
|
.option("--coding", "Enable full coding tool suite (file I/O, shell, search).")
|
|
16
16
|
.option("--resume", "Add resume tools — load and discuss your CareerVivid resume.")
|
|
17
17
|
.option("--jobs", "Add job-hunting tools (default — enabled automatically).")
|
|
18
|
-
.option("--flash", "Use gemini-
|
|
19
|
-
.option("--pro", "Use gemini-
|
|
18
|
+
.option("--flash", "Use gemini-2.0-flash (fast, 1 credit/turn).")
|
|
19
|
+
.option("--pro", "Use gemini-1.5-pro (recommended for complex tasks).")
|
|
20
20
|
.option("--think <budget>", "Enable Gemini thinking mode with the given token budget (e.g. 8192).", parseInt)
|
|
21
21
|
.option("--verbose", "Show thinking tokens in the output (requires --think or --pro).")
|
|
22
22
|
.option("--project <id>", "GCP project ID for Vertex AI mode (uses gcloud ADC, no API key needed).")
|
|
@@ -55,12 +55,12 @@ export function registerAgentCommand(program) {
|
|
|
55
55
|
let thinkingBudget;
|
|
56
56
|
let selectedProvider;
|
|
57
57
|
if (isPro) {
|
|
58
|
-
selectedModel = "gemini-
|
|
59
|
-
thinkingBudget = options.think ??
|
|
58
|
+
selectedModel = "gemini-1.5-pro";
|
|
59
|
+
thinkingBudget = options.think ?? 0;
|
|
60
60
|
selectedProvider = "careervivid";
|
|
61
61
|
}
|
|
62
62
|
else if (isFlash) {
|
|
63
|
-
selectedModel = "gemini-
|
|
63
|
+
selectedModel = "gemini-2.0-flash";
|
|
64
64
|
thinkingBudget = 0;
|
|
65
65
|
selectedProvider = "careervivid";
|
|
66
66
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interview.d.ts","sourceRoot":"","sources":["../../src/commands/interview.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"interview.d.ts","sourceRoot":"","sources":["../../src/commands/interview.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAi1BpC,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAmG/D"}
|
|
@@ -24,6 +24,7 @@ import { readFileSync } from "fs";
|
|
|
24
24
|
import { join, dirname } from "path";
|
|
25
25
|
import { fileURLToPath } from "url";
|
|
26
26
|
import { GoogleGenAI, Modality } from "@google/genai";
|
|
27
|
+
import { OAuth2Client } from "google-auth-library";
|
|
27
28
|
import { getApiKey } from "../config.js";
|
|
28
29
|
import { isApiError, resumeGet } from "../api.js";
|
|
29
30
|
import { createLogger } from "../lib/logger.js";
|
|
@@ -212,7 +213,12 @@ async function getGeminiToken(role) {
|
|
|
212
213
|
if (!res.ok) {
|
|
213
214
|
throw new Error(data?.error || `Token vend failed (${res.status})`);
|
|
214
215
|
}
|
|
215
|
-
return {
|
|
216
|
+
return {
|
|
217
|
+
accessToken: data.accessToken,
|
|
218
|
+
project: data.project,
|
|
219
|
+
location: data.location,
|
|
220
|
+
sessionId: data.sessionId
|
|
221
|
+
};
|
|
216
222
|
}
|
|
217
223
|
// ─── Duration Billing ─────────────────────────────────────────────────────────
|
|
218
224
|
/** Call cliInterviewBill at session end. Returns credit summary for display. */
|
|
@@ -364,10 +370,12 @@ async function runVoiceSession(opts) {
|
|
|
364
370
|
const sessionStart = Date.now();
|
|
365
371
|
// Get Gemini token from Cloud Function
|
|
366
372
|
const connectSpinner = ora(chalk.dim("Connecting to Vivid...")).start();
|
|
367
|
-
let
|
|
373
|
+
let accessToken;
|
|
374
|
+
let project;
|
|
375
|
+
let location;
|
|
368
376
|
let sessionId;
|
|
369
377
|
try {
|
|
370
|
-
({
|
|
378
|
+
({ accessToken, project, location, sessionId } = await getGeminiToken(role));
|
|
371
379
|
log.setSessionId(sessionId);
|
|
372
380
|
log.info("session_start", { role, numQuestions: questions.length, mode: "voice", soxPath });
|
|
373
381
|
}
|
|
@@ -377,7 +385,17 @@ async function runVoiceSession(opts) {
|
|
|
377
385
|
connectSpinner.fail(chalk.red(err.message));
|
|
378
386
|
throw err;
|
|
379
387
|
}
|
|
380
|
-
const
|
|
388
|
+
const authClient = new OAuth2Client();
|
|
389
|
+
authClient.setCredentials({ access_token: accessToken });
|
|
390
|
+
// Initialize the AI client for Vertex AI using the vended short-lived access token
|
|
391
|
+
const ai = new GoogleGenAI({
|
|
392
|
+
vertexai: true,
|
|
393
|
+
project,
|
|
394
|
+
location,
|
|
395
|
+
googleAuthOptions: {
|
|
396
|
+
authClient: authClient
|
|
397
|
+
}
|
|
398
|
+
});
|
|
381
399
|
const systemInstruction = buildSystemPrompt(role, questions, resumeContext);
|
|
382
400
|
const transcript = [];
|
|
383
401
|
let ended = false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jobs.d.ts","sourceRoot":"","sources":["../../src/commands/jobs.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"jobs.d.ts","sourceRoot":"","sources":["../../src/commands/jobs.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAkFpC,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,QAgjBnD"}
|
package/dist/commands/jobs.js
CHANGED
|
@@ -11,7 +11,7 @@ import { resolve } from "path";
|
|
|
11
11
|
import chalk from "chalk";
|
|
12
12
|
import ora from "ora";
|
|
13
13
|
import boxen from "boxen";
|
|
14
|
-
import { isApiError, resumeGet, jobsHunt, jobsCreate, jobsUpdate, jobsList, } from "../api.js";
|
|
14
|
+
import { isApiError, resumeGet, jobsHunt, jobsCreate, jobsUpdate, jobsList, resumesList, generateCoverLetter, listCoverLetters, } from "../api.js";
|
|
15
15
|
import { checkGwsReady, runGwsCommand } from "../utils/gws-runner.js";
|
|
16
16
|
import { printError } from "../output.js";
|
|
17
17
|
import { registerApplyCommand } from "./apply.js";
|
|
@@ -427,6 +427,115 @@ export function registerJobsCommand(program) {
|
|
|
427
427
|
chalk.cyan.underline(sheetUrl), { padding: 1, borderStyle: "round" }));
|
|
428
428
|
}
|
|
429
429
|
});
|
|
430
|
+
// ── cv jobs cover-letter ──────────────────────────────────────────────────
|
|
431
|
+
const clCmd = jobsCmd
|
|
432
|
+
.command("cover-letter")
|
|
433
|
+
.description("Generate and manage AI cover letters tailored to your resume");
|
|
434
|
+
// cv jobs cover-letter create
|
|
435
|
+
clCmd
|
|
436
|
+
.command("create")
|
|
437
|
+
.description("Generate a new AI-powered cover letter")
|
|
438
|
+
.option("-r, --resume-id <id>", "Resume ID to use (defaults to latest)")
|
|
439
|
+
.option("-t, --title <title>", "Target job title")
|
|
440
|
+
.option("-c, --company <name>", "Target company name")
|
|
441
|
+
.option("-d, --jd <text>", "Job description (optional, but recommended)")
|
|
442
|
+
.option("--json", "Output raw JSON")
|
|
443
|
+
.action(async (opts) => {
|
|
444
|
+
const isJson = opts.json ?? process.argv.includes("--json");
|
|
445
|
+
let { resumeId, title, company, jd } = opts;
|
|
446
|
+
// ── Step 1: Resolve missing inputs ────────────────────────────────
|
|
447
|
+
if (!resumeId) {
|
|
448
|
+
const resSpinner = ora("Fetching your resumes…").start();
|
|
449
|
+
const resList = await resumesList();
|
|
450
|
+
if (isApiError(resList)) {
|
|
451
|
+
resSpinner.fail("Failed to fetch resumes.");
|
|
452
|
+
printError(resList.message, undefined, isJson);
|
|
453
|
+
process.exit(1);
|
|
454
|
+
}
|
|
455
|
+
resSpinner.stop();
|
|
456
|
+
if (resList.resumes.length === 0) {
|
|
457
|
+
printError("No resumes found. Upload one to CareerVivid first.", undefined, isJson);
|
|
458
|
+
process.exit(1);
|
|
459
|
+
}
|
|
460
|
+
const { choice } = await prompt([{
|
|
461
|
+
type: "select",
|
|
462
|
+
name: "choice",
|
|
463
|
+
message: "Which resume should we use?",
|
|
464
|
+
choices: resList.resumes.map(r => ({ name: r.title, value: r.id })),
|
|
465
|
+
result(name) { return this.map[name]; }
|
|
466
|
+
}]);
|
|
467
|
+
resumeId = choice;
|
|
468
|
+
}
|
|
469
|
+
if (!title || !company) {
|
|
470
|
+
const inputs = await prompt([
|
|
471
|
+
{ type: "input", name: "title", message: "Job Title:", skip: !!title, initial: title },
|
|
472
|
+
{ type: "input", name: "company", message: "Company Name:", skip: !!company, initial: company }
|
|
473
|
+
]);
|
|
474
|
+
title = title || inputs.title;
|
|
475
|
+
company = company || inputs.company;
|
|
476
|
+
}
|
|
477
|
+
if (!jd) {
|
|
478
|
+
const { jdText } = await prompt([{
|
|
479
|
+
type: "input",
|
|
480
|
+
name: "jdText",
|
|
481
|
+
message: "Paste job description (or press enter for generic):"
|
|
482
|
+
}]);
|
|
483
|
+
jd = jdText || "Professional role matching my profile.";
|
|
484
|
+
}
|
|
485
|
+
// ── Step 2: Generate ──────────────────────────────────────────────
|
|
486
|
+
const spinner = ora(`Generating tailored cover letter for ${chalk.bold(title)} at ${chalk.cyan(company)}…`).start();
|
|
487
|
+
const result = await generateCoverLetter({
|
|
488
|
+
resumeId,
|
|
489
|
+
jobTitle: title,
|
|
490
|
+
companyName: company,
|
|
491
|
+
jobDescription: jd
|
|
492
|
+
});
|
|
493
|
+
if (isApiError(result)) {
|
|
494
|
+
spinner.fail("Generation failed.");
|
|
495
|
+
printError(result.message, undefined, isJson);
|
|
496
|
+
process.exit(1);
|
|
497
|
+
}
|
|
498
|
+
spinner.succeed("Cover letter generated!");
|
|
499
|
+
if (isJson) {
|
|
500
|
+
console.log(JSON.stringify(result));
|
|
501
|
+
return;
|
|
502
|
+
}
|
|
503
|
+
console.log(boxen(chalk.bold.cyan(`Cover Letter: ${result.coverLetter.jobTitle} @ ${result.coverLetter.companyName}`) +
|
|
504
|
+
`\n${chalk.dim("ID: " + result.coverLetter.id)}\n\n` +
|
|
505
|
+
result.coverLetter.content, { padding: 1, borderStyle: "round", borderColor: "cyan" }));
|
|
506
|
+
console.log(chalk.dim(` Saved to CareerVivid (ID: ${result.coverLetter.id})`));
|
|
507
|
+
});
|
|
508
|
+
// cv jobs cover-letter list
|
|
509
|
+
clCmd
|
|
510
|
+
.command("list")
|
|
511
|
+
.description("List your generated cover letters")
|
|
512
|
+
.option("--json", "Output raw JSON")
|
|
513
|
+
.action(async (opts) => {
|
|
514
|
+
const isJson = opts.json ?? process.argv.includes("--json");
|
|
515
|
+
const spinner = ora("Fetching cover letters…").start();
|
|
516
|
+
const result = await listCoverLetters();
|
|
517
|
+
if (isApiError(result)) {
|
|
518
|
+
spinner.fail("Failed to list cover letters.");
|
|
519
|
+
printError(result.message, undefined, isJson);
|
|
520
|
+
process.exit(1);
|
|
521
|
+
}
|
|
522
|
+
const { coverLetters, total } = result;
|
|
523
|
+
spinner.succeed(`Found ${total} cover letter(s)`);
|
|
524
|
+
if (isJson) {
|
|
525
|
+
console.log(JSON.stringify(result));
|
|
526
|
+
return;
|
|
527
|
+
}
|
|
528
|
+
if (total === 0) {
|
|
529
|
+
console.log(chalk.yellow("\n You haven't generated any cover letters yet. Use `cv jobs cover-letter create` to start.\n"));
|
|
530
|
+
return;
|
|
531
|
+
}
|
|
532
|
+
console.log(`\n${chalk.bold(" Your Cover Letters")}\n`);
|
|
533
|
+
coverLetters.forEach((cl, i) => {
|
|
534
|
+
const date = cl.createdAt ? new Date(cl.createdAt).toLocaleDateString() : "";
|
|
535
|
+
console.log(` ${chalk.dim(`${i + 1}.`)} ${chalk.cyan(cl.jobTitle)} ${chalk.dim("@")} ${chalk.bold(cl.companyName)} ${date ? chalk.dim(`· ${date}`) : ""}`);
|
|
536
|
+
});
|
|
537
|
+
console.log();
|
|
538
|
+
});
|
|
430
539
|
// ── cv jobs apply ─────────────────────────────────────────────────────────
|
|
431
540
|
registerApplyCommand(jobsCmd);
|
|
432
541
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resumes.d.ts","sourceRoot":"","sources":["../../src/commands/resumes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAmBpC,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"resumes.d.ts","sourceRoot":"","sources":["../../src/commands/resumes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAmBpC,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,QAiNtD"}
|
package/dist/commands/resumes.js
CHANGED
|
@@ -11,7 +11,47 @@ async function prompt(questions) {
|
|
|
11
11
|
export function registerResumesCommand(program) {
|
|
12
12
|
const resumesCmd = program
|
|
13
13
|
.command("resumes")
|
|
14
|
-
.description("Manage your AI-parsed resumes (list, get, tailor, delete)");
|
|
14
|
+
.description("Manage your AI-parsed resumes (list, get, create, tailor, delete)");
|
|
15
|
+
// ── cv resumes create ────────────────────────────────────────────────────────
|
|
16
|
+
resumesCmd
|
|
17
|
+
.command("create")
|
|
18
|
+
.description("Generate a structured resume from free-form text")
|
|
19
|
+
.option("-t, --title <title>", "Resume title")
|
|
20
|
+
.option("-f, --file <path>", "Local text file to parse")
|
|
21
|
+
.option("-c, --content <text>", "Raw text content to parse")
|
|
22
|
+
.option("--json", "Output raw JSON")
|
|
23
|
+
.action(async (opts) => {
|
|
24
|
+
const isJson = opts.json ?? process.argv.includes("--json");
|
|
25
|
+
let { title, file, content } = opts;
|
|
26
|
+
if (!content && file) {
|
|
27
|
+
const fs = await import("fs");
|
|
28
|
+
content = fs.readFileSync(file, "utf-8");
|
|
29
|
+
}
|
|
30
|
+
if (!content) {
|
|
31
|
+
const { text } = await prompt([{
|
|
32
|
+
type: "input",
|
|
33
|
+
name: "text",
|
|
34
|
+
message: "Paste your raw resume text or job experience details:"
|
|
35
|
+
}]);
|
|
36
|
+
content = text;
|
|
37
|
+
}
|
|
38
|
+
if (!content) {
|
|
39
|
+
printError("Content is required.", undefined, isJson);
|
|
40
|
+
process.exit(1);
|
|
41
|
+
}
|
|
42
|
+
const spinner = ora("AI is parsing and structuring your resume…").start();
|
|
43
|
+
const { resumeCreate } = await import("../api.js");
|
|
44
|
+
const result = await resumeCreate({ title, baseContent: content });
|
|
45
|
+
if (isApiError(result)) {
|
|
46
|
+
spinner.fail("Failed to create resume.");
|
|
47
|
+
printError(result.message, undefined, isJson);
|
|
48
|
+
process.exit(1);
|
|
49
|
+
}
|
|
50
|
+
spinner.succeed(`Resume created: ${result.title} (ID: ${result.resumeId})`);
|
|
51
|
+
if (isJson) {
|
|
52
|
+
console.log(JSON.stringify(result));
|
|
53
|
+
}
|
|
54
|
+
});
|
|
15
55
|
// ── cv resumes list ──────────────────────────────────────────────────────────
|
|
16
56
|
resumesCmd
|
|
17
57
|
.command("list")
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "careervivid",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.33",
|
|
4
4
|
"description": "Official CLI for CareerVivid — AI voice interviews, autonomous job applications, resume editing, and portfolio publishing from your terminal",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
"chalk": "^5.3.0",
|
|
28
28
|
"commander": "^12.1.0",
|
|
29
29
|
"enquirer": "^2.4.1",
|
|
30
|
+
"google-auth-library": "^10.6.2",
|
|
30
31
|
"gradient-string": "^3.0.0",
|
|
31
32
|
"mermaid": "11.14.0",
|
|
32
33
|
"open": "^10.1.0",
|