• /
  • Log in

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:buildBuilds a Nerdpack
nr1 nerdpack:cleanRemoves all built artifacts
nr1 nerdpack:cloneClones a Nerdpack from a git repository
nr1 nerdpack:infoShows the state of your Nerdpack in the New Relic's registry
nr1 nerdpack:publishPublish this Nerdpack
nr1 nerdpack:serveServes your Nerdpack for testing and development purposes
nr1 nerdpack:tagTags a specific Nerdpack version
nr1 nerdpack:untagRemoves a tag from the registry
nr1 nerdpack:uuidShows or regenerates the UUID of a Nerdpack
nr1 nerdpack:validateValidates artifacts inside your Nerdpack

Command details


nr1 nerdpack:build

Builds a nerdpack

Usage

bash
$
nr1 nerdpack:build

Options

--extra-metadata-path=extra-metadata-path[default: extra-metadata.json] specify a json file path with extra metadata
--prerelease=prereleaseif specified, 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 authentication profile you want to use
--verboseadds extra information to the output

Description

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. It will search for nr1.json files in your subdirectories, validate them, and try to build them. This also runs nr1 nerdpack:validate before starting the build process.

nr1 nerdpack:clean

Removes all built artifacts

Usage

bash
$
nr1 nerdpack:clean

Options

--profile=profilethe authentication profile you want to use
--verboseadds extra information to the output

Description

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

nr1 nerdpack:clone

Clones a nerdpack from a git repository

Usage

bash
$
nr1 nerdpack:clone

Options

-f, --forceReplace destination folder if it exists
-p, --path=pathDirectory where to clone (defaults to the repository name)
-r, --repo=repo(required) Repository location (either an HTTPS or SSH path)
--profile=profilethe authentication profile you want to use
--verboseadds extra information to the output

Description

Given a git repository, it performs all the actions so that you can start using it. This includes, in order:

  1. Clone the repository
  2. Set the repository as remote upstream
  3. Install all of its dependencies (using npm)
  4. Generate a new UUID using your profile, and commit it

nr1 nerdpack:info

Shows the state of your nerdpack in the new relic's registry

Usage

bash
$
nr1 nerdpack:info

Options

-a, --allshow 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

Description

The default amount of versions shown is 10 but all versions can be shown if the --all (or -a) flag is used

nr1 nerdpack:publish

Publish this nerdpack

Usage

bash
$
nr1 nerdpack:publish

Options

-B, --skip-buildskip the previous build process
-T, --skip-tagdo not tag the version
-t, --tag=tag[default: STABLE]
--dry-runpublish process without actually publishing anything.
--extra-metadata-path=extra-metadata-path[default: extra-metadata.json] specify a json file path with extra metadata
--prerelease=prereleaseif specified, 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 authentication profile you want to use
--verboseadds extra information to the output

Description

This command will build and upload your Nerdpack to the registry.

If no additional parameters are passed in, this command will automatically tag the nerdpack version as STABLE. If you want to disable this behavior, pass the --skip-tag flag to the command.

See nr1 nerdpack:tag --help for more info on tags.

nr1 nerdpack:serve

Serves your nerdpack for testing and development purposes

Usage

bash
$
nr1 nerdpack:serve

Options

--profile=profilethe authentication profile you want to use
--verboseadds extra information to the output

Description

Launches a server with your local code, ready to be tested live on the platform.

nr1 nerdpack:tag

Tags a specific nerdpack version

Usage

bash
$
nr1 nerdpack:tag

Options

-V, --from-version=from-versionversion to tag. If it's not provided will use the one in package.json
-i, --nerdpack-id=nerdpack-idnerdpack uuid to deploy. If it's not provided will use the one in nr1.json
-t, --tag=tag[default: STABLE] tag name
--profile=profilethe authentication profile you want to use
--verboseadds extra information to the output

Description

A single version may have several tags, but each tag can only be applied to one version. Tagging a different version with an existing tag will untag the previous one.

We recommend using STABLE to tag the versions you want to show to your subscribers. See the command nr1 nerdpack:subscribe for more info.

Aliases

bash
$
$ nr1 nerdpack:deploy

nr1 nerdpack:untag

Removes a tag from the registry

Usage

bash
$
nr1 nerdpack:untag

Options

-i, --nerdpack-id=nerdpack-idnerdpack uuid to deploy. If it's not provided will use the one in nr1.json
-t, --tag=tag[default: STABLE] tag name
--profile=profilethe authentication profile you want to use
--verboseadds extra information to the output

Description

Specified tag will be removed. No files will be actually deleted.

Aliases

bash
$
$ nr1 nerdpack:undeploy

nr1 nerdpack:uuid

Shows or regenerates the uuid of a nerdpack

Usage

bash
$
nr1 nerdpack:uuid

Options

-f, --forceif present, it will override the existing UUID without asking
-g, --generategenerates a new UUID if not available
--profile=profilethe authentication profile you want to use
--verboseadds extra information to the output

Description

By default, prints the Universal Unique ID of the specified package. It also enables generation (or regeneration) of the UUID of your package, depending on the flags passed.

nr1 nerdpack:validate

Validates artifacts inside your nerdpack

Usage

bash
$
nr1 nerdpack:validate

Options

-l, --force-localdo not download new schema files
-r, --force-remoteforce download of new schema files
--profile=profilethe authentication profile you want to use
--verboseadds extra information to the output

Aliases

bash
$
nr1 nerdpack:ls
bash
$
nr1 nerdpack:val
Create issueEdit page
Copyright © 2021 New Relic Inc.