# CLI Integration

> Use the TraceKit CLI to set up tracing, metrics, health checks, releases, source maps, alerts, incidents, Copilot, and SDK-powered dynamic logs.

- Canonical: https://tracekit.dev/docs/integration/cli

# TraceKit CLI Integration

The TraceKit CLI is the fastest way to connect a project to TraceKit.

## Install

```bash
brew install Tracekit-Dev/tap/tracekit
```

or:

```bash
curl -fsSL https://raw.githubusercontent.com/Tracekit-Dev/cli/main/install.sh | sh
```

## Quick Start

```bash
cd your-project
tracekit init
```

The init flow can:

- Detect your language or framework
- Create or verify your TraceKit account
- Generate and save an API key
- Send a test trace
- Offer SDK installation guidance
- Offer health-check setup
- Point you to the TraceKit dashboard

The free plan includes 200K traces/month and is meant to help developers get the first service, trace, and debugging workflow running without a credit card.

## Commands

```text
tracekit init          Interactive setup and verification
tracekit dashboard     Terminal service-health dashboard
tracekit traces        Browse and filter traces
tracekit logs          Live stream incoming trace events; not log ingestion
tracekit services      Service health, latency, errors, and operations
tracekit alerts        Manage alert rules and alert history
tracekit incidents     Triage inbox workflows
tracekit ask           Ask Copilot about observability data
tracekit releases      Create, deploy, finalize, and inspect releases
```

## Dynamic Logs

The CLI can help install SDKs that support dynamic logs, but dynamic logs are not the same as log ingestion.

Dynamic logs are runtime capture points that collect variables, stack traces, and trace context when enabled. They are bounded, can be turned off, and are designed to avoid the repeated "add a log line and redeploy" loop.

## API Surface

The CLI uses:

- `/v1/integrate/*` for setup and status
- `/v1/traces/*` for trace browsing and streaming
- `/v1/services/*` for service health
- `/v1/alerts/*` and `/v1/alert-rules/*` for alerting
- `/v1/triage-inbox/*` for incidents
- `/v1/copilot/*` for `tracekit ask`
- `/api/sourcemaps` for source map upload/delete
- Release APIs through authenticated application flows where supported

## Related Docs

- [API Integration](/docs/integration/api)
- [MCP Integration](/docs/integration/mcp)
- [Code Monitoring](/docs/code-monitoring)
- [Release Tracking](/docs/frontend/releases)
