@webneat/codewiki 0.0.1

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Amine Ben hammou
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,59 @@
1
+ # @webneat/codewiki
2
+
3
+ Core library for parsing, analyzing, and documenting TypeScript codebases.
4
+
5
+ ## Features
6
+
7
+ - 🔍 **TypeScript AST Parsing** - Extract elements, imports, and exports
8
+ - 📊 **Dependency Analysis** - Build complete dependency graphs
9
+ - 🗄️ **SQLite Storage** - Fast, portable database for codebase metadata
10
+ - 🤖 **AI-Powered Descriptions** - Generate contextual documentation
11
+ - ⚡ **Incremental Updates** - Git-based change detection for fast re-indexing
12
+
13
+ ## Installation
14
+
15
+ ```bash
16
+ pnpm add @webneat/codewiki
17
+ ```
18
+
19
+ ## Usage
20
+
21
+ ```typescript
22
+ import { index_project, queries } from '@webneat/codewiki'
23
+
24
+ // Index a TypeScript project
25
+ await index_project('/path/to/project', {
26
+ db_path: './codewiki.db',
27
+ excluded_paths: ['node_modules', 'dist'],
28
+ progress_callback: (status) => {
29
+ console.log(`${status.phase}: ${status.current}/${status.total}`)
30
+ },
31
+ })
32
+
33
+ // Query the database
34
+ const element = await queries.find_element(db, 'MyFunction')
35
+ const deps = await queries.element_dependencies(db, element.id)
36
+ ```
37
+
38
+ ## Architecture
39
+
40
+ This is the core library used by:
41
+ - **codewiki-cli** - Command-line interface with MCP server
42
+ - **codewiki-vscode** - VSCode extension
43
+
44
+ ## Development
45
+
46
+ ```bash
47
+ # Build
48
+ pnpm build
49
+
50
+ # Test
51
+ pnpm test
52
+
53
+ # Type check
54
+ pnpm typecheck
55
+ ```
56
+
57
+ ## License
58
+
59
+ MIT