@autodev/codebase 0.0.2 → 0.0.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.
package/README.md CHANGED
@@ -3,9 +3,8 @@
3
3
  # @autodev/codebase
4
4
 
5
5
  <div align="center">
6
- <img src="src/images/image1.png" width="300" alt="Image 1" style="margin: 0 10px;" />
7
- <img src="src/images/image2.png" width="200" alt="Image 2" style="margin: 0 10px;" />
8
- <img src="src/images/image3.png" height="150" alt="Image 3" style="margin: 0 10px;" />
6
+ <img src="src/images/image2.png" alt="Image 2" style="display: inline-block; width: 350px; margin: 0 10px;" />
7
+ <img src="src/images/image3.png" alt="Image 3" style="display: inline-block; width: 200px; margin: 0 10px;" />
9
8
  </div>
10
9
 
11
10
  <br />
@@ -63,8 +62,13 @@ curl http://localhost:11434/api/tags
63
62
  # Check Qdrant
64
63
  curl http://localhost:6333/collections
65
64
  ```
66
- ### 4. Install project locally
65
+ ### 4. Install Autodev-codebase
67
66
 
67
+ ```bash
68
+ npm install -g @autodev/codebase
69
+ ```
70
+
71
+ Alternatively, you can install it locally:
68
72
  ```
69
73
  git clone https://github.com/anrgct/autodev-codebase
70
74
  cd autodev-codebase
@@ -116,6 +120,22 @@ Configure your IDE to connect to the MCP server:
116
120
  }
