auto-docify
v1.0.1
Published
Creates README file for projects automatically
Maintainers
Readme
auto-docify
📖 Description
auto-docify is a lightweight CLI tool that automatically creates (or updates) a high‑quality README.md for any project. It scans your source files, extracts useful information, and leverages the Groq LLM API to craft polished documentation.
Key capabilities:
- File scanning – walks through your project and collects file names, structure, and metadata
- AI‑powered writing – uses Groq's LLM to generate human‑friendly documentation
- Existing README awareness – reads and enhances an existing
README.mdinstead of overwriting it - Your API key – users provide their own Groq API key (no shared keys)
🚀 Quick Start
1. Install globally
npm install -g auto-docify2. Get your Groq API key
Get a free API key from https://groq.com
3. Run the generator
auto-docify "/path/to/your/project" -k "your_groq_api_key"After the command finishes, a fresh README.md will appear in the target directory.
🛠️ Installation
As a global CLI
npm install -g auto-docifyAs a development dependency
npm install -D auto-docifyPrerequisites
| Requirement | Version | | ---------------- | ------------------------------------------------ | | Node.js | >= 18 | | npm | >= 8 | | Groq API key | Obtain from https://groq.com |
📦 Usage
CLI Syntax
auto-docify [options] <projectPath>| Option | Alias | Description |
| ------ | ----------- | ---------------------------- |
| -k | --api-key | Your Groq API key (required) |
| -h | --help | Show help information |
Examples
# Generate README for a project (required -k flag)
auto-docify "/path/to/project" -k "gsk_xxxxxxxx"
# Generate README for current directory
auto-docify . -k "gsk_xxxxxxxx"
# Show help
auto-docify --helpUsing with node directly
# Set API key as environment variable
set GROQ_API_KEY=your_key
node index.js "/path/to/project"Programmatic API
If you prefer to call the generator from another Node script:
const generateReadme = require("auto-docify");
(async () => {
const markdown = await generateReadme("/my/project", {
apiKey: "gsk_xxxxxxxx",
});
console.log("README generated!");
})();Or using environment variable:
process.env.GROQ_API_KEY = "gsk_xxxxxxxx";
const generateReadme = require("auto-docify");
await generateReadme("/my/project");✨ Features
| Feature | Description | | ------- | ---------------------------------------------------------------------- | | ✅ | File scanner – walks through project and collects metadata | | ✅ | Existing README reader – parses current README to preserve content | | ✅ | AI integration – uses Groq API for generating documentation | | ✅ | Custom prompts – builds context‑aware prompts for the LLM | | ✅ | Project analyzer – detects language, tech stack, and structure | | ✅ | CLI interface – quick, one‑liner generation | | ✅ | Programmatic API – use as a library in your own code |
🏗️ Tech Stack
| Layer | Technology |
| -------------- | ------------------------------------------------------------- |
| Runtime | Node.js (v18+) |
| CLI Framework | Native process.argv handling |
| AI Provider | groq-sdk |
| Env Management | dotenv |
| Code Analysis | Custom scanners (helpers/scanner.js, helpers/analyzer.js) |
🤝 Contributing
Contributions are welcome! Follow these steps:
- Fork the repository
- Clone your fork:
git clone https://github.com/yourusername/auto-docify.git - Create a feature branch:
git checkout -b feature/awesome-new-feature - Install dependencies:
npm install - Make your changes and test locally:
node index.js /test/project -k "your_key" - Commit and push to your fork
- Open a Pull Request
📝 License
Distributed under the MIT License. See the LICENSE file for details.
📚 Related Projects & Resources
Happy documenting! 🎉
