Langfuse CLI is a helper tool for downloading and uploading evaluation datasets from your Langfuse account.
- Python: ensure Python 3.12 or newer is available.
- uv: install the uv tool, e.g.
pip install uv. - Install project dependencies:
You can replace
uv pip install -e .uvwithpipif you prefer a standard virtual environment.
Provide the following variables either in your environment or a .env file so the CLI can authenticate with Langfuse:
LANGFUSE_HOST=<your-langfuse-host>
LANGFUSE_PUBLIC_KEY=<your-public-key>
LANGFUSE_SECRET_KEY=<your-secret-key>
The CLI supports two commands. Use one of --down or --up.
uv run langfuse-cli -dThis downloads all datasets from Langfuse into the directory specified by datasets_target_dir (default datasets) in config.yaml.
uv run langfuse-cli -uThis reads dataset configuration files from datasets/configs and uploads them to Langfuse.
config.yaml contains the path where datasets are stored locally:
datasets_target_dir: datasetsAdjust this value if you want the files in a different location.