docgen-ai 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.
Files changed (90) hide show
  1. package/README.md +101 -0
  2. package/dist/ai/reasoner.d.ts +47 -0
  3. package/dist/ai/reasoner.d.ts.map +1 -0
  4. package/dist/ai/reasoner.js +235 -0
  5. package/dist/ai/reasoner.js.map +1 -0
  6. package/dist/cli/commands.d.ts +20 -0
  7. package/dist/cli/commands.d.ts.map +1 -0
  8. package/dist/cli/commands.js +344 -0
  9. package/dist/cli/commands.js.map +1 -0
  10. package/dist/config/loader.d.ts +11 -0
  11. package/dist/config/loader.d.ts.map +1 -0
  12. package/dist/config/loader.js +141 -0
  13. package/dist/config/loader.js.map +1 -0
  14. package/dist/core/analyzers/project.d.ts +8 -0
  15. package/dist/core/analyzers/project.d.ts.map +1 -0
  16. package/dist/core/analyzers/project.js +303 -0
  17. package/dist/core/analyzers/project.js.map +1 -0
  18. package/dist/core/cache/file-cache.d.ts +26 -0
  19. package/dist/core/cache/file-cache.d.ts.map +1 -0
  20. package/dist/core/cache/file-cache.js +110 -0
  21. package/dist/core/cache/file-cache.js.map +1 -0
  22. package/dist/core/generators/api.d.ts +11 -0
  23. package/dist/core/generators/api.d.ts.map +1 -0
  24. package/dist/core/generators/api.js +105 -0
  25. package/dist/core/generators/api.js.map +1 -0
  26. package/dist/core/generators/architecture.d.ts +17 -0
  27. package/dist/core/generators/architecture.d.ts.map +1 -0
  28. package/dist/core/generators/architecture.js +180 -0
  29. package/dist/core/generators/architecture.js.map +1 -0
  30. package/dist/core/generators/functions.d.ts +11 -0
  31. package/dist/core/generators/functions.d.ts.map +1 -0
  32. package/dist/core/generators/functions.js +151 -0
  33. package/dist/core/generators/functions.js.map +1 -0
  34. package/dist/core/generators/integrations.d.ts +8 -0
  35. package/dist/core/generators/integrations.d.ts.map +1 -0
  36. package/dist/core/generators/integrations.js +53 -0
  37. package/dist/core/generators/integrations.js.map +1 -0
  38. package/dist/core/generators/modules.d.ts +11 -0
  39. package/dist/core/generators/modules.d.ts.map +1 -0
  40. package/dist/core/generators/modules.js +148 -0
  41. package/dist/core/generators/modules.js.map +1 -0
  42. package/dist/core/generators/readme.d.ts +25 -0
  43. package/dist/core/generators/readme.d.ts.map +1 -0
  44. package/dist/core/generators/readme.js +193 -0
  45. package/dist/core/generators/readme.js.map +1 -0
  46. package/dist/core/generators/registry.d.ts +26 -0
  47. package/dist/core/generators/registry.d.ts.map +1 -0
  48. package/dist/core/generators/registry.js +90 -0
  49. package/dist/core/generators/registry.js.map +1 -0
  50. package/dist/core/generators/setup.d.ts +8 -0
  51. package/dist/core/generators/setup.d.ts.map +1 -0
  52. package/dist/core/generators/setup.js +73 -0
  53. package/dist/core/generators/setup.js.map +1 -0
  54. package/dist/core/parsers/javascript.d.ts +12 -0
  55. package/dist/core/parsers/javascript.d.ts.map +1 -0
  56. package/dist/core/parsers/javascript.js +389 -0
  57. package/dist/core/parsers/javascript.js.map +1 -0
  58. package/dist/core/parsers/python-regex.d.ts +11 -0
  59. package/dist/core/parsers/python-regex.d.ts.map +1 -0
  60. package/dist/core/parsers/python-regex.js +337 -0
  61. package/dist/core/parsers/python-regex.js.map +1 -0
  62. package/dist/core/parsers/python.d.ts +37 -0
  63. package/dist/core/parsers/python.d.ts.map +1 -0
  64. package/dist/core/parsers/python.js +584 -0
  65. package/dist/core/parsers/python.js.map +1 -0
  66. package/dist/core/parsers/registry.d.ts +15 -0
  67. package/dist/core/parsers/registry.d.ts.map +1 -0
  68. package/dist/core/parsers/registry.js +56 -0
  69. package/dist/core/parsers/registry.js.map +1 -0
  70. package/dist/core/pipeline.d.ts +18 -0
  71. package/dist/core/pipeline.d.ts.map +1 -0
  72. package/dist/core/pipeline.js +96 -0
  73. package/dist/core/pipeline.js.map +1 -0
  74. package/dist/index.d.ts +21 -0
  75. package/dist/index.d.ts.map +1 -0
  76. package/dist/index.js +49 -0
  77. package/dist/index.js.map +1 -0
  78. package/dist/types/definitions.d.ts +220 -0
  79. package/dist/types/definitions.d.ts.map +1 -0
  80. package/dist/types/definitions.js +10 -0
  81. package/dist/types/definitions.js.map +1 -0
  82. package/dist/utils/helpers.d.ts +22 -0
  83. package/dist/utils/helpers.d.ts.map +1 -0
  84. package/dist/utils/helpers.js +176 -0
  85. package/dist/utils/helpers.js.map +1 -0
  86. package/dist/utils/logger.d.ts +28 -0
  87. package/dist/utils/logger.d.ts.map +1 -0
  88. package/dist/utils/logger.js +109 -0
  89. package/dist/utils/logger.js.map +1 -0
  90. package/package.json +88 -0
