# CLI Observability with Langfuse (/typescript-sdk/cli-observability)

Track LLM operations during pull command with Langfuse



The Inkeep CLI includes built-in observability for tracking LLM operations during the `pull` command. This allows you to monitor costs, latency, and quality of AI-generated code across different LLM providers.

## Overview

When you run `inkeep pull`, the CLI uses LLMs to generate TypeScript files for your agents, tools, and components. With Langfuse integration enabled, you can:

* **Track token usage and costs** across Anthropic, OpenAI, and Google models
* **Monitor generation latency** to identify slow operations
* **View complete traces** of multi-file code generation
* **Analyze placeholder optimization** impact on token savings
* **Debug failed generations** with full context

## Setup

### 1. Create a Langfuse Account

Sign up for a free account at [cloud.langfuse.com](https://cloud.langfuse.com) (EU region) or [us.cloud.langfuse.com](https://us.cloud.langfuse.com) (US region).

### 2. Get API Keys

From your Langfuse dashboard:

1. Navigate to **Settings** → **API Keys**
2. Create a new API key pair
3. Copy both the **Secret Key** (`sk-lf-...`) and **Public Key** (`pk-lf-...`)

### 3. Configure Environment Variables

Add these variables to your `.env` file in your project root:

```bash