@webneat/codewiki
v0.0.3
Published
Core library for parsing, analyzing, and documenting TypeScript codebases
Downloads
273
Maintainers
Readme
@webneat/codewiki
Core library for parsing, analyzing, and documenting TypeScript codebases.
Features
- 🔍 TypeScript AST Parsing - Extract elements, imports, and exports
- 📊 Dependency Analysis - Build complete dependency graphs
- 🗄️ SQLite Storage - Fast, portable database for codebase metadata
- 🤖 AI-Powered Descriptions - Generate contextual documentation
- ⚡ Incremental Updates - Git-based change detection for fast re-indexing
Installation
pnpm add @webneat/codewikiUsage
import { index_project, queries } from '@webneat/codewiki'
// Index a TypeScript project
await index_project('/path/to/project', {
db_path: './codewiki.db',
excluded_paths: ['node_modules', 'dist'],
progress_callback: (status) => {
console.log(`${status.phase}: ${status.current}/${status.total}`)
},
})
// Query the database
const element = await queries.find_element(db, 'MyFunction')
const deps = await queries.element_dependencies(db, element.id)Architecture
This is the core library used by:
- codewiki-cli - Command-line interface with MCP server
- codewiki-vscode - VSCode extension
Development
# Build
pnpm build
# Test
pnpm test
# Type check
pnpm typecheckLicense
MIT
