Automatically generate complete project documentation with a single command
npm install docly-cli
$3- README.md ā Project overview - SRS.md ā Software Requirements - ARCHITECTURE.md ā System architecture - WORKFLOW.md ā User flows - TEST_CASES.md ā Test documentation - API_DOCS.md ā API documentation - SETUP.md ā Installation guide - DEPLOYMENT.md ā Deployment guide - SECURITY.md ā Security documentation - REQUIREMENTS.md ā Requirements matrix |
$3- Architecture & Component ā System design - ER Diagram ā Entity relationships with PK/FK - DFD Level 1-3 ā Data flow diagrams - Sequence & Activity ā Process flows - Class, State, Use Case ā UML diagrams - Flowchart, Workflow, Deployment |
bash
Install globally (recommended)
npm install -g docly-cli
Or install as dev dependency
npm i docly-cli --save-dev
Or use directly with npx
npx docly-cli readme
`
After installation, navigate to your project and run:
`bash
docly readme
`
---
š Commands
$3
| Command | Description | Output |
|---------|-------------|--------|
| docly readme | Generate README.md | docs/README.md |
| docly srs | Generate SRS document | docs/SRS.md |
| docly architecture | Generate architecture documentation | docs/ARCHITECTURE.md |
| docly workflow | Generate workflow documentation | docs/WORKFLOW.md |
| docly testcases | Generate test cases | docs/TEST_CASES.md |
| docly api-docs | Generate API documentation | docs/API_DOCS.md |
| docly setup | Generate setup/installation guide | docs/SETUP.md |
| docly deploy | Generate deployment guide | docs/DEPLOYMENT.md |
| docly security | Generate security documentation | docs/SECURITY.md |
| docly requirements | Generate requirements matrix | docs/REQUIREMENTS.md |
$3
`bash
Specify output directory
docly readme -o ./documentation
Overwrite existing files
docly srs --overwrite
Choose AI provider
docly readme --ai gemini
`
---
š Diagram Generation (14 Types)
$3
`bash
Generate specific diagram type
docly diagram -t
Generate ALL diagrams at once
docly diagram --all
Direct diagram commands
docly diagram-er
docly diagram-class
docly diagram-sequence
`
$3
| Type | Command | Description |
|------|---------|-------------|
| Architecture | docly diagram-architecture | System architecture overview |
| Component | docly diagram-component | Component interaction diagram |
| Deployment | docly diagram-deployment | Deployment environment diagram |
| ER Diagram | docly diagram-er | Entity Relationship with PK/FK |
| Class | docly diagram-class | Class/Object structure |
| Sequence | docly diagram-sequence | Process sequence flow |
| State | docly diagram-state | State machine diagram |
| Activity | docly diagram-activity | Activity flow diagram |
| Use Case | docly diagram-usecase | Use case diagram |
| Flowchart | docly diagram-flowchart | General flowchart |
| Workflow | docly diagram-workflow | Workflow process diagram |
| DFD Level 1 | docly diagram-dfd-level-1 | Data Flow Diagram - Level 1 |
| DFD Level 2 | docly diagram-dfd-level-2 | Data Flow Diagram - Level 2 |
| DFD Level 3 | docly diagram-dfd-level-3 | Data Flow Diagram - Level 3 |
> š” All diagrams are generated as high-resolution PNG files in docs/diagrams/
---
āļø Configuration
$3
Create a .env file in your project root:
`env
Required: Google Gemini API Key
GEMINI_API_KEY=your_gemini_api_key_here
Optional: Custom output directory (default: ./docs)
OUTPUT_DIR=./docs
`
> š” Get your free Gemini API key at aistudio.google.com
$3
Create docly.config.json:
`json
{
"outputDir": "./docs",
"aiProvider": "gemini",
"diagramFormat": "mermaid"
}
`
---
š Output Structure
`
your-project/
āāā docs/
ā āāā README.md
ā āāā SRS.md
ā āāā ARCHITECTURE.md
ā āāā WORKFLOW.md
ā āāā TEST_CASES.md
ā āāā API_DOCS.md
ā āāā SETUP.md
ā āāā DEPLOYMENT.md
ā āāā SECURITY.md
ā āāā REQUIREMENTS.md
ā āāā diagrams/
ā āāā architecture.png
ā āāā er.png
ā āāā class.png
ā āāā component.png
ā āāā deployment.png
ā āāā sequence.png
ā āāā state.png
ā āāā activity.png
ā āāā usecase.png
ā āāā flowchart.png
ā āāā workflow.png
ā āāā dfd-level-1.png
ā āāā dfd-level-2.png
ā āāā dfd-level-3.png
āāā package.json
`
---
š§ Tech Stack
| Technology | Purpose |
|------------|---------|
| Node.js | Runtime environment |
| Commander.js | CLI framework |
| Google Gemini AI | AI-powered generation |
| Mermaid.js | Diagram rendering |
| Chalk & Ora | Beautiful CLI output |
---
š Requirements
- Node.js ā„ 16.0.0
- npm ā„ 8.0.0
- Internet connection
- Gemini API key
---
š¤ Contributing
Contributions are welcome! Please see our Contributing Guide.
`bash
Clone repository
git clone https://github.com/kunjjarsaniya/Docly.git
cd Docly
Install dependencies
npm install
Link for local testing
npm link
Run tests
npm test
`
---
š Troubleshooting
docly: command not found
`bash
npm install -g docly-cli
`
API key not found
`bash
Set environment variable
export GEMINI_API_KEY=your_key_here
Or create .env file in your project root
`
Permission denied (Unix/Mac)
`bash
chmod +x ./node_modules/.bin/docly
`
---
š License
This project is licensed under the MIT License.
`
MIT License Ā© 2026 Kunj Jarsaniya
``