Skip to content

Commit

Permalink
feat(Migration developer): Finished nr1 commands and added nr cli
Browse files Browse the repository at this point in the history
  • Loading branch information
nbaenam committed Apr 22, 2024
1 parent 1d32c24 commit 87d7b1f
Show file tree
Hide file tree
Showing 11 changed files with 665 additions and 429 deletions.
49 changes: 49 additions & 0 deletions src/content/docs/new-relic-solutions/build-nr-ui/newrelic-cli.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
title: 'New Relic CLI Reference'
tags:
- New Relic CLI
metaDescription: 'The command line tools for performing tasks against New Relic APIs'
freshnessValidatedDate: 2024-04-29
---

The New Relic CLI enables the integration of New Relic into your existing workflows. Be it fetching data from your laptop while troubleshooting an issue, or adding New Relic into your CI/CD pipeline.


## New Relic CLI commands [#nr-cli-commands]

Find details for the New Relic CLI command docs in GitHub.

### Options [nr-cli-commands-options]

```bash copyable=false
[output] --format string output text format [YAML, JSON, Text] (default "JSON")
[output] -h, --help help for newrelic
[output] --plain output compact text
```

### Commands [#commands]

- [newrelic apm](https://github.com/newrelic/newrelic-cli/blob/master/docs/cli/newrelic_apm.md). Interact with New Relic APM.

- [newrelic completion](https://github.com/newrelic/newrelic-cli/blob/master/docs/cli/newrelic_completion.md). Generates shell completion functions.

- [newrelic config](https://github.com/newrelic/newrelic-cli/blob/master/docs/cli/newrelic_config.md). Manage the configuration of the New Relic CLI.

- [newrelic decode](https://github.com/newrelic/newrelic-cli/blob/master/docs/cli/newrelic_decode.md). Use the decode url command to print out information encrypted within the URL.

- [newrelic documentation](https://github.com/newrelic/newrelic-cli/blob/master/docs/cli/newrelic_documentation.md). Generate CLI documentation.

- [newrelic entity](https://github.com/newrelic/newrelic-cli/blob/master/docs/cli/newrelic_entity.md). Interact with New Relic entities.

- [newrelic nerdgraph](https://github.com/newrelic/newrelic-cli/blob/master/docs/cli/newrelic_nerdgraph.md). Execute GraphQL requests to the NerdGraph API.

- [newrelic nerdstorage](https://github.com/newrelic/newrelic-cli/blob/master/docs/cli/newrelic_nerdstorage.md). Read, write, and delete NerdStorage documents and collections.

- [newrelic nrql](https://github.com/newrelic/newrelic-cli/blob/master/docs/cli/newrelic_nrql.md). Commands for interacting with the New Relic Database.

- [newrelic profile](https://github.com/newrelic/newrelic-cli/blob/master/docs/cli/newrelic_profile.md). Manage the authentication profiles for this tool.

- [newrelic version](https://github.com/newrelic/newrelic-cli/blob/master/docs/cli/newrelic_version.md). Show the version of the New Relic CLI.

- [newrelic workload](https://github.com/newrelic/newrelic-cli/blob/master/docs/cli/newrelic_workload.md). Interact with New Relic workloads.

63 changes: 63 additions & 0 deletions src/content/docs/new-relic-solutions/build-nr-ui/nr1-catalog.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
title: 'New Relic One CLI catalog commands'
template: 'GuideTemplate'
description: 'An overview of the CLI commands you can use to manage your New Relic app catalog information.'
tileShorthand:
title: 'Catalog CLI commands'
description: 'Manage your New Relic app catalog with our CLI.'
---

<Intro>

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

</Intro>

<br/>

| Command | Description |
|---|---|
| [`nr1 catalog:info`](#nr1-cataloginfo) | Shows the Nerdpack info stored in the catalog. |
| [`nr1 catalog:submit`](#nr1-catalogsubmit) | Gathers and submits the catalog info on the current folder. |

# Command details

***


## `nr1 catalog:info`
### Get catalog details
Shows the information about your application that's displayed in the catalog.

If run within a specific Nerdpack folder, the info from that Nerdpack will be shown. If you don't want to get info from your local Nerdpack, use the `--nerdpack-id=NERDPACK_ID` option to query from a specific Nerdpack.

### Usage
`$ nr1 catalog:info`

### Options
| | |
|---|---|
| `-f, --field=FIELD` | Specifies which field you want info from. |
| `-i, --nerdpack-id=NERDPACK_ID` | Specifies which Nerdpack to get info from. |
| `--profile=PROFILE` | The authentication profile you want to use. |
| `--verbose` | Adds extra information to the output. |

<br/>

***

## `nr1 catalog:submit`
### Send info to the catalog
Gathers the information you add to the catalog directory for your application and saves it to the catalog. See our [catalog docs](https://docs.newrelic.com/docs/new-relic-one/use-new-relic-one/build-new-relic-one/discover-manage-applications-new-relic-one-catalog#add_images_metadata_to_apps) for details on adding screenshots and metadata to your applications to make them easy to find, attractive, and informative.

This command must be run on a Nerdpack folder. The command will search for specific files using convention names.

### Usage
`$ nr1 catalog:submit`

### Options
| | |
|---|---|
| `-P, --skip-screenshots` | Skips upload of screenshot assets. |
| `--profile=PROFILE` | The authentication profile you want to use. |
| `--verbose` | Adds extra information to the output. |
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,139 @@ title: 'Catalog commands'
tags:
- New Relic One CLI
- Catalog commands
metaDescription: "xxxxx."
metaDescription: 'An overview of the CLI commands you can use to manage your New Relic app catalog information.'
freshnessValidatedDate: 2024-04-29
---

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

<table>
<thead>
<tr>
<th>
Command
</th>
<th>
Description
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
[`nr1 catalog:info`](#nr1-cataloginfo)
</td>
<td>
Shows the Nerdpack info stored in the catalog.
</td>
</tr>
<tr>
<td>
[`nr1 catalog:submit`](#nr1-catalogsubmit)
</td>
<td>
Gathers and submits the catalog info on the current folder.
</td>
</tr>
</tbody>
</table>


## `nr1 catalog:info` [#nr1-cataloginfo]

### Get catalog details [#nr1-cataloginfo-details]

Shows the information about your application that's displayed in the catalog.

If run within a specific Nerdpack folder, the info from that Nerdpack will be shown. If you don't want to get info from your local Nerdpack, use the `--nerdpack-id=NERDPACK_ID` option to query from a specific Nerdpack.

### Usage [#nr1-cataloginfo-usage]

`$ nr1 catalog:info`

### Options [#nr1-cataloginfo-options]


<table>

<tbody>
<tr>
<td>
`-f, --field=FIELD`
</td>
<td>
Specifies which field you want info from.
</td>
</tr>
<tr>
<td>
`-i, --nerdpack-id=NERDPACK_ID`
</td>
<td>
Specifies which Nerdpack to get info from.
</td>
</tr>
<tr>
<td>
`--profile=PROFILE`
</td>
<td>
The authentication profile you want to use.
</td>
</tr>
<tr>
<td>
`--verbose`
</td>
<td>
Adds extra information to the output.
</td>
</tr>
</tbody>
</table>


## `nr1 catalog:submit` [#nr1-catalogsubmit]

### Send info to the catalog [#nr1-catalogsubmit-send]

Gathers the information you add to the catalog directory for your application and saves it to the catalog.

This command must be run on a Nerdpack folder. The command will search for specific files using convention names.

### Usage [#nr1-catalogsubmit-usage]

`$ nr1 catalog:submit`

### Options [#nr1-catalogsubmit-options]

<table>

<tbody>
<tr>
<td>
`-P, --skip-screenshots`
</td>
<td>
Skips upload of screenshot assets.
</td>
</tr>
<tr>
<td>
`--profile=PROFILE`
</td>
<td>
The authentication profile you want to use.
</td>
</tr>
<tr>
<td>
`--verbose`
</td>
<td>
Adds extra information to the output.
</td>
</tr>
</tbody>
</table>

Original file line number Diff line number Diff line change
Expand Up @@ -24,47 +24,47 @@ This page includes a list of the common commands you have to start with the New
<tbody>
<tr>
<td>
[`nr1 autocomplete`](/docs/new-relic-solutions/build-nr-ui/nr1-cli/commands-details/#nr1-autocomplete)
[`nr1 autocomplete`](#nr1-autocomplete)
</td>
<td>
Displays autocomplete installation instructions.
</td>
</tr>
<tr>
<td>
[`nr1 create`](/docs/new-relic-solutions/build-nr-ui/nr1-cli/commands-details/#nr1-create)
[`nr1 create`](#nr1-create)
</td>
<td>
Creates a new component from a template: Nerdpack, Nerdlet, launcher, or catalog.
</td>
</tr>
<tr>
<td>
[`nr1 help`](/docs/new-relic-solutions/build-nr-ui/nr1-cli/commands-details/#nr1-help)
[`nr1 help`](#nr1-help)
</td>
<td>
Shows all `nr1` commands or details about each command.
</td>
</tr>
<tr>
<td>
[`nr1 nrql`](/docs/new-relic-solutions/build-nr-ui/nr1-cli/commands-details/#nr1-nrql)
[`nr1 nrql`](#nr1-nrql)
</td>
<td>
Fetches data using [NRQL](/docs/nrql/get-started/introduction-nrql-new-relics-query-language/).
</td>
</tr>
<tr>
<td>
[`nr1 profiles`](/docs/new-relic-solutions/build-nr-ui/nr1-cli/commands-details/#nr1-profiles)
[`nr1 profiles`](#nr1-profiles)
</td>
<td>
Manages the profiles you use to run CLI commands.
</td>
</tr>
<tr>
<td>
[`nr1 update`](/docs/new-relic-solutions/build-nr-ui/nr1-cli/commands-details/#nr1-update)
[`nr1 update`](#nr1-update)
</td>
<td>
Updates to the latest version of the CLI.
Expand All @@ -73,20 +73,17 @@ This page includes a list of the common commands you have to start with the New
</tbody>
</table>

# Command details [#command-details]


## nr1 autocomplete [#nr1-autocomplete]

By default, the command displays the autocomplete instructions for zsh. If you want instructions for bash, run `nr1 autocomplete bash`.
By default, the command displays the autocomplete instructions for `zsh`. If you want instructions for bash, run `nr1 autocomplete bash`.

### Usage

`$ nr1 autocomplete`

### Arguments


<table>

<tbody>
Expand Down

0 comments on commit 87d7b1f

Please sign in to comment.