@getkrafter/resume-toolkit 1.0.5 → 1.1.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/dist/bin/cli.js +58 -1
- package/dist/bin/cli.js.map +1 -1
- package/package.json +1 -1
- package/skills/score/SKILL.md +9 -17
- package/skills/tailor/SKILL.md +8 -16
package/dist/bin/cli.js
CHANGED
|
@@ -1,4 +1,61 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { startServer } from '../mcp/server.js';
|
|
3
|
-
|
|
3
|
+
import { scoreResume } from '../lib/resume-scorer.js';
|
|
4
|
+
import { scoreATS } from '../lib/ats-scorer.js';
|
|
5
|
+
const args = process.argv.slice(2);
|
|
6
|
+
const command = args[0];
|
|
7
|
+
if (command === 'score') {
|
|
8
|
+
const resumeFile = getFlag(args, '--resume');
|
|
9
|
+
const jdFile = getFlag(args, '--jd');
|
|
10
|
+
if (!resumeFile) {
|
|
11
|
+
console.error('Usage: resume-toolkit score --resume <file> [--jd <file>]');
|
|
12
|
+
process.exit(1);
|
|
13
|
+
}
|
|
14
|
+
const fs = await import('node:fs');
|
|
15
|
+
const resumeText = fs.readFileSync(resumeFile, 'utf-8');
|
|
16
|
+
const jdText = jdFile ? fs.readFileSync(jdFile, 'utf-8') : undefined;
|
|
17
|
+
const resumeData = parseRawText(resumeText);
|
|
18
|
+
const result = scoreResume(resumeData, jdText);
|
|
19
|
+
console.log(JSON.stringify(result, null, 2));
|
|
20
|
+
}
|
|
21
|
+
else if (command === 'ats') {
|
|
22
|
+
const resumeFile = getFlag(args, '--resume');
|
|
23
|
+
const jdFile = getFlag(args, '--jd');
|
|
24
|
+
if (!resumeFile || !jdFile) {
|
|
25
|
+
console.error('Usage: resume-toolkit ats --resume <file> --jd <file>');
|
|
26
|
+
process.exit(1);
|
|
27
|
+
}
|
|
28
|
+
const fs = await import('node:fs');
|
|
29
|
+
const resumeText = fs.readFileSync(resumeFile, 'utf-8');
|
|
30
|
+
const jdText = fs.readFileSync(jdFile, 'utf-8');
|
|
31
|
+
const result = scoreATS(resumeText, jdText);
|
|
32
|
+
console.log(JSON.stringify(result, null, 2));
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
// Default: start MCP server
|
|
36
|
+
startServer();
|
|
37
|
+
}
|
|
38
|
+
function getFlag(args, flag) {
|
|
39
|
+
const idx = args.indexOf(flag);
|
|
40
|
+
return idx !== -1 && idx + 1 < args.length ? args[idx + 1] : undefined;
|
|
41
|
+
}
|
|
42
|
+
function parseRawText(text) {
|
|
43
|
+
const lines = text.split('\n');
|
|
44
|
+
const bullets = [];
|
|
45
|
+
const sections = [];
|
|
46
|
+
for (const line of lines) {
|
|
47
|
+
const trimmed = line.trim();
|
|
48
|
+
if (!trimmed)
|
|
49
|
+
continue;
|
|
50
|
+
if (/^\s*[-*•]\s+/.test(line) || /^\s*\d+[.)]\s+/.test(line)) {
|
|
51
|
+
bullets.push(trimmed.replace(/^[-*•]\s+/, '').replace(/^\d+[.)]\s+/, ''));
|
|
52
|
+
}
|
|
53
|
+
else if (trimmed.length < 50 &&
|
|
54
|
+
(trimmed === trimmed.toUpperCase() || /^[A-Z][a-z]/.test(trimmed)) &&
|
|
55
|
+
!/^\s*[-*•]|\d+[.)]/.test(trimmed)) {
|
|
56
|
+
sections.push(trimmed.toLowerCase());
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return { rawText: text, bullets, sections };
|
|
60
|
+
}
|
|
4
61
|
//# sourceMappingURL=cli.js.map
|
package/dist/bin/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/bin/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/bin/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,MA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CAAC,OAAO;YAAE,SAAS;QAEvB,IAAI,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;YAC7D,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC,CAAC;QAC5E,CAAC;aAAM,IACL,OAAO,CAAC,MAAM,GAAG,EAAE;YACnB,CAAC,OAAO,KAAK,OAAO,CAAC,WAAW,EAAE,IAAI,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAClE,CAAC,mBAAmB,CAAC,IAAI,CAAC,OAAO,CAAC,EAClC,CAAC;YACD,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;QACvC,CAAC;IACH,CAAC;IAED,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;AAC9C,CAAC"}
|
package/package.json
CHANGED
package/skills/score/SKILL.md
CHANGED
|
@@ -91,29 +91,21 @@ Or for Krafter resumes, call `score_krafter_resume`:
|
|
|
91
91
|
}
|
|
92
92
|
```
|
|
93
93
|
|
|
94
|
-
**Option B —
|
|
94
|
+
**Option B — CLI** (no MCP server needed):
|
|
95
95
|
|
|
96
|
-
|
|
96
|
+
1. Write the resume text to a temp file (e.g., `/tmp/resume.txt`).
|
|
97
|
+
2. If a JD was provided, write it to another temp file (e.g., `/tmp/jd.txt`).
|
|
98
|
+
3. Run:
|
|
97
99
|
|
|
98
100
|
```bash
|
|
99
|
-
|
|
100
|
-
|
|
101
|
+
# Without JD:
|
|
102
|
+
npx @getkrafter/resume-toolkit score --resume /tmp/resume.txt
|
|
101
103
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
const lines = resumeText.split('\n');
|
|
106
|
-
const bullets = lines.filter(l => /^\s*[-*•]|\d+[.)]/.test(l)).map(l => l.replace(/^\s*[-*•]\s*|\d+[.)]\s*/, '').trim());
|
|
107
|
-
const sections = lines.filter(l => l.trim().length < 50 && l.trim().length > 0 && !(/^\s*[-*•]|\d+[.)]/.test(l)) && (l.trim() === l.trim().toUpperCase() || /^[A-Z][a-z]/.test(l.trim()))).map(l => l.trim().toLowerCase());
|
|
108
|
-
|
|
109
|
-
const result = scoreResume({ rawText: resumeText, bullets, sections }, jdText || undefined);
|
|
110
|
-
console.log(JSON.stringify(result, null, 2));
|
|
111
|
-
" <<< ""
|
|
104
|
+
# With JD:
|
|
105
|
+
npx @getkrafter/resume-toolkit score --resume /tmp/resume.txt --jd /tmp/jd.txt
|
|
112
106
|
```
|
|
113
107
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
If `@getkrafter/resume-toolkit` is not installed as a dependency, install it first: `npm install @getkrafter/resume-toolkit`
|
|
108
|
+
The output is a JSON `ResumeScore` object. Parse it and present results per Step 6.
|
|
117
109
|
|
|
118
110
|
---
|
|
119
111
|
|
package/skills/tailor/SKILL.md
CHANGED
|
@@ -67,28 +67,20 @@ For pasted/file resumes:
|
|
|
67
67
|
For Krafter resumes:
|
|
68
68
|
1. `score_krafter_resume` with `{ id, jdText }` -- returns the full `ResumeScore` including the embedded `ATSResult`.
|
|
69
69
|
|
|
70
|
-
**Option B —
|
|
70
|
+
**Option B — CLI** (no MCP server needed):
|
|
71
71
|
|
|
72
|
-
|
|
72
|
+
1. Write the resume text to `/tmp/resume.txt` and the JD to `/tmp/jd.txt`.
|
|
73
|
+
2. Run both commands:
|
|
73
74
|
|
|
74
75
|
```bash
|
|
75
|
-
|
|
76
|
-
|
|
76
|
+
# Full score with ATS:
|
|
77
|
+
npx @getkrafter/resume-toolkit score --resume /tmp/resume.txt --jd /tmp/jd.txt
|
|
77
78
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
const lines = resumeText.split('\n');
|
|
82
|
-
const bullets = lines.filter(l => /^\s*[-*•]|\d+[.)]/.test(l)).map(l => l.replace(/^\s*[-*•]\s*|\d+[.)]\s*/, '').trim());
|
|
83
|
-
const sections = lines.filter(l => l.trim().length < 50 && l.trim().length > 0 && !(/^\s*[-*•]|\d+[.)]/.test(l)) && (l.trim() === l.trim().toUpperCase() || /^[A-Z][a-z]/.test(l.trim()))).map(l => l.trim().toLowerCase());
|
|
84
|
-
|
|
85
|
-
const atsResult = scoreATS(resumeText, jdText);
|
|
86
|
-
const scoreResult = scoreResume({ rawText: resumeText, bullets, sections }, jdText);
|
|
87
|
-
console.log(JSON.stringify({ atsResult, scoreResult }, null, 2));
|
|
88
|
-
" <<< ""
|
|
79
|
+
# Standalone ATS analysis:
|
|
80
|
+
npx @getkrafter/resume-toolkit ats --resume /tmp/resume.txt --jd /tmp/jd.txt
|
|
89
81
|
```
|
|
90
82
|
|
|
91
|
-
|
|
83
|
+
Parse the JSON output from each command and continue to Step 5.
|
|
92
84
|
|
|
93
85
|
### Step 5 -- Gap Analysis
|
|
94
86
|
|