package/README.md ADDED
@@ -0,0 +1,101 @@
1
+ # @docgen/cli
2
+
3
+ > Autonomous Codebase Documentation Platform — AI-powered technical documentation generator
4
+
5
+ [AI summarization disabled — enable in config to get human-readable descriptions]
6
+
7
+ ## Technology Stack
8
+
9
+ **Languages:**
10
+
11
+ - Typescript — 21 files (100%)
12
+
13
+ **Frameworks & Libraries:**
14
+
15
+ - Express
16
+
17
+ **Key Dependencies:**
18
+
19
+ - **Framework:** express
20
+ - **Logging:** winston
21
+
22
+ ## Getting Started
23
+
24
+ ### Prerequisites
25
+
26
+ - Node.js >= 18.0.0
27
+
28
+ ### Installation
29
+
30
+ ```bash
31
+ # Clone the repository
32
+ git clone <repository-url>
33
+ cd @docgen/cli
34
+
35
+ # Install dependencies
36
+ npm install
37
+ ```
38
+
39
+ ### Environment Variables
40
+
41
+ Create a `.env` file in the project root:
42
+
43
+ ```env
44
+ ANTHROPIC_API_KEY=<required>
45
+ DOCGEN_AI_KEY=<required>
46
+ DOCGEN_AI_PROVIDER=<required>
47
+ DOCGEN_AI_MODEL=<required>
48
+ DOCGEN_OUTPUT_DIR=<required>
49
+ DOCGEN_LOG_LEVEL=<required>
50
+ ```
51
+
52
+ ### Running the Application
53
+
54
+ ```bash
55
+ # Development
56
+ npm run dev
57
+
58
+ # Production
59
+ npm start
60
+ ```
61
+
62
+ ## API Overview
63
+
64
+ This project exposes 1 API endpoint.
65
+
66
+ | Method | Path | Handler | Auth |
67
+ |--------|------|---------|------|
68
+ | `GET` | `*` | anonymous | — |
69
+
70
+ ## Project Structure
71
+
72
+ ```
73
+ ai/ (1 files)
74
+ cli/ (1 files — api)
75
+ config/ (1 files — config)
76
+ core/analyzers/ (1 files)
77
+ core/cache/ (1 files)
78
+ core/generators/ (8 files)
79
+ core/parsers/ (3 files)
80
+ core/ (1 files)
81
+ root/ (1 files)
82
+ types/ (1 files)
83
+ utils/ (2 files — utility)
84
+ ```
85
+
86
+ ## Infrastructure
87
+
88
+ - **.github/workflows** — GitHub Actions CI/CD
89
+ - **tsconfig.json** — TypeScript config
90
+
91
+ ## Testing
92
+
93
+ Testing framework: jest, ts-jest
94
+
95
+ ```bash
96
+ npm test
97
+ ```
98
+
99
+ ---
100
+
101
+ *Documentation generated by [docgen](https://github.com/docgen) on 2026-03-19*
@@ -0,0 +1,47 @@
1
+ /**
2
+ * ============================================================================
3
+ * AI REASONING LAYER
4
+ * ============================================================================
5
+ *
6
+ * CRITICAL ARCHITECTURE DECISION:
7
+ * The AI layer ONLY summarizes and explains. It never invents facts.
8
+ *
9
+ * AST Analysis → provides FACTS (function names, params, types, imports)
10
+ * AI Layer → provides EXPLANATION (what it does, why it matters)
11
+ *
12
+ * This "grounded generation" approach prevents hallucination.
13
+ * The AI can't claim a function takes 3 params when the AST says it takes 2.
14
+ *
15
+ * HOW IT WORKS:
16
+ * 1. Receive structured data (from analyzers)
17
+ * 2. Build a prompt that includes the FACTS
18
+ * 3. Ask the LLM to explain those facts in human-readable form
19
+ * 4. Return the explanation
20
+ *
21
+ * LEARNING: This is the same pattern used in RAG (Retrieval-Augmented
22
+ * Generation) — you retrieve facts first, then generate based on those facts.
23
+ */
24
+ import { ProjectAnalysis, ModuleInfo, FunctionInfo, AIConfig } from '../types/definitions';
25
+ /**
26
+ * Generate a high-level project overview.
27
+ */
28
+ export declare function summarizeProject(analysis: ProjectAnalysis, config: AIConfig): Promise<string>;
29
+ /**
30
+ * Generate a module description.
31
+ */
32
+ export declare function summarizeModule(module: ModuleInfo, config: AIConfig): Promise<string>;
33
+ /**
34
+ * Generate a function documentation block.
35
+ */
36
+ export declare function summarizeFunction(func: FunctionInfo, config: AIConfig): Promise<string>;
37
+ /**
38
+ * Generate architecture explanation.
39
+ */
40
+ export declare function explainArchitecture(analysis: ProjectAnalysis, config: AIConfig): Promise<string>;
41
+ /**
42
+ * Batch-summarize when AI is disabled — returns static analysis descriptions.
43
+ * This ensures the tool is still useful without an API key.
44
+ */
45
+ export declare function staticModuleSummary(module: ModuleInfo): string;
46
+ export declare function staticFunctionSummary(func: FunctionInfo): string;
47
+ //# sourceMappingURL=reasoner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reasoner.d.ts","sourceRoot":"","sources":["../../src/ai/reasoner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAGH,OAAO,EACL,eAAe,EAAE,UAAU,EAAE,YAAY,EAC5B,QAAQ,EACtB,MAAM,sBAAsB,CAAC;AAkG9B;;GAEG;AACH,wBAAsB,gBAAgB,CACpC,QAAQ,EAAE,eAAe,EACzB,MAAM,EAAE,QAAQ,GACf,OAAO,CAAC,MAAM,CAAC,CAejB;AAED;;GAEG;AACH,wBAAsB,eAAe,CACnC,MAAM,EAAE,UAAU,EAClB,MAAM,EAAE,QAAQ,GACf,OAAO,CAAC,MAAM,CAAC,CAkBjB;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,YAAY,EAClB,MAAM,EAAE,QAAQ,GACf,OAAO,CAAC,MAAM,CAAC,CAoBjB;AAED;;GAEG;AACH,wBAAsB,mBAAmB,CACvC,QAAQ,EAAE,eAAe,EACzB,MAAM,EAAE,QAAQ,GACf,OAAO,CAAC,MAAM,CAAC,CAuBjB;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAS9D;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,CAOhE"}
@@ -0,0 +1,235 @@
1
+ "use strict";
2
+ /**
3
+ * ============================================================================
4
+ * AI REASONING LAYER
5
+ * ============================================================================
6
+ *
7
+ * CRITICAL ARCHITECTURE DECISION:
8
+ * The AI layer ONLY summarizes and explains. It never invents facts.
9
+ *
10
+ * AST Analysis → provides FACTS (function names, params, types, imports)
11
+ * AI Layer → provides EXPLANATION (what it does, why it matters)
12
+ *
13
+ * This "grounded generation" approach prevents hallucination.
14
+ * The AI can't claim a function takes 3 params when the AST says it takes 2.
15
+ *
16
+ * HOW IT WORKS:
17
+ * 1. Receive structured data (from analyzers)
18
+ * 2. Build a prompt that includes the FACTS
19
+ * 3. Ask the LLM to explain those facts in human-readable form
20
+ * 4. Return the explanation
21
+ *
22
+ * LEARNING: This is the same pattern used in RAG (Retrieval-Augmented
23
+ * Generation) — you retrieve facts first, then generate based on those facts.
24
+ */
25
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
26
+ if (k2 === undefined) k2 = k;
27
+ var desc = Object.getOwnPropertyDescriptor(m, k);
28
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
29
+ desc = { enumerable: true, get: function() { return m[k]; } };
30
+ }
31
+ Object.defineProperty(o, k2, desc);
32
+ }) : (function(o, m, k, k2) {
33
+ if (k2 === undefined) k2 = k;
34
+ o[k2] = m[k];
35
+ }));
36
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
37
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
38
+ }) : function(o, v) {
39
+ o["default"] = v;
40
+ });
41
+ var __importStar = (this && this.__importStar) || (function () {
42
+ var ownKeys = function(o) {
43
+ ownKeys = Object.getOwnPropertyNames || function (o) {
44
+ var ar = [];
45
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
46
+ return ar;
47
+ };
48
+ return ownKeys(o);
49
+ };
50
+ return function (mod) {
51
+ if (mod && mod.__esModule) return mod;
52
+ var result = {};
53
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
54
+ __setModuleDefault(result, mod);
55
+ return result;
56
+ };
57
+ })();
58
+ Object.defineProperty(exports, "__esModule", { value: true });
59
+ exports.summarizeProject = summarizeProject;
60
+ exports.summarizeModule = summarizeModule;
61
+ exports.summarizeFunction = summarizeFunction;
62
+ exports.explainArchitecture = explainArchitecture;
63
+ exports.staticModuleSummary = staticModuleSummary;
64
+ exports.staticFunctionSummary = staticFunctionSummary;
65
+ const https = __importStar(require("https"));
66
+ const logger_1 = require("../utils/logger");
67
+ const helpers_1 = require("../utils/helpers");
68
+ const log = logger_1.logger.child('AI');
69
+ // ─── AI Client ───────────────────────────────────────────────────────────────
70
+ /**
71
+ * Simple HTTP client for the Anthropic API.
72
+ *
73
+ * WHY not use the SDK? To minimize dependencies and make the AI
74
+ * layer easy to swap out. The raw API is simple enough.
75
+ *
76
+ * For production, you'd use the official @anthropic-ai/sdk package.
77
+ */
78
+ async function callLLM(prompt, systemPrompt, config) {
79
+ if (!config.enabled) {
80
+ return '[AI summarization disabled — enable in config to get human-readable descriptions]';
81
+ }
82
+ const apiKey = config.apiKey || process.env.ANTHROPIC_API_KEY || process.env.DOCGEN_AI_KEY;
83
+ if (!apiKey) {
84
+ log.warn('No AI API key configured. Set ANTHROPIC_API_KEY or DOCGEN_AI_KEY env var.');
85
+ return '[No API key configured — summaries unavailable]';
86
+ }
87
+ try {
88
+ const body = JSON.stringify({
89
+ model: config.model,
90
+ max_tokens: config.maxTokens,
91
+ temperature: config.temperature,
92
+ system: systemPrompt,
93
+ messages: [{ role: 'user', content: prompt }],
94
+ });
95
+ const response = await httpPost('api.anthropic.com', '/v1/messages', body, {
96
+ 'Content-Type': 'application/json',
97
+ 'x-api-key': apiKey,
98
+ 'anthropic-version': '2023-06-01',
99
+ });
100
+ const parsed = JSON.parse(response);
101
+ if (parsed.content && parsed.content[0]) {
102
+ return parsed.content[0].text;
103
+ }
104
+ log.warn('Unexpected AI response format');
105
+ return '[AI response unavailable]';
106
+ }
107
+ catch (err) {
108
+ log.error('AI call failed', { error: err.message });
109
+ return '[AI summarization failed — using static analysis only]';
110
+ }
111
+ }
112
+ function httpPost(hostname, path, body, headers) {
113
+ return new Promise((resolve, reject) => {
114
+ const req = https.request({ hostname, path, method: 'POST', headers: { ...headers, 'Content-Length': Buffer.byteLength(body) } }, (res) => {
115
+ let data = '';
116
+ res.on('data', (chunk) => (data += chunk));
117
+ res.on('end', () => resolve(data));
118
+ });
119
+ req.on('error', reject);
120
+ req.write(body);
121
+ req.end();
122
+ });
123
+ }
124
+ // ─── Public API ──────────────────────────────────────────────────────────────
125
+ const SYSTEM_PROMPT = `You are a technical documentation writer. You write clear, concise, accurate documentation for software engineers.
126
+
127
+ RULES:
128
+ - Only describe what the code ACTUALLY does based on the provided analysis data
129
+ - Never invent features, parameters, or behaviors not in the data
130
+ - Use precise technical language
131
+ - Be concise — no fluff
132
+ - Write in present tense ("handles", "returns", not "will handle")
133
+ - Use markdown formatting`;
134
+ /**
135
+ * Generate a high-level project overview.
136
+ */
137
+ async function summarizeProject(analysis, config) {
138
+ const prompt = `Generate a concise project overview for "${analysis.name}".
139
+
140
+ FACTS from analysis:
141
+ - Languages: ${analysis.languages.map(l => `${l.language} (${l.percentage}%)`).join(', ')}
142
+ - Frameworks: ${analysis.frameworks.map(f => f.framework).join(', ') || 'None detected'}
143
+ - Total files: ${analysis.files.length}
144
+ - Modules: ${analysis.modules.map(m => m.name).join(', ')}
145
+ - API endpoints: ${analysis.apiEndpoints.length}
146
+ - External deps: ${analysis.externalDependencies.filter(d => !d.isDev).length} production, ${analysis.externalDependencies.filter(d => d.isDev).length} dev
147
+ - Description from package.json: ${analysis.description || 'Not provided'}
148
+
149
+ Write a 2-3 paragraph overview explaining what this project is and how it's structured. Only reference what's in the facts above.`;
150
+ return callLLM(prompt, SYSTEM_PROMPT, config);
151
+ }
152
+ /**
153
+ * Generate a module description.
154
+ */
155
+ async function summarizeModule(module, config) {
156
+ const fileList = module.files.map(f => f.relativePath).join('\n ');
157
+ const exports = module.publicAPI.map(e => `${e.type}: ${e.name}`).join(', ');
158
+ const deps = module.dependencies.join(', ') || 'None';
159
+ const prompt = `Describe the "${module.name}" module.
160
+
161
+ FACTS:
162
+ - Files:\n ${fileList}
163
+ - Role: ${module.role || 'unknown'}
164
+ - Public exports: ${exports || 'None'}
165
+ - Dependencies: ${deps}
166
+ - Dependents: ${module.dependents.join(', ') || 'None'}
167
+ - Lines of code: ${module.totalLines}
168
+
169
+ Write a 1-2 paragraph description of this module's purpose and responsibilities. Only reference what's in the facts.`;
170
+ return callLLM(prompt, SYSTEM_PROMPT, config);
171
+ }
172
+ /**
173
+ * Generate a function documentation block.
174
+ */
175
+ async function summarizeFunction(func, config) {
176
+ const params = func.params.map(p => `${p.name}${p.type ? ': ' + p.type : ''}${p.isOptional ? ' (optional)' : ''}${p.defaultValue ? ' = ' + p.defaultValue : ''}`).join(', ');
177
+ const prompt = `Document the function "${func.name}".
178
+
179
+ FACTS:
180
+ - Parameters: ${params || 'none'}
181
+ - Returns: ${func.returnType || 'unknown'}
182
+ - Async: ${func.isAsync}
183
+ - Complexity: ${func.complexity}
184
+ - Decorators: ${func.decorators.join(', ') || 'None'}
185
+ ${func.className ? `- Class: ${func.className}` : ''}
186
+ ${func.existingDoc ? `- Existing doc: ${func.existingDoc}` : ''}
187
+ ${func.body ? `- Source:\n\`\`\`\n${(0, helpers_1.truncate)(func.body, 500)}\n\`\`\`` : ''}
188
+
189
+ Write a brief (2-3 sentences) description of what this function does and when to use it. Only reference what's in the facts and source code.`;
190
+ return callLLM(prompt, SYSTEM_PROMPT, config);
191
+ }
192
+ /**
193
+ * Generate architecture explanation.
194
+ */
195
+ async function explainArchitecture(analysis, config) {
196
+ const moduleDescriptions = analysis.modules.map(m => `- ${m.name} (${m.role || 'unknown'}): ${m.files.length} files, depends on [${m.dependencies.join(', ')}]`).join('\n');
197
+ const prompt = `Explain the architecture of "${analysis.name}".
198
+
199
+ FACTS:
200
+ Modules:
201
+ ${moduleDescriptions}
202
+
203
+ Frameworks: ${analysis.frameworks.map(f => f.framework).join(', ')}
204
+ API endpoints: ${analysis.apiEndpoints.length}
205
+ External services: ${analysis.externalDependencies.filter(d => !d.isDev).map(d => `${d.name} (${d.category})`).join(', ')}
206
+
207
+ Describe:
208
+ 1. The overall architecture pattern (monolith, microservice, layered, etc.)
209
+ 2. How the modules relate to each other
210
+ 3. The data flow through the system
211
+
212
+ Only reference what's in the facts above. Be specific.`;
213
+ return callLLM(prompt, SYSTEM_PROMPT, config);
214
+ }
215
+ /**
216
+ * Batch-summarize when AI is disabled — returns static analysis descriptions.
217
+ * This ensures the tool is still useful without an API key.
218
+ */
219
+ function staticModuleSummary(module) {
220
+ const fileCount = module.files.length;
221
+ const exportCount = module.publicAPI.length;
222
+ const roleStr = module.role ? `Serves as a **${module.role}** layer.` : '';
223
+ return `The \`${module.name}\` module contains ${fileCount} file${fileCount !== 1 ? 's' : ''} ` +
224
+ `and exports ${exportCount} public symbol${exportCount !== 1 ? 's' : ''}. ${roleStr} ` +
225
+ `Dependencies: ${module.dependencies.length > 0 ? module.dependencies.join(', ') : 'none'}. ` +
226
+ `Used by: ${module.dependents.length > 0 ? module.dependents.join(', ') : 'none'}.`;
227
+ }
228
+ function staticFunctionSummary(func) {
229
+ const params = func.params.map(p => p.name + (p.type ? `: ${p.type}` : '')).join(', ');
230
+ const asyncStr = func.isAsync ? 'Async function' : 'Function';
231
+ const returnStr = func.returnType ? ` Returns \`${func.returnType}\`.` : '';
232
+ return `${asyncStr} \`${func.name}(${params})\`.${returnStr}` +
233
+ (func.complexity > 5 ? ' ⚠️ High complexity.' : '');
234
+ }
235
+ //# sourceMappingURL=reasoner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reasoner.js","sourceRoot":"","sources":["../../src/ai/reasoner.ts"],"names":[],"mappings":";A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AC,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACvF,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,UAAU,CAAC;IAC9D,MAAM,SAAS,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,cAAc,IAAI,CAAC,UAAU,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;IAE5E,OAAO,GAAG,QAAQ,MAAM,IAAI,CAAC,IAAI,IAAI,MAAM,OAAO,SAAS,EAAE;QAC3D,CAAC,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AACxD,CAAC"}
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * ============================================================================
4
+ * DOCGEN CLI
5
+ * ============================================================================
6
+ *
7
+ * Command-line interface for the documentation platform.
8
+ *
9
+ * COMMANDS:
10
+ * docgen init Create config file in current project
11
+ * docgen analyze Analyze project and print report
12
+ * docgen generate Full pipeline: analyze + generate docs
13
+ * docgen watch Watch for changes and regenerate
14
+ * docgen serve Start local documentation server
15
+ *
16
+ * DESIGN: We use Commander.js for CLI parsing. Each command maps
17
+ * to a handler function that calls the core pipeline.
18
+ */
19
+ export {};
20
+ //# sourceMappingURL=commands.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../src/cli/commands.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;GAgBG"}