feinai 0.6.0 → 0.6.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 +3 -1
- package/src/cli.ts +1 -1
- package/src/postinstall.ts +32 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "feinai",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "Task & spec manager for AI agents — parallel worktrees, live dashboard, SDD skills",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"scripts": {
|
|
11
11
|
"dev": "bun src/cli.ts",
|
|
12
12
|
"test": "bun test",
|
|
13
|
+
"postinstall": "bun src/postinstall.ts",
|
|
13
14
|
"build": "bun build src/cli.ts --compile --outfile dist/feinai",
|
|
14
15
|
"build:linux-x64": "bun build src/cli.ts --compile --target=bun-linux-x64 --outfile dist/feinai-linux-x64",
|
|
15
16
|
"build:linux-arm64": "bun build src/cli.ts --compile --target=bun-linux-arm64 --outfile dist/feinai-linux-arm64",
|
|
@@ -41,6 +42,7 @@
|
|
|
41
42
|
},
|
|
42
43
|
"files": [
|
|
43
44
|
"src/*.ts",
|
|
45
|
+
"src/*.sh",
|
|
44
46
|
"src/*.html",
|
|
45
47
|
"src/*.sh",
|
|
46
48
|
"README.md",
|
package/src/cli.ts
CHANGED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
#!/usr/bin/env bun
|
|
2
|
+
// Runs after bun install -g feinai
|
|
3
|
+
// Copies feinai skills to opencode agents dir if opencode is configured
|
|
4
|
+
|
|
5
|
+
import { existsSync, mkdirSync, copyFileSync, readdirSync } from "node:fs";
|
|
6
|
+
import { join, dirname } from "node:path";
|
|
7
|
+
import { homedir } from "node:os";
|
|
8
|
+
import { fileURLToPath } from "node:url";
|
|
9
|
+
|
|
10
|
+
const home = homedir();
|
|
11
|
+
const openCodeAgentsDir = join(home, ".config", "opencode", "agents");
|
|
12
|
+
const skillsDir = join(dirname(fileURLToPath(import.meta.url)), "..", "skills");
|
|
13
|
+
|
|
14
|
+
// Only run if opencode is configured
|
|
15
|
+
if (!existsSync(join(home, ".config", "opencode"))) process.exit(0);
|
|
16
|
+
|
|
17
|
+
if (!existsSync(openCodeAgentsDir)) mkdirSync(openCodeAgentsDir, { recursive: true });
|
|
18
|
+
|
|
19
|
+
let copied = 0;
|
|
20
|
+
for (const skill of readdirSync(skillsDir)) {
|
|
21
|
+
if (!skill.startsWith("feinai-")) continue;
|
|
22
|
+
const src = join(skillsDir, skill, "SKILL.md");
|
|
23
|
+
const dst = join(openCodeAgentsDir, `${skill}.md`);
|
|
24
|
+
if (existsSync(src)) {
|
|
25
|
+
copyFileSync(src, dst);
|
|
26
|
+
copied++;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
if (copied > 0 && process.stdout.isTTY) {
|
|
31
|
+
console.log(`feinai: ${copied} skills copied to opencode agents (${openCodeAgentsDir})`);
|
|
32
|
+
}
|