read https://docs.npmjs.com/cli/version it's very straight forward.
Everything in npm config
cli is available to be set in .npmrc
like preid.
IE this allows your to define your prerelease identifier. By default npm follows this format.
MAJOR.MINOR.PATCH-PRE