CLI for adding new documentation to Devbook. The CLI command name is `docsets`. You can start documentation scraping and indexing based on configs in the `devbook-docsets` repository with the `create` sub-command. Then you can release documentation that f
npm install @devbookhq/docsets-pipeline-managerdocsets. You can start documentation scraping and indexing based on configs in the devbook-docsets repository with the create sub-command. Then you can release documentation that finished scraping and indexing with the release sub-command. If you want to update the documentation with new data, you run the create sub-command again and then update the documentation with the update-release sub-command.sh
$ npm i @devbookhq/docsets-pipeline-manager@latest -g --unsafe-perm=true --allow-root
`
You need to set one environment variable before you use the CLI:
1. GOOGLE_APPLICATION_CREDENTIALS - location of a JSON containing the GCP service account with permission to access PubSub and Secret Manager.CLI Usage
$3
The following command starts scraping and indexing documentation defined by configs to the default environment development:
`sh
$ docsets create
`If you want to use a different environment then use the
-e (--env) flag followed by the which is either development or production.
`sh
$ docsets create -e
`If you want to also deploy VMs for scraping then use the
-w (--workers) flag followed by the .
`sh
$ docsets create -w
`
> _WARNING:_ VMs created by specifying the CLI flag -w (--workers) are not yet automatically deleted. If you want the VMs deleted, you must do it manually by going to GCP console and deleting all instances named docsets-pipeline-worker- or by using the gcloud CLI.If you want to scrape and index a documentation locally you need to have the docsets pipeline running locally and then use the
-l (--local) flag.
`sh
$ docsets create -l
`
> _NOTE:_ The environment of the local docsets pipeline and the command environment modyfied by the -e (--env) flag must match.
$3
The following command starts an interactive prompt for releasing a scraped and indexed documentation to the default environment development.
`sh
$ docsets release
`
If you want to use a different environment then use the -e (--env) flag followed by the which is either development or production.
`sh
$ docsets release -e
`$3
The following command starts an interactive prompt for updating a released documentation in the default environment development.
`sh
$ docsets update-release
`
If you want to use a different environment then use the -e (--env) flag followed by the which is either development or production.
`sh
$ docsets update-release -e
`$3
The following command starts an interactive prompt for listing all finished, failed, and running works in the default environment development.
`sh
$ docsets list
`
If you want to use a a different environment then use the -e (--env) flag followed by the which is either development or production.
`sh
$ docsets list -e
`Release
To update the CLI bump the version in package.json and run the following command:
`sh
$ npm publish
``