docifyjs
v0.1.0
Published
A JSDoc generator with Recast, Commander, Ora, and Picocolors.
Downloads
137
Readme
DocifyJS
AI-powered JSDoc generator for JavaScript and TypeScript using Recast.
DocifyJS automatically generates clean JSDoc comments for:
- Functions
- Arrow functions
- Class methods
- Object methods
- Exported declarations
- TypeScript code
It supports:
- Recursive AST walking
- AI-generated descriptions
- Cloudflare Workers AI
- Plugin system
- Recast AST printing
- Multi-file CLI
- JS + TS parsing
Features
- ⚡ Fast AST-based parser
- 🧠 AI-powered descriptions
- 🛠 TypeScript support
- 📦 Plugin system
- 🎨 Colored CLI output
- 🧩 Recast-based formatting
- 🔁 Recursive AST walker
- 📴 Local AI fallback
- 📄 Multi-file support
Installation
npm install -g docifyjsOr locally:
npm installUsage
Generate docs
docify src/index.jsWrite changes
docify src/index.js --writeMultiple files
docify src/*.js --writeDry run
docify src/index.js --dry-runEnable AI
docify src/*.js --write --aiTypeScript Support
DocifyJS understands TypeScript syntax using @babel/parser.
Example
export function add(a: number, b: number): number {
return a + b;
}Generated:
/**
* Adds a value.
*
* @param {number} a
* @param {number} b
*
* @returns {number}
*/
export function add(a: number, b: number): number {
return a + b;
}License
Apache-2.0
Author
Created by OpenDN Foundation
