Skip to content

Commit

Permalink
Merge branch 'master' into dianabb_howto
Browse files Browse the repository at this point in the history
  • Loading branch information
timglaser committed Jun 27, 2020
2 parents 0463409 + 327a2d8 commit a917f3b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 53 deletions.
6 changes: 5 additions & 1 deletion src/components/GuideTile/GuideTile.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ const GuideTile = ({
</div>
)}
<div className={styles.timeEstimate}>
<FeatherIcon className={styles.timeIcon} name="clock" />
{duration ? (
<FeatherIcon className={styles.timeIcon} name="clock" />
) : (
<span>&nbsp;</span>
)}
{duration}
</div>
<h3 className={styles.title}>{title}</h3>
Expand Down
Binary file modified src/images/developercenter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
59 changes: 7 additions & 52 deletions src/markdown-pages/explore-docs/nr1-cli.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@ redirects:
---

<Intro>
To build a [New Relic One app](/use-cases/build-new-relic-one-applications), you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app.

To build a [New Relic One app](/build-apps/build-hello-world-app), you must install the New Relic One CLI. The CLI helps you build, publish, and manage your New Relic app.

</Intro>


To build a [New Relic One app](/use-cases/build-new-relic-one-applications), we provide you with a variety of tools, including the New Relic One CLI (command line interface). This page will explain how to use [CLI commands](/build-tools/new-relic-one-applications/cli#Commands) to:

We provide a variety of tools for building New Relic One apps, including the New Relic One CLI (command line interface). This page will explain how to use [CLI commands](#new-relic-one-cli-commands) to:

- Generate Nerdpack/Nerdlet templates

Expand All @@ -32,62 +34,15 @@ To build a [New Relic One app](/use-cases/build-new-relic-one-applications), we

## Installing the New Relic One CLI

### Install using 'Build your own application' launcher

From *within* New Relic, go to the [**Build your own application** launcher](https://one.newrelic.com/launcher/developer-center.launcher) and follow the instructions. This launcher will automatically generate an API key for the account you select, and give you the pre-populated commands to create a profile, generate your first "Hello World" app, and serve it locally.

![Build New Relic One application](../../images/developercenter.png)



### Download from Developer site

Alternately, you can follow the steps below. However, you will need to to create your New Relic [personal API Key](https://docs.newrelic.com/docs/apis/get-started/intro-apis/types-new-relic-api-keys#personal-api-key), which you can create from the **Account settings** of your New Relic account. Keep this key handy because you will need it when you create the profile used by the CLI.


<Steps>
<Step>
Download the CLI from and install it using one of the following methods depending on your platform:

- [mac installer](https://cli.nr-ext.net/installer.pkg)
- [windows installer](https://cli.nr-ext.net/installer.exe)
- linux `curl -s https://cli.nr-ext.net/installer.sh | bash`

</Step>
<Step>
Check to make sure the CLI is installed properly by issuing simply checking the version.

`nr1 --version`
</Step>



<Step>
The CLI allows you to have multiple profiles. Each profile has a distinct API key and region. This is helpful if you have multiple accounts, or different API keys for different applications. To create a profile, execute the following command, substituting in the name you desire, your persona API key, as well as the region. The default is the 'us'.

`nr1 profiles:add --name <profile name> --api-key <personal api key> --region us`

</Step>

<Step>
Now you are ready to create a simple "Hello World" app. Because we are all data nerds, we sometimes refer to apps as 'nerdpacks.'

`nr1 create --type nerdpack --name my-awesome-nerdpack`

</Step>

<Step>
Once the app is created, all you need to do is change into the directory and start the local server.

`cd my-awesome-nerdpack && nr1 nerdpack:serve`
</Step>

</Steps>


## New Relic One CLI Commands

This table gives descriptions and context for some of the most important CLI commands. For details on user permissions, see [Authentication and permissions](/build-tools/new-relic-one-applications/guide-to-authentication--data-access--and-permissions).
This table gives descriptions and context for some of the most important CLI commands. For details on user permissions, see [Authentication and permissions](/build-apps/set-up-dev-env).

| Topic | Command | Description |
| --- | --- | --- |
Expand All @@ -98,8 +53,8 @@ This table gives descriptions and context for some of the most important CLI com
| list CLI config | `nr1 config:list` | Lists your configuration choices. |
| Delete CLI config | `nr1 config:delete` | Removes the value of a specific configuration. |
| Update | `nr1 update` | Update to newest version of the CLI. |
| Profiles | `nr1 profiles` | Controls the profile you'll be running CLI commands as. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. For more on this, see [Authentication](/client-side-sdk/index.html#cli/Authentication) and [the workshop](https://github.com/newrelic/nr1-workshop/blob/master/lab-cli/INSTRUCTIONS.md). |
| Create | `nr1 create` | Create a new component template (Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. For an explanation of the file structure, see [Nerdpack file structure](https://docs.newrelic.com/docs/new-relic-one/use-new-relic-one/build-new-relic-one/new-relic-one-application-nerdpack-file-structure). |
| Profiles | `nr1 profiles` | Controls the profile you'll be running CLI commands as. You can have more than one profile, which is helpful for executing commands on multiple New Relic accounts. For more on this, see [the workshop](https://github.com/newrelic/nr1-workshop/blob/master/lab-cli/INSTRUCTIONS.md). |
| Create | `nr1 create` | Create a new component template (Nerdpack, Nerdlet, launcher, or catalog). The CLI will walk you through this process. For an explanation of the file structure, see [Nerdpack file structure](/reference/nerdpack-file-structure). |
| Clone | `nr1 nerdpack:clone` | Clone an [open source Nerdpack from our GitHub repository](/open-source/nerdpacks). |
| Serve locally | `nr1 nerdpack:serve` | Serves your Nerdpack locally, which makes it visible at [one.newrelic.com/?nerdpacks=local](https://one.newrelic.com/?nerdpacks=local). For details, see [Local development](/client-side-sdk/index.html#cli/LocalDevelopment). |
| Change associated accounts | `nr1 nerdpack:uuid` | Commands related to the Nerdpack's UUID (universal unique ID). This ID dictates the data a Nerdpack has access to, and who can subscribe to it. To deploy a Nerdpack you didn't make, you'll have to assign it a new UUID. For details, see [Access to data](/build-tools/new-relic-one-applications/guide-to-authentication--data-access--and-permissions#Appaccesstodata) and [the workshop](https://github.com/newrelic/nr1-workshop/blob/master/lab-cli/INSTRUCTIONS.md). |
Expand Down

0 comments on commit a917f3b

Please sign in to comment.