claudia-mentor 0.2.0 → 0.2.1
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/package.json +1 -1
- package/scripts/postinstall.js +79 -29
package/package.json
CHANGED
package/scripts/postinstall.js
CHANGED
|
@@ -1,31 +1,81 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
${
|
|
23
|
-
|
|
24
|
-
${
|
|
25
|
-
${
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
`
|
|
3
|
+
// Colors (matching Claude Code's block-character style)
|
|
4
|
+
const v = "\x1b[31m"; // vermillion
|
|
5
|
+
const p = "\x1b[38;5;203m"; // lighter vermillion/coral
|
|
6
|
+
const d2 = "\x1b[38;5;52m"; // dark red
|
|
7
|
+
const w = "\x1b[37m"; // white
|
|
8
|
+
const d = "\x1b[2m"; // dim
|
|
9
|
+
const b = "\x1b[1m"; // bold
|
|
10
|
+
const r = "\x1b[0m"; // reset
|
|
11
|
+
const hide = "\x1b[?25l"; // hide cursor
|
|
12
|
+
const show = "\x1b[?25h"; // show cursor
|
|
13
|
+
|
|
14
|
+
const version = require('../package.json').version;
|
|
15
|
+
|
|
16
|
+
// Claudia's icon - pixel art using block characters
|
|
17
|
+
// A small geometric "C" shape with a sparkle/star accent
|
|
18
|
+
const icon = [
|
|
19
|
+
` ${p}*${r}`,
|
|
20
|
+
` ${v}│${r}`,
|
|
21
|
+
` ${v}██████${r}`,
|
|
22
|
+
` ${v}██${r}${d2}██${r}${v}██${r}`,
|
|
23
|
+
` ${v}██${r}`,
|
|
24
|
+
` ${v}██${r}${d2}██${r}${v}██${r}`,
|
|
25
|
+
` ${v}██████${r}`,
|
|
26
|
+
];
|
|
27
|
+
|
|
28
|
+
const lines = [
|
|
29
|
+
...icon,
|
|
30
|
+
``,
|
|
31
|
+
` ${w}${b}Claudia${r} ${d}v${version}${r}`,
|
|
32
|
+
` ${d}The senior dev you don't have.${r}`,
|
|
33
|
+
``,
|
|
34
|
+
` ${d}Commands:${r}`,
|
|
35
|
+
` ${w}/claudia-mentor:claudia${r} ${d}ask anything${r}`,
|
|
36
|
+
` ${w}/claudia-mentor:claudia-explain${r} ${d}explain the code${r}`,
|
|
37
|
+
` ${w}/claudia-mentor:claudia-review${r} ${d}catch bugs${r}`,
|
|
38
|
+
` ${w}/claudia-mentor:claudia-why${r} ${d}why this stack${r}`,
|
|
39
|
+
` ${w}/claudia-mentor:claudia-health${r} ${d}project audit${r}`,
|
|
40
|
+
``,
|
|
41
|
+
` ${d}7 hooks. 10 knowledge domains.${r}`,
|
|
42
|
+
` ${d}She remembers your stack across sessions.${r}`,
|
|
43
|
+
``,
|
|
44
|
+
` ${d}Docs:${r} ${w}https://getclaudia.dev${r}`,
|
|
45
|
+
` ${d}Source:${r} ${w}https://github.com/reganomalley/claudia${r}`,
|
|
46
|
+
``,
|
|
47
|
+
` ${d}Every Claude needs a Claudia.${r}`,
|
|
48
|
+
``,
|
|
49
|
+
];
|
|
50
|
+
|
|
51
|
+
async function sleep(ms) {
|
|
52
|
+
return new Promise(resolve => setTimeout(resolve, ms));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
async function animate() {
|
|
56
|
+
process.stdout.write(hide + '\n');
|
|
57
|
+
|
|
58
|
+
// Draw icon with slightly slower timing
|
|
59
|
+
for (let i = 0; i < icon.length; i++) {
|
|
60
|
+
process.stdout.write(lines[i] + '\n');
|
|
61
|
+
await sleep(50);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
await sleep(150);
|
|
65
|
+
|
|
66
|
+
// Rest cascades in faster
|
|
67
|
+
for (let i = icon.length; i < lines.length; i++) {
|
|
68
|
+
process.stdout.write(lines[i] + '\n');
|
|
69
|
+
await sleep(30);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
process.stdout.write(show);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
animate().catch(() => {
|
|
76
|
+
process.stdout.write(show);
|
|
77
|
+
console.log(lines.join('\n'));
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
process.on('exit', () => process.stdout.write(show));
|
|
81
|
+
process.on('SIGINT', () => { process.stdout.write(show); process.exit(); });
|