bluekiwi 0.2.0 → 0.2.3

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.
@@ -1,9 +1,10 @@
1
- import { existsSync, mkdirSync, writeFileSync, readFileSync, rmSync } from "fs";
1
+ import { existsSync, mkdirSync, writeFileSync, readFileSync, readdirSync, rmSync, } from "fs";
2
2
  import { homedir } from "os";
3
3
  import { join } from "path";
4
4
  const BASE = join(homedir(), ".claude");
5
5
  const SKILLS_DIR = join(BASE, "skills");
6
- const MCP_CONFIG = join(BASE, "mcp.json");
6
+ // Claude Code reads MCP config from ~/.claude.json (top-level mcpServers key)
7
+ const MCP_CONFIG = join(homedir(), ".claude.json");
7
8
  export class ClaudeCodeAdapter {
8
9
  name = "claude-code";
9
10
  displayName = "Claude Code";
@@ -38,10 +39,11 @@ export class ClaudeCodeAdapter {
38
39
  writeFileSync(MCP_CONFIG, JSON.stringify(existing, null, 2));
39
40
  }
40
41
  uninstall() {
41
- for (const name of ["bk-start", "bk-next", "bk-status", "bk-rewind"]) {
42
- const dir = join(SKILLS_DIR, name);
43
- if (existsSync(dir)) {
44
- rmSync(dir, { recursive: true, force: true });
42
+ if (existsSync(SKILLS_DIR)) {
43
+ for (const entry of readdirSync(SKILLS_DIR)) {
44
+ if (entry.startsWith("bk-")) {
45
+ rmSync(join(SKILLS_DIR, entry), { recursive: true, force: true });
46
+ }
45
47
  }
46
48
  }
47
49
  if (existsSync(MCP_CONFIG)) {
@@ -1,4 +1,4 @@
1
- import { existsSync, mkdirSync, writeFileSync, readFileSync, rmSync } from "fs";
1
+ import { existsSync, mkdirSync, writeFileSync, readFileSync, readdirSync, rmSync, } from "fs";
2
2
  import { homedir } from "os";
3
3
  import { join } from "path";
4
4
  const BASE = join(homedir(), ".codex");
@@ -44,10 +44,11 @@ export class CodexAdapter {
44
44
  const existing = readFileSync(MCP_CONFIG, "utf8");
45
45
  writeFileSync(MCP_CONFIG, existing.replace(/\n?\[mcp_servers\.bluekiwi\][\s\S]*?(?=\n\[|$)/g, ""));
46
46
  }
47
- for (const name of ["bk-start", "bk-next", "bk-status", "bk-rewind"]) {
48
- const dir = join(SKILLS_DIR, name);
49
- if (existsSync(dir)) {
50
- rmSync(dir, { recursive: true, force: true });
47
+ if (existsSync(SKILLS_DIR)) {
48
+ for (const entry of readdirSync(SKILLS_DIR)) {
49
+ if (entry.startsWith("bk-")) {
50
+ rmSync(join(SKILLS_DIR, entry), { recursive: true, force: true });
51
+ }
51
52
  }
52
53
  }
53
54
  }
@@ -1,4 +1,4 @@
1
- import { existsSync, mkdirSync, writeFileSync, readFileSync, rmSync } from "fs";
1
+ import { existsSync, mkdirSync, writeFileSync, readFileSync, readdirSync, rmSync, } from "fs";
2
2
  import { homedir } from "os";
3
3
  import { join } from "path";
4
4
  const BASE = join(homedir(), ".gemini");
@@ -38,10 +38,11 @@ export class GeminiCliAdapter {
38
38
  writeFileSync(MCP_CONFIG, JSON.stringify(existing, null, 2));
39
39
  }
40
40
  uninstall() {
41
- for (const name of ["bk-start", "bk-next", "bk-status", "bk-rewind"]) {
42
- const dir = join(SKILLS_DIR, name);
43
- if (existsSync(dir)) {
44
- rmSync(dir, { recursive: true, force: true });
41
+ if (existsSync(SKILLS_DIR)) {
42
+ for (const entry of readdirSync(SKILLS_DIR)) {
43
+ if (entry.startsWith("bk-")) {
44
+ rmSync(join(SKILLS_DIR, entry), { recursive: true, force: true });
45
+ }
45
46
  }
46
47
  }
47
48
  if (existsSync(MCP_CONFIG)) {
@@ -1,4 +1,4 @@
1
- import { existsSync, mkdirSync, writeFileSync, readFileSync, rmSync } from "fs";
1
+ import { existsSync, mkdirSync, writeFileSync, readFileSync, readdirSync, rmSync, } from "fs";
2
2
  import { homedir } from "os";
3
3
  import { join } from "path";
4
4
  const BASE = join(homedir(), ".openclaw");
@@ -38,10 +38,11 @@ export class OpenClawAdapter {
38
38
  writeFileSync(MCP_CONFIG, JSON.stringify(existing, null, 2));
39
39
  }
40
40
  uninstall() {
41
- for (const name of ["bk-start", "bk-next", "bk-status", "bk-rewind"]) {
42
- const dir = join(SKILLS_DIR, name);
43
- if (existsSync(dir)) {
44
- rmSync(dir, { recursive: true, force: true });
41
+ if (existsSync(SKILLS_DIR)) {
42
+ for (const entry of readdirSync(SKILLS_DIR)) {
43
+ if (entry.startsWith("bk-")) {
44
+ rmSync(join(SKILLS_DIR, entry), { recursive: true, force: true });
45
+ }
45
46
  }
46
47
  }
47
48
  if (existsSync(MCP_CONFIG)) {
@@ -1,4 +1,4 @@
1
- import { existsSync, mkdirSync, writeFileSync, readFileSync, rmSync } from "fs";
1
+ import { existsSync, mkdirSync, writeFileSync, readFileSync, readdirSync, rmSync, } from "fs";
2
2
  import { homedir } from "os";
3
3
  import { join } from "path";
4
4
  const BASE = join(homedir(), ".opencode");
@@ -38,10 +38,11 @@ export class OpenCodeAdapter {
38
38
  writeFileSync(MCP_CONFIG, JSON.stringify(existing, null, 2));
39
39
  }
40
40
  uninstall() {
41
- for (const name of ["bk-start", "bk-next", "bk-status", "bk-rewind"]) {
42
- const dir = join(SKILLS_DIR, name);
43
- if (existsSync(dir)) {
44
- rmSync(dir, { recursive: true, force: true });
41
+ if (existsSync(SKILLS_DIR)) {
42
+ for (const entry of readdirSync(SKILLS_DIR)) {
43
+ if (entry.startsWith("bk-")) {
44
+ rmSync(join(SKILLS_DIR, entry), { recursive: true, force: true });
45
+ }
45
46
  }
46
47
  }
47
48
  if (existsSync(MCP_CONFIG)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bluekiwi",
3
- "version": "0.2.0",
3
+ "version": "0.2.3",
4
4
  "description": "BlueKiwi CLI — install MCP client and skills into your agent runtime",
5
5
  "license": "MIT",
6
6
  "repository": {