117
121
  ```
118
122
 
123
+ For clients that do not support SSE MCP, you can use the following configuration:
124
+
125
+ ```json
126
+ {
127
+ "mcpServers": {
128
+ "codebase": {
129
+ "command": "codebase",
130
+ "args": [
131
+ "stdio-adapter",
132
+ "--server-url=http://localhost:3001/sse"
133
+ ]
134
+ }
135
+ }
136
+ }
137
+ ```
138
+
119
139
  ### Library Usage
120
140
 
121
141
  #### Node.js Usage
package/dist/cli.js CHANGED
@@ -15,12 +15,17 @@ global.self = global;
15
15
  global.window = global;
16
16
  global.document = { createElement: () => ({}), addEventListener: () => {}, removeEventListener: () => {} };
17
17
  // Fix for Ink color detection - provide proper navigator object for Node.js
18
- global.navigator = {
19
- userAgent: 'Node.js',
20
- userAgentData: {
21
- brands: [{ brand: 'Chromium', version: '100' }]
22
- }
23
- };
18
+ Object.defineProperty(global, 'navigator', {
19
+ value: {
20
+ userAgent: 'Node.js',
21
+ userAgentData: {
22
+ brands: [{ brand: 'Chromium', version: '100' }]
23
+ }
24
+ },
25
+ writable: true,
26
+ configurable: true
27
+ });
28
+
24
29
  global.HTMLElement = class HTMLElement {};
25
30
  global.Element = class Element {};
26
31
  global.addEventListener = () => {};
@@ -30,6 +35,8 @@ global.__dirname = dirname(fileURLToPath(import.meta.url));
30
35
  process.env['NODE_ENV'] = process.env['NODE_ENV'] || 'production';
31
36
  process.env['REACT_EDITOR'] = 'none';
32
37
  process.env['DISABLE_REACT_DEVTOOLS'] = 'true';
38
+ // Prevent Ink from loading react-devtools-core
39
+ process.env['DEV'] = 'false';
33
40
 
34
41
  process.argv = [process.argv[0], '${indexPath}', ...${JSON.stringify(cliArgs)}];
35
42
  await import('${indexPath}').then(({ main }) => main());
@@ -41,7 +48,8 @@ const child = spawn('node', ['--input-type=module', '-e', command], {
41
48
  ...process.env,
42
49
  NODE_ENV: process.env['NODE_ENV'] || 'production',
43
50
  REACT_EDITOR: 'none',
44
- DISABLE_REACT_DEVTOOLS: 'true'
51
+ DISABLE_REACT_DEVTOOLS: 'true',
52
+ DEV: 'false'
45
53
  }
46
54
  });
47
55
  child.on('exit', (code) => {
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sources":["../src/cli.ts"],"sourcesContent":["import { spawn } from 'child_process';\nimport { fileURLToPath } from 'url';\nimport path from 'path';\n\n// Get the directory of the current module\nconst __dirname = path.dirname(fileURLToPath(import.meta.url));\nconst indexPath = path.join(__dirname, 'index.js');\n\n// Build the command with polyfills\nconst cliArgs = process.argv.slice(2);\nconst command = `\nimport { fileURLToPath } from 'url';\nimport { dirname } from 'path';\nglobal.self = global;\nglobal.window = global;\nglobal.document = { createElement: () => ({}), addEventListener: () => {}, removeEventListener: () => {} };\n// Fix for Ink color detection - provide proper navigator object for Node.js\nglobal.navigator = {\n userAgent: 'Node.js',\n userAgentData: {\n brands: [{ brand: 'Chromium', version: '100' }]\n }\n};\nglobal.HTMLElement = class HTMLElement {};\nglobal.Element = class Element {};\nglobal.addEventListener = () => {};\nglobal.removeEventListener = () => {};\n// Set up __dirname for ESM modules\nglobal.__dirname = dirname(fileURLToPath(import.meta.url));\nprocess.env['NODE_ENV'] = process.env['NODE_ENV'] || 'production';\nprocess.env['REACT_EDITOR'] = 'none';\nprocess.env['DISABLE_REACT_DEVTOOLS'] = 'true';\n\nprocess.argv = [process.argv[0], '${indexPath}', ...${JSON.stringify(cliArgs)}];\nawait import('${indexPath}').then(({ main }) => main());\n`;\n\n// Execute the command with Node.js\nconst child = spawn('node', ['--input-type=module', '-e', command], {\n stdio: 'inherit',\n env: {\n ...process.env,\n NODE_ENV: process.env['NODE_ENV'] || 'production',\n REACT_EDITOR: 'none',\n DISABLE_REACT_DEVTOOLS: 'true'\n }\n});\n\nchild.on('exit', (code) => {\n process.exit(code || 0);\n});\n\nchild.on('error', (error) => {\n console.error('Failed to start CLI:', error);\n process.exit(1);\n});\n"],"names":[],"mappings":";;;;;AAIA;AACA,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC9D,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC;AAElD;AACA,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;AACrC,MAAM,OAAO,GAAG;;;;;;;;;;;;;;;;;;;;;;;AAuBoB,kCAAA,EAAA,SAAS,SAAS,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAA;gBAC7D,SAAS,CAAA;CACxB;AAED;AACA,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,qBAAqB,EAAE,IAAI,EAAE,OAAO,CAAC,EAAE;AAClE,IAAA,KAAK,EAAE,SAAS;AAChB,IAAA,GAAG,EAAE;QACH,GAAG,OAAO,CAAC,GAAG;QACd,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,YAAY;AACjD,QAAA,YAAY,EAAE,MAAM;AACpB,QAAA,sBAAsB,EAAE;AACzB;AACF,CAAA,CAAC;AAEF,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,KAAI;AACxB,IAAA,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC;AACzB,CAAC,CAAC;AAEF,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,KAAI;AAC1B,IAAA,OAAO,CAAC,KAAK,CAAC,sBAAsB,EAAE,KAAK,CAAC;AAC5C,IAAA,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;AACjB,CAAC,CAAC"}
1
+ {"version":3,"file":"cli.js","sources":["../src/cli.ts"],"sourcesContent":["import { spawn } from 'child_process';\nimport { fileURLToPath } from 'url';\nimport path from 'path';\n\n// Get the directory of the current module\nconst __dirname = path.dirname(fileURLToPath(import.meta.url));\nconst indexPath = path.join(__dirname, 'index.js');\n\n// Build the command with polyfills\nconst cliArgs = process.argv.slice(2);\nconst command = `\nimport { fileURLToPath } from 'url';\nimport { dirname } from 'path';\nglobal.self = global;\nglobal.window = global;\nglobal.document = { createElement: () => ({}), addEventListener: () => {}, removeEventListener: () => {} };\n// Fix for Ink color detection - provide proper navigator object for Node.js\nObject.defineProperty(global, 'navigator', {\n value: {\n userAgent: 'Node.js',\n userAgentData: {\n brands: [{ brand: 'Chromium', version: '100' }]\n }\n },\n writable: true,\n configurable: true\n});\n\nglobal.HTMLElement = class HTMLElement {};\nglobal.Element = class Element {};\nglobal.addEventListener = () => {};\nglobal.removeEventListener = () => {};\n// Set up __dirname for ESM modules\nglobal.__dirname = dirname(fileURLToPath(import.meta.url));\nprocess.env['NODE_ENV'] = process.env['NODE_ENV'] || 'production';\nprocess.env['REACT_EDITOR'] = 'none';\nprocess.env['DISABLE_REACT_DEVTOOLS'] = 'true';\n// Prevent Ink from loading react-devtools-core\nprocess.env['DEV'] = 'false';\n\nprocess.argv = [process.argv[0], '${indexPath}', ...${JSON.stringify(cliArgs)}];\nawait import('${indexPath}').then(({ main }) => main());\n`;\n\n// Execute the command with Node.js\nconst child = spawn('node', ['--input-type=module', '-e', command], {\n stdio: 'inherit',\n env: {\n ...process.env,\n NODE_ENV: process.env['NODE_ENV'] || 'production',\n REACT_EDITOR: 'none',\n DISABLE_REACT_DEVTOOLS: 'true',\n DEV: 'false'\n }\n});\n\nchild.on('exit', (code) => {\n process.exit(code || 0);\n});\n\nchild.on('error', (error) => {\n console.error('Failed to start CLI:', error);\n process.exit(1);\n});\n"],"names":[],"mappings":";;;;;AAIA;AACA,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC9D,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC;AAElD;AACA,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;AACrC,MAAM,OAAO,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BoB,kCAAA,EAAA,SAAS,SAAS,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAA;gBAC7D,SAAS,CAAA;CACxB;AAED;AACA,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,qBAAqB,EAAE,IAAI,EAAE,OAAO,CAAC,EAAE;AAClE,IAAA,KAAK,EAAE,SAAS;AAChB,IAAA,GAAG,EAAE;QACH,GAAG,OAAO,CAAC,GAAG;QACd,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,YAAY;AACjD,QAAA,YAAY,EAAE,MAAM;AACpB,QAAA,sBAAsB,EAAE,MAAM;AAC9B,QAAA,GAAG,EAAE;AACN;AACF,CAAA,CAAC;AAEF,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,KAAI;AACxB,IAAA,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC;AACzB,CAAC,CAAC;AAEF,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,KAAI;AAC1B,IAAA,OAAO,CAAC,KAAK,CAAC,sBAAsB,EAAE,KAAK,CAAC;AAC5C,IAAA,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;AACjB,CAAC,CAAC"}