Files
trailofbits-buttercup/.claude/skills/langfuse/references/cli.md
T
Riccardo Schirone f3e9934f1d docs(skills): add Langfuse agent skills (#545)
- .claude/skills/langfuse/: vendored from github.com/langfuse/skills (MIT).
  Covers platform-level usage: langfuse-cli, docs retrieval via llms.txt,
  instrumentation, prompt migration, SDK upgrades, error analysis,
  user-feedback scoring.
- .claude/skills/buttercup-langfuse/: project-specific wiring —
  common.llm.get_langfuse_callbacks(), the canonical RunnableConfig pattern
  used in patcher and seed-gen, and the Helm/values surface for k8s
  deployment. Defers platform questions to the upstream langfuse skill.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-19 09:21:29 +02:00

1.4 KiB

Langfuse CLI Reference

Documentation: https://langfuse.com/docs/api-and-data-platform/features/cli

Install

# Run directly (recommended)
npx langfuse-cli api <resource> <action>
bunx langfuse-cli api <resource> <action>

# Or install globally
npm i -g langfuse-cli
langfuse api <resource> <action>

Discovery

# List all resources and auth info
langfuse api __schema

# List actions for a resource
langfuse api <resource> --help

# Show args/options for a specific action
langfuse api <resource> <action> --help

# Preview the curl command without executing
langfuse api <resource> <action> --curl

Credentials

Set environment variables:

export LANGFUSE_PUBLIC_KEY=pk-lf-...
export LANGFUSE_SECRET_KEY=sk-lf-...
export LANGFUSE_HOST=https://cloud.langfuse.com  

Tips

  • Use --json for machine-readable JSON output
  • Use --curl to preview the HTTP request without executing
  • Pagination: use --limit and --page on list endpoints
  • All list commands support filtering — check <resource> <action> --help for available options
  • Prefer observations-v2s over observations — the v2 endpoint returns richer data
  • Prefer metrics-v2s over metrics — the v2 endpoint returns richer data
  • Prefer score-v2s over scores — the v1 scores resource only supports create/delete; use score-v2s for list and get operations