gitnexushub 0.2.2 → 0.2.4

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.
@@ -26,7 +26,7 @@ async function configure(hubUrl, token) {
26
26
  // Try `claude mcp add` first
27
27
  if (isClaudeOnPath()) {
28
28
  try {
29
- const cmd = `claude mcp add gitnexus --transport streamable-http --url "${mcpUrl}" --header "${headerValue}"`;
29
+ const cmd = `claude mcp add gitnexus --transport http --header "${headerValue}" -s user "${mcpUrl}"`;
30
30
  if (process.platform === 'win32') {
31
31
  execSync(`cmd /c ${cmd}`, { stdio: 'pipe' });
32
32
  }
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * OpenCode Editor Setup
3
3
  *
4
- * Writes MCP config to ~/.config/opencode/config.json (under `mcp` key)
4
+ * Writes MCP config to ~/.config/opencode/opencode.json (under `mcp` key)
5
5
  * Installs skills to ~/.config/opencode/skill/
6
6
  */
7
7
  import type { EditorConfig } from './types.js';
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * OpenCode Editor Setup
3
3
  *
4
- * Writes MCP config to ~/.config/opencode/config.json (under `mcp` key)
4
+ * Writes MCP config to ~/.config/opencode/opencode.json (under `mcp` key)
5
5
  * Installs skills to ~/.config/opencode/skill/
6
6
  */
7
7
  import os from 'os';
@@ -11,13 +11,13 @@ import { readJsonFile, writeJsonFile } from '../utils.js';
11
11
  import { HUB_SKILLS } from '../content.js';
12
12
  function getMcpConfig(hubUrl, token) {
13
13
  return {
14
- type: 'streamable-http',
14
+ type: 'remote',
15
15
  url: `${hubUrl}/mcp`,
16
16
  headers: { Authorization: `Bearer ${token}` },
17
17
  };
18
18
  }
19
19
  async function configure(hubUrl, token) {
20
- const configPath = path.join(os.homedir(), '.config', 'opencode', 'config.json');
20
+ const configPath = path.join(os.homedir(), '.config', 'opencode', 'opencode.json');
21
21
  try {
22
22
  const existing = (await readJsonFile(configPath)) || {};
23
23
  if (!existing.mcp || typeof existing.mcp !== 'object') {
@@ -25,7 +25,7 @@ async function configure(hubUrl, token) {
25
25
  }
26
26
  existing.mcp.gitnexus = getMcpConfig(hubUrl, token);
27
27
  await writeJsonFile(configPath, existing);
28
- return { success: true, message: 'MCP configured in ~/.config/opencode/config.json' };
28
+ return { success: true, message: 'MCP configured in ~/.config/opencode/opencode.json' };
29
29
  }
30
30
  catch (err) {
31
31
  return { success: false, message: `Failed: ${err.message}` };
@@ -48,14 +48,14 @@ async function installSkills(skills) {
48
48
  return installed;
49
49
  }
50
50
  async function unconfigure() {
51
- const configPath = path.join(os.homedir(), '.config', 'opencode', 'config.json');
51
+ const configPath = path.join(os.homedir(), '.config', 'opencode', 'opencode.json');
52
52
  try {
53
53
  const existing = await readJsonFile(configPath);
54
54
  if (existing?.mcp?.gitnexus) {
55
55
  delete existing.mcp.gitnexus;
56
56
  await writeJsonFile(configPath, existing);
57
57
  }
58
- return { success: true, message: 'MCP removed from ~/.config/opencode/config.json' };
58
+ return { success: true, message: 'MCP removed from ~/.config/opencode/opencode.json' };
59
59
  }
60
60
  catch (err) {
61
61
  return { success: false, message: `Failed: ${err.message}` };
@@ -11,8 +11,7 @@ import { readJsonFile, writeJsonFile } from '../utils.js';
11
11
  import { HUB_SKILLS } from '../content.js';
12
12
  function getMcpConfig(hubUrl, token) {
13
13
  return {
14
- type: 'streamable-http',
15
- url: `${hubUrl}/mcp`,
14
+ serverUrl: `${hubUrl}/mcp`,
16
15
  headers: { Authorization: `Bearer ${token}` },
17
16
  };
18
17
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gitnexushub",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "description": "Connect your editor to GitNexus Hub — one command MCP setup + project context",
5
5
  "author": "Abhigyan Patwari",
6
6
  "license": "PolyForm-Noncommercial-1.0.0",