Skip to content

generateDocs ​

Command: generateDocs
Category: Developer Tools
Status: Production Ready

Description ​

Auto-generate comprehensive database documentation from schema objects. This command creates documentation for tables, views, procedures, and functions with optional data statistics, grants, indexes, and triggers. Output can be generated in markdown, HTML, or PDF format with an automatically generated table of contents.

Syntax ​

bash
hana-cli generateDocs [options]

Aliases ​

  • gendocs
  • generateDocumentation

Command Diagram ​

Parameters ​

Options ​

OptionAliasTypeDefaultDescription
--schema-sstring-Schema to document
--objects-ostringallObject types to document. Choices: tables, views, procedures, functions, all
--output-fstring-Documentation output file path
--format--fmtstringmarkdownOutput format. Choices: markdown, html, pdf
--includeData--idbooleanfalseInclude data statistics in documentation
--includeGrants--igbooleantrueInclude grants information
--includeIndexes--iibooleantrueInclude index information
--includeTriggers--itbooleantrueInclude trigger information
--generateTOC--tocbooleantrueGenerate table of contents
--profile-pstring-CDS Profile for connection

Connection Parameters ​

OptionAliasTypeDefaultDescription
--admin-abooleanfalseConnect via admin (default-env-admin.json)
--conn-string-Connection filename to override default-env.json

Troubleshooting ​

OptionAliasTypeDefaultDescription
--disableVerbose--quietbooleanfalseDisable verbose output - removes all extra output that is only helpful to human readable interface
--debug-dbooleanfalseDebug hana-cli itself by adding output of LOTS of intermediate details

Examples ​

Basic Usage ​

bash
hana-cli generateDocs --schema MYSCHEMA --format markdown --output docs/

Generates markdown documentation for all objects in MYSCHEMA schema and saves to the docs/ folder.

Document Only Tables and Views ​

bash
hana-cli generateDocs --schema MYSCHEMA --objects tables,views

Generates documentation for only tables and views, excluding procedures and functions.

Generate HTML with Data Statistics ​

bash
hana-cli generateDocs --schema MYSCHEMA --format html --includeData --output schema-docs.html

Creates HTML documentation including data statistics for the schema.

Generate PDF without TOC ​

bash
hana-cli generateDocs --schema MYSCHEMA --format pdf --generateTOC false --output schema.pdf

Generates PDF documentation without a table of contents.

Minimal Documentation ​

bash
hana-cli generateDocs --schema MYSCHEMA --includeGrants false --includeIndexes false --includeTriggers false

Generates minimal documentation with only basic object information, excluding grants, indexes, and triggers.

See the Commands Reference for other commands in this category.

See Also ​