codesummary 1.1.1 → 1.2.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/package.json CHANGED
@@ -1,95 +1,95 @@
1
- {
2
- "name": "codesummary",
3
- "version": "1.1.1",
4
- "description": "Cross-platform CLI tool that generates professional PDF documentation and RAG-optimized JSON outputs from project source code. Perfect for code reviews, audits, documentation, and AI/ML applications with semantic chunking and precision offsets.",
5
- "main": "src/index.js",
6
- "type": "module",
7
- "bin": {
8
- "codesummary": "./bin/codesummary.js"
9
- },
10
- "scripts": {
11
- "start": "node bin/codesummary.js",
12
- "dev": "node bin/codesummary.js",
13
- "test": "node bin/codesummary.js --help",
14
- "lint": "eslint src/ bin/",
15
- "format": "prettier --write .",
16
- "prepublishOnly": "npm run test"
17
- },
18
- "keywords": [
19
- "code-documentation",
20
- "pdf-generator",
21
- "rag",
22
- "vector-database",
23
- "ai-ml",
24
- "semantic-chunking",
25
- "source-code",
26
- "cli-tool",
27
- "code-review",
28
- "project-documentation",
29
- "audit-tool",
30
- "cross-platform",
31
- "documentation-generator",
32
- "pdf-export",
33
- "json-export",
34
- "code-analysis",
35
- "file-scanner",
36
- "project-summary",
37
- "code-archive",
38
- "developer-tools",
39
- "nodejs-cli",
40
- "automatic-documentation",
41
- "professional-pdf",
42
- "terminal-compatible",
43
- "llm-integration",
44
- "token-estimation",
45
- "byte-offsets",
46
- "precision-indexing"
47
- ],
48
- "author": {
49
- "name": "CodeSummary Contributors",
50
- "url": "https://github.com/skamoll/CodeSummary/graphs/contributors"
51
- },
52
- "license": "GPL-3.0",
53
- "repository": {
54
- "type": "git",
55
- "url": "git+https://github.com/skamoll/CodeSummary.git"
56
- },
57
- "bugs": {
58
- "url": "https://github.com/skamoll/CodeSummary/issues"
59
- },
60
- "homepage": "https://github.com/skamoll/CodeSummary#readme",
61
- "engines": {
62
- "node": ">=18.0.0",
63
- "npm": ">=8.0.0"
64
- },
65
- "files": [
66
- "bin/",
67
- "src/",
68
- "README.md",
69
- "LICENSE",
70
- "CHANGELOG.md",
71
- "rag-schema.json",
72
- "features.md"
73
- ],
74
- "preferGlobal": true,
75
- "dependencies": {
76
- "pdfkit": "^0.15.0",
77
- "inquirer": "^9.2.15",
78
- "fs-extra": "^11.2.0",
79
- "chalk": "^5.3.0",
80
- "ora": "^8.0.1",
81
- "js-yaml": "^4.1.0",
82
- "ajv": "^8.12.0"
83
- },
84
- "devDependencies": {
85
- "eslint": "^8.57.0",
86
- "prettier": "^3.2.5"
87
- },
88
- "funding": {
89
- "type": "github",
90
- "url": "https://github.com/sponsors/skamoll"
91
- },
92
- "publishConfig": {
93
- "access": "public"
94
- }
95
- }
1
+ {
2
+ "name": "codesummary",
3
+ "version": "1.2.0",
4
+ "description": "Cross-platform CLI tool that generates PDF documentation, RAG-optimized JSON for vector databases, and LLM-optimized Markdown for direct use with any chat-based LLM. Perfect for code reviews, audits, RAG pipelines, and AI-assisted development.",
5
+ "main": "src/index.js",
6
+ "type": "module",
7
+ "bin": {
8
+ "codesummary": "./bin/codesummary.js"
9
+ },
10
+ "scripts": {
11
+ "start": "node bin/codesummary.js",
12
+ "dev": "node bin/codesummary.js",
13
+ "test": "node bin/codesummary.js --help",
14
+ "lint": "eslint src/ bin/",
15
+ "format": "prettier --write .",
16
+ "prepublishOnly": "npm run test"
17
+ },
18
+ "keywords": [
19
+ "code-documentation",
20
+ "pdf-generator",
21
+ "rag",
22
+ "vector-database",
23
+ "ai-ml",
24
+ "semantic-chunking",
25
+ "source-code",
26
+ "cli-tool",
27
+ "code-review",
28
+ "project-documentation",
29
+ "audit-tool",
30
+ "cross-platform",
31
+ "documentation-generator",
32
+ "pdf-export",
33
+ "json-export",
34
+ "code-analysis",
35
+ "file-scanner",
36
+ "project-summary",
37
+ "code-archive",
38
+ "developer-tools",
39
+ "nodejs-cli",
40
+ "automatic-documentation",
41
+ "professional-pdf",
42
+ "terminal-compatible",
43
+ "llm-integration",
44
+ "token-estimation",
45
+ "byte-offsets",
46
+ "precision-indexing"
47
+ ],
48
+ "author": {
49
+ "name": "CodeSummary Contributors",
50
+ "url": "https://github.com/skamoll/CodeSummary/graphs/contributors"
51
+ },
52
+ "license": "GPL-3.0",
53
+ "repository": {
54
+ "type": "git",
55
+ "url": "git+https://github.com/skamoll/CodeSummary.git"
56
+ },
57
+ "bugs": {
58
+ "url": "https://github.com/skamoll/CodeSummary/issues"
59
+ },
60
+ "homepage": "https://github.com/skamoll/CodeSummary#readme",
61
+ "engines": {
62
+ "node": ">=18.0.0",
63
+ "npm": ">=8.0.0"
64
+ },
65
+ "files": [
66
+ "bin/",
67
+ "src/",
68
+ "README.md",
69
+ "LICENSE",
70
+ "CHANGELOG.md",
71
+ "rag-schema.json",
72
+ "features.md"
73
+ ],
74
+ "preferGlobal": true,
75
+ "dependencies": {
76
+ "pdfkit": "^0.15.0",
77
+ "inquirer": "^9.2.15",
78
+ "fs-extra": "^11.2.0",
79
+ "chalk": "^5.3.0",
80
+ "ora": "^8.0.1",
81
+ "js-yaml": "^4.1.0",
82
+ "ajv": "^8.12.0"
83
+ },
84
+ "devDependencies": {
85
+ "eslint": "^8.57.0",
86
+ "prettier": "^3.2.5"
87
+ },
88
+ "funding": {
89
+ "type": "github",
90
+ "url": "https://github.com/sponsors/skamoll"
91
+ },
92
+ "publishConfig": {
93
+ "access": "public"
94
+ }
95
+ }
package/rag-schema.json CHANGED
@@ -1,114 +1,114 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "https://github.com/skamoll/CodeSummary/schemas/rag-output.json",
4
- "title": "CodeSummary RAG Output Schema",
5
- "description": "Schema for CodeSummary RAG-optimized JSON output format",
6
- "type": "object",
7
- "required": ["metadata", "files", "index"],
8
- "properties": {
9
- "metadata": {
10
- "type": "object",
11
- "required": ["projectName", "generatedAt", "version", "generator"],
12
- "properties": {
13
- "projectName": { "type": "string" },
14
- "generatedAt": { "type": "string", "format": "date-time" },
15
- "version": { "type": "string", "pattern": "^\\d+\\.\\d+\\.\\d+$" },
16
- "generator": { "type": "string" },
17
- "scanPath": { "type": "string" },
18
- "config": { "type": "object" },
19
- "summary": { "type": "object" }
20
- }
21
- },
22
- "files": {
23
- "type": "array",
24
- "items": {
25
- "type": "object",
26
- "required": ["id", "path", "extension", "language", "hash", "chunks"],
27
- "properties": {
28
- "id": { "type": "string" },
29
- "path": { "type": "string" },
30
- "extension": { "type": "string" },
31
- "language": { "type": "string" },
32
- "size": { "type": "number", "minimum": 0 },
33
- "hash": { "type": "string", "pattern": "^sha256-[a-f0-9]{64}$" },
34
- "modified": { "type": "string", "format": "date-time" },
35
- "tags": { "type": "array", "items": { "type": "string" } },
36
- "chunks": {
37
- "type": "array",
38
- "items": {
39
- "type": "object",
40
- "required": ["id", "content", "tokenEstimate"],
41
- "properties": {
42
- "id": { "type": "string" },
43
- "content": { "type": "string" },
44
- "tokenEstimate": { "type": "number", "minimum": 0 },
45
- "lineStart": { "type": "number", "minimum": 1 },
46
- "lineEnd": { "type": "number", "minimum": 1 },
47
- "chunkingMethod": { "type": "string" },
48
- "imports": { "type": "array", "items": { "type": "string" } },
49
- "calls": { "type": "array", "items": { "type": "string" } }
50
- }
51
- }
52
- }
53
- }
54
- }
55
- },
56
- "index": {
57
- "type": "object",
58
- "required": ["version", "generatedAt", "summary", "chunkOffsets", "fileOffsets", "statistics"],
59
- "properties": {
60
- "version": { "type": "string", "pattern": "^\\d+\\.\\d+\\.\\d+$" },
61
- "generatedAt": { "type": "string", "format": "date-time" },
62
- "summary": {
63
- "type": "object",
64
- "required": ["fileCount", "chunkCount", "totalBytes"],
65
- "properties": {
66
- "fileCount": { "type": "number", "minimum": 0 },
67
- "chunkCount": { "type": "number", "minimum": 0 },
68
- "totalBytes": { "type": "number", "minimum": 0 },
69
- "languages": { "type": "array", "items": { "type": "string" } },
70
- "extensions": { "type": "array", "items": { "type": "string" } }
71
- }
72
- },
73
- "chunkOffsets": {
74
- "type": "object",
75
- "patternProperties": {
76
- "^chunk_[a-f0-9]+_\\d+$": {
77
- "type": "object",
78
- "required": ["jsonStart", "jsonEnd", "contentStart", "contentEnd", "filePath"],
79
- "properties": {
80
- "jsonStart": { "type": "number", "minimum": 0 },
81
- "jsonEnd": { "type": "number", "minimum": 0 },
82
- "contentStart": { "type": "number", "minimum": 0 },
83
- "contentEnd": { "type": "number", "minimum": 0 },
84
- "filePath": { "type": "string" }
85
- }
86
- }
87
- }
88
- },
89
- "fileOffsets": {
90
- "type": "object",
91
- "patternProperties": {
92
- "^[a-f0-9]+$": {
93
- "type": "array",
94
- "items": { "type": "number", "minimum": 0 },
95
- "minItems": 2,
96
- "maxItems": 2
97
- }
98
- }
99
- },
100
- "statistics": {
101
- "type": "object",
102
- "required": ["processingTimeMs", "bytesWritten", "totalFiles"],
103
- "properties": {
104
- "processingTimeMs": { "type": "number", "minimum": 1 },
105
- "bytesPerSecond": { "type": "number", "minimum": 0 },
106
- "bytesWritten": { "type": "number", "minimum": 0 },
107
- "totalFiles": { "type": "number", "minimum": 0 },
108
- "emptyFiles": { "type": "number", "minimum": 0 }
109
- }
110
- }
111
- }
112
- }
113
- }
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://github.com/skamoll/CodeSummary/schemas/rag-output.json",
4
+ "title": "CodeSummary RAG Output Schema",
5
+ "description": "Schema for CodeSummary RAG-optimized JSON output format",
6
+ "type": "object",
7
+ "required": ["metadata", "files", "index"],
8
+ "properties": {
9
+ "metadata": {
10
+ "type": "object",
11
+ "required": ["projectName", "generatedAt", "version", "generator"],
12
+ "properties": {
13
+ "projectName": { "type": "string" },
14
+ "generatedAt": { "type": "string", "format": "date-time" },
15
+ "version": { "type": "string", "pattern": "^\\d+\\.\\d+\\.\\d+$" },
16
+ "generator": { "type": "string" },
17
+ "scanPath": { "type": "string" },
18
+ "config": { "type": "object" },
19
+ "summary": { "type": "object" }
20
+ }
21
+ },
22
+ "files": {
23
+ "type": "array",
24
+ "items": {
25
+ "type": "object",
26
+ "required": ["id", "path", "extension", "language", "hash", "chunks"],
27
+ "properties": {
28
+ "id": { "type": "string" },
29
+ "path": { "type": "string" },
30
+ "extension": { "type": "string" },
31
+ "language": { "type": "string" },
32
+ "size": { "type": "number", "minimum": 0 },
33
+ "hash": { "type": "string", "pattern": "^sha256-[a-f0-9]{64}$" },
34
+ "modified": { "type": "string", "format": "date-time" },
35
+ "tags": { "type": "array", "items": { "type": "string" } },
36
+ "chunks": {
37
+ "type": "array",
38
+ "items": {
39
+ "type": "object",
40
+ "required": ["id", "content", "tokenEstimate"],
41
+ "properties": {
42
+ "id": { "type": "string" },
43
+ "content": { "type": "string" },
44
+ "tokenEstimate": { "type": "number", "minimum": 0 },
45
+ "lineStart": { "type": "number", "minimum": 1 },
46
+ "lineEnd": { "type": "number", "minimum": 1 },
47
+ "chunkingMethod": { "type": "string" },
48
+ "imports": { "type": "array", "items": { "type": "string" } },
49
+ "calls": { "type": "array", "items": { "type": "string" } }
50
+ }
51
+ }
52
+ }
53
+ }
54
+ }
55
+ },
56
+ "index": {
57
+ "type": "object",
58
+ "required": ["version", "generatedAt", "summary", "chunkOffsets", "fileOffsets", "statistics"],
59
+ "properties": {
60
+ "version": { "type": "string", "pattern": "^\\d+\\.\\d+\\.\\d+$" },
61
+ "generatedAt": { "type": "string", "format": "date-time" },
62
+ "summary": {
63
+ "type": "object",
64
+ "required": ["fileCount", "chunkCount", "totalBytes"],
65
+ "properties": {
66
+ "fileCount": { "type": "number", "minimum": 0 },
67
+ "chunkCount": { "type": "number", "minimum": 0 },
68
+ "totalBytes": { "type": "number", "minimum": 0 },
69
+ "languages": { "type": "array", "items": { "type": "string" } },
70
+ "extensions": { "type": "array", "items": { "type": "string" } }
71
+ }
72
+ },
73
+ "chunkOffsets": {
74
+ "type": "object",
75
+ "patternProperties": {
76
+ "^chunk_[a-f0-9]+_\\d+$": {
77
+ "type": "object",
78
+ "required": ["jsonStart", "jsonEnd", "contentStart", "contentEnd", "filePath"],
79
+ "properties": {
80
+ "jsonStart": { "type": "number", "minimum": 0 },
81
+ "jsonEnd": { "type": "number", "minimum": 0 },
82
+ "contentStart": { "type": "number", "minimum": 0 },
83
+ "contentEnd": { "type": "number", "minimum": 0 },
84
+ "filePath": { "type": "string" }
85
+ }
86
+ }
87
+ }
88
+ },
89
+ "fileOffsets": {
90
+ "type": "object",
91
+ "patternProperties": {
92
+ "^[a-f0-9]+$": {
93
+ "type": "array",
94
+ "items": { "type": "number", "minimum": 0 },
95
+ "minItems": 2,
96
+ "maxItems": 2
97
+ }
98
+ }
99
+ },
100
+ "statistics": {
101
+ "type": "object",
102
+ "required": ["processingTimeMs", "bytesWritten", "totalFiles"],
103
+ "properties": {
104
+ "processingTimeMs": { "type": "number", "minimum": 1 },
105
+ "bytesPerSecond": { "type": "number", "minimum": 0 },
106
+ "bytesWritten": { "type": "number", "minimum": 0 },
107
+ "totalFiles": { "type": "number", "minimum": 0 },
108
+ "emptyFiles": { "type": "number", "minimum": 0 }
109
+ }
110
+ }
111
+ }
112
+ }
113
+ }
114
114
  }