• Sign up

New Relic One CLI Nerdpack commands

To set up your Nerdpacks, use the commands below. You can click any command to see its usage options and additional details about the command.


CommandDescription
nr1 nerdpack:buildAssembles your Nerdpack into bundles
nr1 nerdpack:cloneClones a Nerdpack from a git repository.
nr1 nerdpack:serveServes your Nerdpack for testing and development purposes.
nr1 nerdpack:uuidShows or regenerates the UUID of a Nerdpack.
nr1 nerdpack:publishPublishes your Nerdpack to New Relic.
nr1 nerdpack:deployDeploys a Nerdpack version to a specific channel.
nr1 nerdpack:undeployUndeploys a Nerdpack version from a specific channel.
nr1 nerdpack:cleanCleans your development folders.
nr1 nerdpack:validateValidates the contents of your Nerdpack.
nr1 nerdpack:infoShows the state of your Nerdpack in the New Relic's registry.

Command details


nr1 nerdpack:build

Builds a Nerdpack

Runs a webpack process to assemble your Nerdpack into javascript and CSS bundles. As many other CLI commands, it should be run at the package.json level of your Nerdpack.

Usage

$ nr1 nerdpack:build OPTION

Options

--extra-metadata-path=extra-metadata-pathSpecify a json file path with extra metadata. [default: extra-metadata.json]
--prerelease=prereleaseIf specififed, the value will be appended to the current version of generated files. ie: --prerelease=abc. Then the version will be "1.2.3-abc".
--profile=profileThe authencation profile you want to use.
--verboseAdds extra information to the output.


nr1 nerdpack:clone

Clone an existing Nerdpack

Duplicates an existing Nerdpack onto your local computer. You can clone an open source Nerdpack from our Open Source GitHub repositories. After choosing a git repository, this command performs the following actions so that you can start using the Nerdpack:

  1. Clones the repository.
  2. Sets the repository as remote upstream.
  3. Installs all of its dependencies (using npm).
  4. Generates a new UUID using your profile, and commits it.

Usage

$ nr1 nerdpack:clone OPTION

Options

-r, --repo=REPORepository location (either an HTTPS or SSH path). (Required)
-p, --path=PATHDetermines the directory to clone to (defaults to the repository name).
-f, --forceReplaces destination folder if it exists.
--profile=PROFILEThe authentication profile you want to use.
--verboseAdds extra information to the output.


nr1 nerdpack:serve

Serve your Nerdpack locally

Launches a server with your Nerdpack locally on the New Relic One platform, where it can be tested live.

To learn more about working with apps locally, see our guide on how to serve, publish, and deploy documentation.

Usage

$ nr1 nerdpack:serve

Options

--profile=PROFILEThe authentication profile you want to use.
--verboseAdds extra information to the output.


nr1 nerdpack:uuid

Get your Nerdpack's UUID

Prints the UUID (Universal Unique ID) of your Nerdpack, by default. The UUID determines what data the Nerdpack can access and who can subscribe to the Nerdpack. To deploy a Nerdpack you didn't make, you'll have to assign it a new UUID by using the -g or --generate option.

For more details, see our GitHub workshop on GitHub.

Usage

$ nr1 nerdpack:uuid

Options

--profile=PROFILEThe authentication profile you want to use.
-f, --forceIf present, it will override the existing UUID without asking.
-g, --generateGenerates a new UUID if not available.
--verboseAdds extra information to the output.


nr1 nerdpack:publish

Publish your Nerdpack

Publishes your Nerdpack to New Relic.

Please note:

  • If no additional parameters are passed in, this command will automatically deploy the Nerdpack onto the DEV channel.
  • If you want to specify your own list of deploy channels, add the --channel option. For example, $ nr1 nerdpack:publish --channel BETA --channel STABLE.
  • If you want to disable this behavior, add -D or --skip-deploy to the command. Then, you can use nr1 nerdpack:deploy to perform a deploy manually.

For more on publishing and deploying, see Deploy to New Relic One.

Usage

$ nr1 nerdpack:publish

Options

-B, --skip-buildSkips the previous build process.
-D, --skip-deploySkips the following deploy process.
-c, --channel=DEV/BETA/STABLESpecifies the channel to deploys to. [default: STABLE]
-f, --forceForces the publish, overriding any existing version in the registry.
--dry-runUndergoes publishing process without actually publishing anything.
--extra-metadata-path=extra-metadata-pathSpecifies a json file .path with extra metadata. [default: extra-metadata.json]
--prerelease=STRINGThe value you enter will be appended to the current version of generated files.
--profile=PROFILEThe authentication profile you want to use.
--verboseAdds extra information to the output.


nr1 nerdpack:deploy

Deploy your Nerdpack to a channel

Deploys a Nerdpack version to a specific channel (DEV, BETA, or STABLE). A channel can only have one Nerdpack version deployed to it at one time. If a channel has an existing Nerdpack associated with it, deploying a new Nerdpack version to that channel will undeploy the previous one.

For more on publishing and deploying, see Deploy to New Relic One.

Usage

$ nr1 nerdpack:deploy OPTION

Options

-c, --channel=DEV/BETA/STABLESpecifies the channel to deploy to. (required)
-i, --nerdpack-id=NERDPACK_IDSpecifies the Nerdpack to deploy. By default, the command will use the one in package.json.
--from-version=VERSIONSpecifies which version to deploy. By default, the command will use the one in package.json.
--profile=PROFILEThe authentication profile you want to use.
--verboseAdds extra information to the output.


nr1 nerdpack:undeploy

Undeploy your Nerdpack

Undeploys a Nerdpack version from a specific channel (for example, DEV, BETA, or STABLE).

Usage

$ nr1 nerdpack:undeploy OPTION

Options

-c, --channel=DEV/BETA/STABLESpecifies the channel to undeploy from. (required)
-i, --nerdpack-id=NERDPACK_IDSpecifies the Nerdpack to deploy. By default, the command will use the one in package.json.
--profile=PROFILEThe authentication profile you want to use.
--verboseAdds extra information to the output.

nr1 nerdpack:clean

Removes all built artifacts

Cleans and removes the content and the developtment folders (dist/, tmp/).

Usage

$ nr1 nerdpack:clean OPTION

Options

--profile=profileThe authentication profile you want to use
--verboseAdds extra information to the output.

nr1 nerdpack:validate

Validates artifacts inside your Nerdpack

Validates artifacts inside your Nerdpack.

Usage

$ nr1 nerdpack:validate OPTION

Options

-l, --force-localThe authentication profile you want to use.
-r, --force-remoteForce download of new schema files.
--profile=profileThe authentication profile you want to uset.
--verboseAdds extra information to the output.

nr1 nerdpack:Info

Shows the state of your Nerdpack in the New Relic's registry

Shows the state of your Nerdpack in the New Relic's registry. The default amount of versions shown is 10 but all versions can be shown if the --all (or -a) flag is used

Usage

$ nr1 nerdpack:info OPTION

Options

-a, --all Show all versions.
-i, --nerdpack-id=nerdpack-idGet info from the specified Nerdpack instead of local one.
--profile=profileThe authentication profile you want to use.
--verboseAdds extra information to the output.