Registry / llm-agents / docsgene

docsgene

JSON →
library1.0.0jsnpmunverified

Docsgene (v1.0.0) is an AI-focused tool that bundles codebase context into a single file optimized for LLM ingestion. It scans project files, intelligently selects relevant code, and outputs a compact representation that preserves dependencies and structure, reducing token overhead. Released as initial stable version; no established release cadence yet. Key differentiator: purpose-built for LLM context windows, unlike generic bundlers.

npm install docsgene
INSTALL
IMPORT
SIG · DOCSGENE
D
docsgene
llm-agentsjavascriptv1.0.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

bundleCodebase
import { bundleCodebase } from 'docsgene'
const bundleCodebase = require('docsgene')
ESM-only; CommonJS require() will fail. TypeScript types available.
DocsgeneConfig
import type { DocsgeneConfig } from 'docsgene'
import { DocsgeneConfig } from 'docsgene' (will cause runtime error if used as value)
Type-only export; do not use as runtime value.
default
import docsgene from 'docsgene'
import { default } from 'docsgene'
Default export for quick access to main function; named export also available.

Shows how to import and use the main bundleCodebase function to generate an LLM-friendly context file from a source directory.

import { bundleCodebase } from 'docsgene'; const result = await bundleCodebase({ sourceDir: './src', outputFile: './context.txt', ignorePatterns: ['node_modules', 'dist'], maxTokens: 8000, includeComments: false, }); console.log('Bundled context written to', result.outputPath); console.log('Token count:', result.tokenCount);
docsgene --version
Debug
Known issues
breakingESM-only: package does not support CommonJS require().
fix
Use import syntax. If using Node.js, set "type": "module" in package.json or use .mjs extension.
affects: >=1.0.0
gotchaDefault ignore patterns may not exclude large directories like .git or build outputs; can cause token overflow.
fix
Explicitly pass ignorePatterns for all non-essential directories.
affects: >=1.0.0
gotchamaxTokens setting does not strictly enforce token limit; it's a guideline for chunking.
fix
Monitor tokenCount in result and adjust maxTokens or ignorePatterns accordingly.
affects: >=1.0.0
Errors
Common errors & fixes
TypeError: docsgene_1.bundleCodebase is not a function
Using CommonJS require() on an ESM-only package, getting the module's default export object instead of named export.
fix
Use import { bundleCodebase } from 'docsgene' or const { bundleCodebase } = await import('docsgene').
SyntaxError: Cannot use import statement outside a module
Running in a non-module context (e.g., plain .js file without type: module).
fix
Add "type": "module" to package.json, rename file to .mjs, or use dynamic import().
Module not found: Can't resolve 'docsgene' in 'C:\project'
Package not installed or typo in package name.
fix
Run 'npm install docsgene' and ensure correct import path.
Upgrade
Version history
1.0.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
15 hits · last 30 days
node
14
OpenAI (training)
1
Resources
docsgene — npm install docsgene · libregistry