Yes using npm install git+https://github.com/DS4SD/docling.git is the correct approach to install a package directly from its GitHub repository.
npm install git+https://github.com/DS4SD/docling.git
You can verify by checking the node modules