Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

New Relic CLI

$ newrelic Official Med Risk
New Relic · Code & DevOps · Apache-2.0 · macos / linux / windows

Official command-line client for New Relic observability, executing NRQL queries, NerdGraph GraphQL operations, deployment markers, and entity searches. Returns JSON by default on query/search subcommands and authenticates cleanly via NEW_RELIC_API_KEY.

FCRS-1.0 Score
86 /100
Good
Medium Confidence
Zero-Friction Install
brew install newrelic-cli
CLI vs MCP Decision CLI Preferred vs MCP

Prefer newrelic CLI for fast NRQL and NerdGraph JSON queries in coding/on-call workflows without extra MCP schema overhead.

Agent-Readiness Checklist

✓ JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 21 / 25

Outputs clean JSON by default on nrql query, nerdgraph query, and entity search, with straightforward env-var authentication.

  • newrelic nrql query and newrelic nerdgraph query emit JSON
  • Headless auth via NEW_RELIC_API_KEY and NEW_RELIC_ACCOUNT_ID
Trust & Safety 20 / 25

Clean profile separation and read-only NRQL/entity query commands, though NerdGraph mutations can alter alerts/synthetics.

  • Named profiles in ~/.newrelic/ and read-only NRQL queries
Setup & Portability 14 / 15

Single static Go binary available via Homebrew and official releases across macOS, Linux, and Windows.

  • Zero-dependency Go executable
Utility & Efficiency 14 / 15

Covers NRQL telemetry, NerdGraph GraphQL escape hatch, entity search, and deployment markers.

  • Direct nerdgraph query access covers the full platform API
Maintenance & Lineage 9 / 10

Official New Relic CLI maintained under Apache-2.0.

  • First-party newrelic/newrelic-cli repository
Docs & Verifiability 8 / 10

Well-documented command guide in New Relic docs and subcommand --help.

  • Official docs covering NRQL, NerdGraph, and profiles

Security, Auth & Guardrails

Auth Modes
Env API Key Config File
Credential Storage

Stores profiles in ~/.newrelic/credentials.json and supports NEW_RELIC_API_KEY, NEW_RELIC_ACCOUNT_ID, and NEW_RELIC_REGION env vars.

Side Effects
Read-Only Local Write Remote Write
Cost & Quotas

Apache-2.0 open-source Go CLI; queries and ingest count toward your New Relic subscription.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# New Relic CLI (newrelic) Agent Rules
- Set `NEW_RELIC_API_KEY` and `NEW_RELIC_ACCOUNT_ID` for non-interactive queries.
- Prefer read-only `newrelic nrql query` and `newrelic entity search` when triaging incidents; confirm before mutating alerts or workloads.

Agent-Ready Command Recipes

Safe Read-Only Queries

Run an NRQL telemetry query
newrelic nrql query --query "SELECT count(*) FROM Transaction SINCE 1 hour ago"

Executes a read-only NRQL query and prints structured JSON results.

Search monitored entities as JSON
newrelic entity search --name checkout-service

Searches APM services and infrastructure entities, returning JSON metadata and GUIDs.

Controlled Writes & Previews

Record a deployment marker
newrelic entity deployment create --guid <entity-guid> --version 1.2.3

Attaches a version deployment marker to an entity GUID in New Relic.

Strengths for Agents

  • + Default JSON output on nrql query, nerdgraph query, and entity search.
  • + Single Go binary with clean NEW_RELIC_API_KEY / NEW_RELIC_ACCOUNT_ID env support.
  • + newrelic nerdgraph query provides full GraphQL API coverage.

Caveats & Pitfalls

  • ! Running newrelic install launches interactive guided instrumentation installers—avoid in headless agents.
  • ! API key permissions determine whether NerdGraph mutations are allowed.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI