Skip to content

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

When to use

Datadog CI is the bridge between your CI/CD pipeline and the Datadog platform. If your team runs Datadog for monitoring, this CLI is how you automate the integration points that would otherwise require manual uploads or custom API calls.The most common use case is uploading sourcemaps. If you use Datadog RUM or Error Tracking for a JavaScript application, you need to upload sourcemaps on every deploy so stack traces show your original source code instead of minified gibberish. The sourcemaps upload command handles this in one line, maps minified paths to production URLs, and validates the upload before your pipeline moves on.Synthetic testing in CI is the second major win. You define Synthetic browser tests and API tests in Datadog, then run them from your pipeline with datadog-ci synthetics run-tests. The pipeline blocks until the tests complete and fails if any test fails. This turns your Datadog Synthetic monitors into automated regression tests that run on every pull request or deploy.For serverless teams, the lambda instrument command saves significant time. Instead of manually configuring Lambda layers, environment variables, and tracing libraries for each function, you point the CLI at your functions and it applies the full Datadog instrumentation stack. The uninstrument command rolls it back cleanly.Test Visibility integration through junit upload lets you send test results from any test framework that outputs JUnit XML. Datadog surfaces flaky tests, slow tests, and test failure trends across branches — data that is hard to get from raw CI logs alone.The DORA metrics deployment command feeds deployment frequency and change lead time data into Datadog's DORA dashboard, connecting your delivery velocity to your monitoring data. If you track engineering performance metrics, this closes the loop between deploys and production impact.Install it in any CI environment that has Node.js or download the standalone binary for environments where npm is not available.

When to skip

Skip Datadog CI if you do not use Datadog as your monitoring platform. This tool is tightly coupled to the Datadog product — every command either uploads data to Datadog's APIs or configures integrations with Datadog's agents. If you use Grafana, New Relic, Prometheus, or another observability stack, this CLI does nothing useful for you.If you only use Datadog for infrastructure monitoring and do not use features like RUM, Synthetic Monitoring, Test Visibility, or Serverless, you may not need this CLI at all. The Datadog Agent handles infrastructure metrics and APM traces without the CI CLI. This tool is specifically for CI/CD pipeline integration points — uploading artifacts, running tests, and configuring serverless instrumentation.For teams evaluating Datadog versus alternatives, be aware that this CLI reinforces platform lock-in. The sourcemaps you upload, the Synthetic tests you run, and the DORA metrics you report all live inside Datadog. If you switch monitoring platforms later, you will need to rebuild these integrations with a different tool.If your pipeline already uses Datadog's GitHub integration or the Datadog Terraform provider for configuration, the CLI may overlap with functionality you already have. The Terraform provider can configure Lambda instrumentation declaratively, and the GitHub integration can link commits without explicit git-metadata uploads. Check whether an existing integration already covers your use case before adding another tool to your pipeline.Small teams with simple deployments may find the overhead of installing and configuring a CI-specific tool unnecessary. If you deploy once a day and your team can check Datadog manually, the automation this CLI provides may not justify the setup cost.

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.
datadog-cli (Rust) Unofficial Rust-based CLI for querying Datadog metrics. Lightweight alternative for read-only Datadog operations.
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 tool itself is free and open-source under the Apache 2.0 license. However, the Datadog platform features it integrates with — RUM, Synthetic Monitoring, Test Visibility, Serverless Monitoring — each have their own pricing tiers. You need an active Datadog account with the relevant products enabled for the CLI commands to work.
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 CI platform (GitHub Actions secrets, GitLab CI variables, etc). The CLI reads these 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 them from the GitHub releases page. These are self-contained executables that do not require Node.js, npm, or any runtime dependencies.
Does Datadog have an MCP server?
Yes. Datadog launched its official MCP Server as generally available in March 2026. The MCP server gives AI agents secure, real-time access to Datadog observability data including logs, metrics, traces, and incidents. It is separate from the CI CLI but complements it for agent-driven monitoring workflows.
What CI platforms does datadog-ci support?
Datadog CI is platform-agnostic. It works in any CI environment that can run Node.js or execute a standalone binary — GitHub Actions, GitLab CI, Jenkins, CircleCI, Bitbucket Pipelines, Azure DevOps, and others. It auto-detects common CI environments to extract git metadata and pipeline context.

Last verified: Mar 14, 2026