npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

autodoc-engine-cli

v1.0.4

Published

<p align="center"> <img src="https://img.shields.io/badge/Node.js-339933?style=for-the-badge&logo=nodedotjs&logoColor=white" alt="Node.js"> <img src="https://img.shields.io/badge/TypeScript-007ACC?style=for-the-badge&logo=typescript&logoColor=white" a

Readme

Autodoc Engine CLI

Dynamic Autonomous Codebase Documentation & File Generation Engine

The Autodoc Engine CLI is a powerful command-line interface tool designed to automate the generation of codebase documentation, architectural blueprints, and even facilitate intelligent code refactoring operations. Leveraging an external AI-powered service, it deeply analyzes your project's file structure and content to produce relevant, high-quality output tailored to your specifications.

Whether you need a README.md for your new repository, a LICENSE file for open-source distribution, or custom documentation for a specific file or directory, autodoc-cli streamlines the process, saving developers valuable time.

✨ Features

  • AI-Powered Generation: Connects to a remote LLM tier to generate context-aware documentation and code.
  • Intelligent Project Sensing: Automatically scans and maps your project's file tree, intelligently filtering out irrelevant files and directories (e.g., node_modules, .git, dist).
  • Versatile Output Formats: Supports generation of common project files like README.md, LICENSE, CONTRIBUTING.md, and custom documentation for specific files or folders.
  • Custom Instructions: Provide raw context steering directives to the remote LLM for highly customized output.
  • Targeted Analysis: Specify a particular path within your project for focused documentation or refactoring.
  • Smart Output Routing: Automatically handles naming conventions for documentation files to avoid overwriting source code, and directly applies changes for refactoring operations.
  • Interactive & Direct Modes:
    • Interactive Mode: A user-friendly, guided interface for common documentation tasks.
    • Direct Mode: Command-line options for scripting and advanced usage.
  • Real-time Feedback: Features a terminal spinner to indicate ongoing operations.
  • Cross-Platform Compatibility: Normalizes file paths for consistent behavior across different operating systems.

🚀 How It Works

The autodoc-cli operates by performing the following steps:

  1. Workspace Sensing: It first resolves your target project path and recursively scans its file system, building a comprehensive map of your codebase.
  2. Context Aggregation: Relevant files (based on critical extensions like .ts, .js, .json, .md, etc.) are read into a system buffer cache, with their content truncated to optimize payload size.
  3. Remote AI Processing: The aggregated file tree and selected file contexts, along with your specified documentation type and custom instructions, are securely transmitted to a remote AI service (SERVER_API_URL).
  4. Content Generation/Refactoring: The AI service processes this information to generate the requested documentation or perform the specified code refactoring.
  5. Output Delivery: The generated content (Markdown or code) is returned to the CLI, which then saves it to your local filesystem at the appropriate location, handling file naming and directory creation as needed.

📦 Installation

To use autodoc-cli, you need Node.js installed on your system.

Global Installation (Recommended for CLI Tools):

npm install -g autodoc-engine-cli

This will make the autodoc-cli command available globally in your terminal.

Local Development (for contributors):

  1. Clone the repository:
    git clone https://github.com/your-repo/autodoc-engine-cli.git # Replace with actual repo URL
    cd autodoc-engine-cli
  2. Install dependencies:
    npm install
  3. Build the TypeScript project:
    npm run build
  4. Link the CLI tool locally for testing:
    npm link
    You can now run autodoc-cli from any directory to test your local changes.

💡 Usage

Interactive Mode

Simply run the command without any arguments to enter the interactive prompt:

autodoc-cli

You will be presented with a menu to select the type of documentation you want to generate:

================================================================
  AUTODOC ENGINE CORE: INTERACTIVE DEVELOPMENT INTERFACE
================================================================
Select the architectural documentation output template to execute:
 [1] Standard README.md Blueprint Layout
 [2] Open-Source Distribution LICENSE Text Boilerplate
 [3] CONTRIBUTING.md Repository Deployment Ruleset
 [4] Custom Scope (Target custom files or custom analysis modules)

Follow the prompts to specify your requirements.

Direct Mode

You can also use command-line options for more direct control:

autodoc-cli [options]

Options:

  • -t, --type <type>: Specifies the output variant target. This can be a common file like README.md, LICENSE, CONTRIBUTING.md, or a custom file path (e.g., src/components/MyComponent.md, server/api/route.ts).
  • -p, --path <path>: Specifies the target filesystem resolution depth routing. This is the directory to scan for files. Defaults to ./ (current directory).
  • -i, --instruct <instruction>: Provides raw context steering directives for the remote LLM tier. Use this for specific requirements or complex generation tasks.

Examples:

  1. Generate a README.md for the current directory:

    autodoc-cli -t README.md
  2. Generate a LICENSE file for a specific project folder:

    autodoc-cli -t LICENSE -p ./my-project-root
  3. Generate custom documentation for a server/users.ts file with specific instructions:

    autodoc-cli -t server/users.ts-documentation.md -i "Explain the API endpoints and data models for user management, focusing on security considerations."
  4. Perform an inline refactoring operation on a file (if supported by the remote API, indicated by --type matching an existing code file):

    autodoc-cli -t src/utils/helper.ts -i "Refactor this utility file to use modern ES modules and add JSDoc comments to all functions."

    Note: The system intelligently determines if an operation is for documentation or refactoring based on the --type and the remote API's response. For refactoring, the target file is directly modified.

⚙️ Configuration

The CLI communicates with an external API endpoint defined internally:

  • SERVER_API_URL: https://cli-puce.vercel.app/api/agent This URL is crucial for the core functionality of the autodoc-cli as it hosts the AI-powered generation engine. The CLI requires an active internet connection to reach this service.

🛠️ Development

This project is built with TypeScript and Node.js.

Build

To compile the TypeScript source code into JavaScript:

npm run build

This command will output the compiled JavaScript files to the dist directory.

TypeScript Configuration

The tsconfig.json specifies the TypeScript compiler options:

{
  "compilerOptions": {
    "target": "ES2022",
    "module": "NodeNext",
    "moduleResolution": "NodeNext",
    "esModuleInterop": true,
    "forceConsistentCasingInFileNames": true,
    "strict": true,
    "skipLibCheck": true,
    "types": ["node"],
    "outDir": "./dist"
  }
}

🤝 Contributing

Contributions are welcome! Please feel free to open issues or submit pull requests.

📄 License

This project is licensed under the ISC License. See the LICENSE file for more details.