Installation

To install the htmldocs CLI globally, run the following command:

npm i -g htmldocs@latest

After installation, you can use the htmldocs command from anywhere in your terminal.

htmldocs init

Initializes a new htmldocs project in the current directory.

htmldocs login

Authenticates the CLI with the cloud. This allows you to publish your documents to the cloud.

htmldocs dev

Starts a local development server that will watch your files and automatically rebuild your document template when you make changes. Login not required.

Options

--dir
string
default:
"./documents"

Change the directory of your document templates.

--port
string
default:
"3000"

Port to run dev server on

htmldocs publish <file>

Publishes the document to the cloud for API use. Must be authenticated.

Be sure to run this from the root of your project.

Options

file
string
required

The file path of the document to publish.

htmldocs --help

Shows all available commands and options.

Options

-v, --verbose
boolean

Enable verbose logging

F.A.Q