
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
@webneat/codewiki
Advanced tools
Core library for parsing, analyzing, and documenting TypeScript codebases
Core library for parsing, analyzing, and documenting TypeScript codebases with dependency tracking and topological ordering.
@webneat/codewiki is a TypeScript codebase analysis engine that builds a comprehensive knowledge graph of your code. It extracts symbols, files, directories, and dependencies, then provides topological ordering to enable AI tools to generate contextual documentation with maximum context for each entity.
pnpm add @webneat/codewiki
import { create, load } from '@webneat/codewiki'
// Create a new wiki instance
const wiki = await create({
db_path: './codewiki.db',
project_path: './my-typescript-project',
description: 'My awesome TypeScript project'
})
// Or load an existing wiki database
const wiki = await load('./codewiki.db')
// Update the wiki with latest changes
await wiki.update()
// Get counts of entities in different states
const counts = wiki.counts()
console.log(`Ready: ${counts.symbols.ready} symbols, ${counts.files.ready} files`)
// Get next entities to describe (in topological order)
const toDescribe = wiki.to_describe(10)
if (toDescribe.type === 'symbols') {
console.log(`Next symbols to describe: ${toDescribe.items.map(s => s.name).join(', ')}`)
}
The main interface provides access to all entity types:
interface CodeWiki {
readonly config: Config
update(): Promise<void> // Re-index the project
counts(): WikiCounts // Get entity counts by state
to_describe(limit: number): EntitiesToDescribe // Get next entities for AI description
files: FilesWiki // File operations
symbols: SymbolsWiki // Symbol/function/class operations
directories: DirectoriesWiki // Directory operations
dependencies: DependenciesWiki // External dependency operations
}
Each entity type provides a consistent API:
// Search and retrieve
const files = wiki.files.search({ where: { state: 'ready' }, limit: 10 })
const file = wiki.files.get(fileId)
// Set AI-generated descriptions
wiki.files.set_description(fileId, 'This file contains utility functions...')
// Query relationships
const importedFiles = wiki.files.imported_by_file(fileId)
const usingSymbols = wiki.symbols.using_dependency(dependencyId)
to_scan → to_describe → readyto_link → to_describe → readyto_describe → readyto_describe → readyThe to_describe() method returns entities in an intelligent order that maximizes AI context:
This ensures that when describing an entity, all its dependencies are already described.
The package includes a comprehensive CLI:
# Initialize and index a project
codewiki update
# Show current status
codewiki status
# Search entities
codewiki files search --where.state=ready
codewiki symbols search --where.name="myFunction"
# Set descriptions
codewiki symbols set-description 123 "This function does X..."
# Query relationships
codewiki files imported-by-file 456
codewiki dependencies used-by-file 456
Uses SQLite with Drizzle ORM. Key tables:
files - File metadata and statesymbols - Function/class/variable definitionsdirectories - Directory structureexternal_dependencies - npm packages and built-insimports - File-to-file import relationshipssymbol_*_links - Symbol dependency relationshipstype Config = {
db_path: string // SQLite database file path
project_path: string // Root directory of TypeScript project
description?: string // Optional project description
package_json_path?: string // Optional package.json location
node_modules_paths?: string[] // Optional node_modules directories
}
# Install dependencies
pnpm install
# Build the library
pnpm build
# Run tests
pnpm test
# Type checking
pnpm typecheck
# Database operations
pnpm db:generate # Generate migrations
pnpm db:push # Push schema changes
pnpm db:studio # Open Drizzle Studio
This is the core library that powers:
The library is designed to be:
MIT © Amine Ben hammou
FAQs
Core library for parsing, analyzing, and documenting TypeScript codebases
We found that @webneat/codewiki demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.