@justmpm/supergrep 0.1.0
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 +174 -0
- package/dist/chunk-4MPFPILM.js +1342 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +10 -0
- package/dist/index.d.ts +39 -0
- package/dist/index.js +10 -0
- package/package.json +60 -0
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
package/dist/cli.js
ADDED
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Server do supergrep
|
|
3
|
+
*
|
|
4
|
+
* Expoe as ferramentas supergrep_find, supergrep_tree e supergrep_replace
|
|
5
|
+
* via protocolo MCP (Model Context Protocol) sobre stdio.
|
|
6
|
+
*
|
|
7
|
+
* Uso:
|
|
8
|
+
* npx supergrep
|
|
9
|
+
* ou: supergrep (se instalado globalmente)
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Inicia o servidor MCP via stdio
|
|
13
|
+
*
|
|
14
|
+
* O servidor escuta comandos JSON-RPC via stdin e responde via stdout.
|
|
15
|
+
* Logs de diagnostico vao para stderr (NUNCA para stdout).
|
|
16
|
+
*/
|
|
17
|
+
declare function startMcpServer(): Promise<void>;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* supergrep — @justmpm/supergrep
|
|
21
|
+
*
|
|
22
|
+
* MCP server para busca estrutural de codigo com AST Grep.
|
|
23
|
+
* Expoe as ferramentas:
|
|
24
|
+
* - supergrep_find: busca estrutural
|
|
25
|
+
* - supergrep_tree: exploracao da AST
|
|
26
|
+
* - supergrep_replace: preview de substituicao
|
|
27
|
+
*
|
|
28
|
+
* Uso como MCP server:
|
|
29
|
+
* npx @justmpm/supergrep
|
|
30
|
+
*
|
|
31
|
+
* Uso como biblioteca:
|
|
32
|
+
* import { startMcpServer } from '@justmpm/supergrep';
|
|
33
|
+
* await startMcpServer();
|
|
34
|
+
*/
|
|
35
|
+
|
|
36
|
+
/** Versao do pacote */
|
|
37
|
+
declare const VERSION = "0.1.0";
|
|
38
|
+
|
|
39
|
+
export { VERSION, startMcpServer };
|
package/dist/index.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@justmpm/supergrep",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "MCP server para busca estrutural de código com AST Grep. Encontra padrões de código com precisão sintática, ignorando formatação e comentários. Suporta 20+ linguagens via Tree-sitter.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"ast-grep",
|
|
7
|
+
"structural-search",
|
|
8
|
+
"code-search",
|
|
9
|
+
"mcp",
|
|
10
|
+
"tree-sitter",
|
|
11
|
+
"ast",
|
|
12
|
+
"code-analysis",
|
|
13
|
+
"ai",
|
|
14
|
+
"claude",
|
|
15
|
+
"opencode"
|
|
16
|
+
],
|
|
17
|
+
"author": "Koda AI Studio <studio.kodaai@gmail.com>",
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "git+https://github.com/Just-mpm/supergrep.git"
|
|
22
|
+
},
|
|
23
|
+
"type": "module",
|
|
24
|
+
"main": "./dist/index.js",
|
|
25
|
+
"types": "./dist/index.d.ts",
|
|
26
|
+
"bin": {
|
|
27
|
+
"supergrep": "dist/cli.js"
|
|
28
|
+
},
|
|
29
|
+
"exports": {
|
|
30
|
+
".": {
|
|
31
|
+
"import": "./dist/index.js",
|
|
32
|
+
"types": "./dist/index.d.ts"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"files": [
|
|
36
|
+
"dist"
|
|
37
|
+
],
|
|
38
|
+
"scripts": {
|
|
39
|
+
"build": "tsup src/index.ts src/cli.ts --format esm --dts --clean",
|
|
40
|
+
"dev": "tsup src/index.ts src/cli.ts --format esm --dts --watch",
|
|
41
|
+
"prepublishOnly": "npm run build",
|
|
42
|
+
"typecheck": "tsc --noEmit",
|
|
43
|
+
"test": "vitest run",
|
|
44
|
+
"test:watch": "vitest"
|
|
45
|
+
},
|
|
46
|
+
"dependencies": {
|
|
47
|
+
"@ast-grep/napi": "^0.36.0",
|
|
48
|
+
"@modelcontextprotocol/sdk": "^1.25.3",
|
|
49
|
+
"zod": "^3.25.76"
|
|
50
|
+
},
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
"@types/node": "^22.15.21",
|
|
53
|
+
"tsup": "^8.5.0",
|
|
54
|
+
"typescript": "^5.8.3",
|
|
55
|
+
"vitest": "^4.1.6"
|
|
56
|
+
},
|
|
57
|
+
"engines": {
|
|
58
|
+
"node": ">=18.0.0"
|
|
59
|
+
}
|
|
60
|
+
}
|