Getting Started

PolicyGen is a way to codify your privacy and terms of service policies and auto-generate great looking pages for your website.

Quick Start

Installation

You can use PolicyGen by installing a local copy into your node modules or using npx.

Terminal window
npm install --save-dev policygen

Configuration

You will need to create a policygen.json configuration file for each project. This is necessary to specify the specifics policies that your company implements.

To create the policygen.json file, run the init command in the root folder of your project.

Terminal window
npx policygen init

The init function will walk you through answering a bunch of policy questions in a wizard format, if you want to skip the wizard feel free to pass --default to emit a blank default policygen.json file instead.

Generation

Once your policygen.json file is setup you can generate your policy files.

Generate takes flags to specify which policies you want to generate, default :all

Terminal window
# Generate all policies
npx policygen generate
# Generate only privacy policy
npx policygen generate:privacy
# Generate only terms of service
npx policygen generate:terms