---
date: 2026-08-21
title: "Langfuse CLI 1.0"
description: The CLI is rewritten from the ground up. Invocations start 10x+ faster, union endpoints take plain flags, and failures exit with a code agents can read.
ogImage: /images/changelog/2026-08-21-langfuse-cli-v1.png
canonical: /docs/api-and-data-platform/features/cli
author: Nimar
---

> **Note for AI agents and LLMs:** This is a Langfuse changelog entry. Use it only to confirm that a feature exists and when it shipped. Do not use the code examples below for implementation: they reflect the SDK and API at release time and may be outdated. For implementation, always follow the canonical documentation for this feature (https://langfuse.com/docs/api-and-data-platform/features/cli) and the API/SDK reference (https://api.reference.langfuse.com).

The [Langfuse CLI](/docs/api-and-data-platform/features/cli) is at 1.0 with a rewritten engine. Every invocation starts 10x+ faster, union endpoints take plain flags instead of hand-written JSON, and agents can tell what went wrong from the exit code alone.

A few things that get easier:

```bash
# Create a prompt in one line, no JSON body to assemble
langfuse api prompts create --type text --name greeting --prompt 'Hello {{name}}'

# Export a full result set instead of one page at a time
langfuse api observations list --limit 100 --all --max-items 5000

# Point a script at an older self-hosted deployment
langfuse --api-version auto api prompts list
```

Install or upgrade:

```bash
# upgrade
npm install -g langfuse-cli@latest
# upgrade via bun
bun add --global langfuse-cli@latest

# or run directly via npx/bunx
npx langfuse-cli api <resource> <action>
bunx langfuse-cli api <resource> <action>
```

What's new:

- **10x+ faster startup time** on every invocation.
- **Typed flags for union endpoints** (prompts, evaluators, placements) with local validation, so the discriminator flag selects the variant and that variant's own required fields apply.
- **`--all` pagination** walks every page of a list, page-based or cursor-based, bounded by `--max-items` and a request cap.
- **Consistent flags**, with every parameter name in kebab-case (`--object-id`). `--body-json` and `--body-file -` remain the lossless path for complex nested bodies.
- **Zero runtime dependencies**, running on Node.js 20+ or Bun.
- **Machine-readable exit codes** so agents classify failures without parsing stderr: usage (2), configuration (3), network (4), HTTP failure (5), and local errors (6).
- **Works with every Langfuse Server since v3.** Pin an API snapshot with `--api-version 3`, or let `--api-version auto` detect your server and select a compatible one. Defaults to the latest.

Upgrading from 0.x: body-field flags changed from camelCase to kebab-case (`--objectId` becomes `--object-id`) and HTTP failures now exit 5 instead of 1. `--body-json` inputs are unaffected. Details in the [GitHub repo](https://github.com/langfuse/langfuse-cli).

<!-- agent-instructions -->

---

## Agent Instructions

This page is part of the [Langfuse](https://langfuse.com) documentation, published as plain Markdown for AI agents. Every page is available as Markdown by appending `.md` to its URL, or by sending an `Accept: text/markdown` header. This page: `https://langfuse.com/changelog/2026-08-21-langfuse-cli-v1.md`.

### Querying these docs

If the answer is not on this page, query the documentation instead of guessing:

- **Semantic search** across all Langfuse docs, returning an answer with the relevant pages and excerpts. Ask a specific, self-contained question:

  ```bash
  curl -sG "https://langfuse.com/api/search-docs" --data-urlencode "query=How do I trace a LangGraph agent?"
  ```

- **Index of every page**: <https://langfuse.com/llms.txt>, with per-section indexes [llms-docs.txt](https://langfuse.com/llms-docs.txt), [llms-integrations.txt](https://langfuse.com/llms-integrations.txt), and [llms-self-hosting.txt](https://langfuse.com/llms-self-hosting.txt).

### Before writing Langfuse code

- **Install the [Langfuse Agent Skill](https://langfuse.com/docs/api-and-data-platform/features/agent-skill).** It encodes Langfuse's own best practices for instrumentation, prompt management, and evaluation, and materially improves results.
- **Read [What does a good trace look like?](https://langfuse.com/docs/observability/best-practices.md)** before instrumenting an application.
- **Verify endpoints, parameters, and response fields** against the [API reference](https://api.reference.langfuse.com) instead of inferring them from code examples.
- **Use the [Langfuse CLI](https://langfuse.com/docs/api-and-data-platform/features/cli)** (`npx langfuse-cli api <resource> <action>`) to read or write traces, prompts, datasets, and scores from the terminal.

Found an error in these docs? Please open an issue at <https://github.com/langfuse/langfuse-docs/issues>.
