Datadog CLI
157 stars
official open-source Has MCP Cross-platform Linux macOS Actively maintained
Datadog's official CI/CD command-line tool. Upload sourcemaps, run Synthetic tests, instrument serverless functions, and report test results from your pipeline.
Datadog CLI has both a CLI and an MCP server. See when to use each
Part of the Datadog CLI tools for AI agents
What your agent can do
Every new microservice needs latency p99 monitors, error rate monitors, CPU/memory monitors, log error monitors, and SLO objectives. Creating each through the Datadog UI means filling out queries, setting thresholds, configuring notifications, adding tags, testing, saving. For one service, that's 5-10 monitors at 5-10 minutes each. For 50 services, that's an entire sprint of clicking. Your agent manages monitors as code through Terraform and validates deployments with `datadog-ci`.Your agent runs `datadog-ci sourcemaps upload` on every deploy to upload JavaScript sourcemaps. Stack traces in Datadog RUM and Error Tracking show your original source code instead of minified output. One pipeline command, automatic path mapping, upload validation before the pipeline moves on.Synthetic testing integrates directly into CI. Your agent runs `datadog-ci synthetics run-tests` in the pipeline, which triggers browser tests and API tests, blocks until completion, and fails the build if any test fails. Synthetic monitors become automated regression tests on every PR.For serverless teams, `datadog-ci lambda instrument` applies the full Datadog instrumentation stack to your Lambda functions: layers, environment variables, tracing libraries. One command per function instead of manual configuration. `uninstrument` rolls it back cleanly.Test Visibility through `datadog-ci junit upload` sends results from any JUnit XML framework to Datadog. Your agent surfaces flaky tests, slow tests, and failure trends across branches. The `datadog-ci dora deployment` command feeds deployment frequency into Datadog's DORA dashboard, connecting delivery velocity to production impact.Datadog launched its official MCP Server as generally available in March 2026. Your agent gets real-time access to logs, metrics, traces, and incidents via MCP alongside CLI pipeline commands. Bits AI handles natural language queries: "create a p99 latency monitor for the payments service that alerts PagerDuty."
Limitations
Datadog-only. Every command uploads to or configures Datadog's APIs. The Datadog Agent handles infrastructure metrics and APM traces independently. This CLI targets CI/CD pipeline integration (sourcemaps, synthetics, serverless instrumentation), not runtime monitoring. The Terraform provider overlaps for some operations like Lambda instrumentation.
Key Commands
datadog-ci sourcemaps upload Upload JavaScript sourcemaps to Datadog for RUM and Error Tracking deobfuscation
datadog-ci synthetics run-tests Run Synthetic monitoring tests from CI and fail the pipeline on test failures
datadog-ci lambda instrument Apply Datadog instrumentation to AWS Lambda functions for tracing and metrics
datadog-ci junit upload Upload JUnit XML test reports to Datadog Test Visibility
datadog-ci git-metadata upload Upload Git metadata to power the Source Code Integration in Datadog
datadog-ci sarif upload Upload SARIF static analysis reports to Datadog Code Analysis
datadog-ci dora deployment Send a deployment event to Datadog for DORA Metrics tracking
GitHub Stats
repo DataDog/datadog-ci
stars 157
language TypeScript
license Apache-2.0
last commit Mar 12, 2026
Alternatives
| tool | description |
|---|---|
| Datadog CLI | current tool |
| dogshell (dog) | Datadog's legacy Python CLI for posting metrics, events, and managing monitors. Less capable than datadog-ci for CI/CD workflows. |
| grafanactl | Grafana's official CLI for managing Grafana resources. Alternative for teams using Grafana instead of Datadog for observability. |
| New Relic CLI | New Relic's official CLI for managing monitors, deployments, and workflows. Direct competitor for teams on the New Relic platform. |
FAQ
- Is Datadog CI free?
- The `datadog-ci` CLI is free and open-source under the Apache 2.0 license. The Datadog platform features it integrates with (RUM, Synthetic Monitoring, Test Visibility, Serverless) each have their own pricing tiers. You need an active Datadog account with the relevant products enabled.
- How do you authenticate the Datadog CLI?
- Set the `DD_API_KEY` environment variable with your Datadog API key. Some commands also require `DD_APP_KEY` for application-level access. In CI pipelines, store these as secrets in your platform (GitHub Actions secrets, GitLab CI variables). The CLI reads environment variables automatically.
- Can Datadog CI run without Node.js?
- Yes. Standalone binaries are available for Linux (x64, arm64), macOS (x64, arm64), and Windows (x64). Download from the GitHub releases page. Self-contained executables, no Node.js or npm required. Your agent can use either the npm package or the standalone binary depending on the CI environment.
- Does Datadog have an MCP server?
- Yes. Datadog launched its official MCP Server as generally available in March 2026. Your agent gets secure, real-time access to logs, metrics, traces, and incidents via MCP. The MCP server complements the CI CLI. Use CLI for pipeline operations (uploads, tests) and MCP for observability queries.
- What CI platforms does datadog-ci support?
- Platform-agnostic. Works in any CI environment with Node.js or a standalone binary. GitHub Actions, GitLab CI, Jenkins, CircleCI, Bitbucket Pipelines, Azure DevOps, and more. Auto-detects common CI environments to extract git metadata and pipeline context.
Last verified: Mar 14, 2026