A growing collection of small tools that solve gaps not yet covered by the Langfuse
UI. The langfuse-utils CLI dispatches to individual tools; the first shipped tool,
copy-traces, copies traces into datasets for experimentation and evaluation workflows.
copy-traces(module:copy_traces) – copy traces into a dataset with optional filtering and dry-run support.
-
Create a
.envin the repo root (or export the variables):LANGFUSE_BASE_URLLANGFUSE_PUBLIC_KEYLANGFUSE_SECRET_KEYLANGFUSE_PROJECT_ID
-
Install dependencies (uses uv):
uv sync
-
Run the
copy-tracestool via the CLI:uv run langfuse-utils copy-traces <DATASET_NAME> --range <DAYS> \ [--environment ENV] [--model MODEL] [--dry-run]
- The CLI reports whether the dataset exists (with its id) or would be created
in
--dry-runmode, shows a progress bar using the known trace total, and lists each upserted (or would-be upserted) item by id while skipping already-imported traces.
- The CLI reports whether the dataset exists (with its id) or would be created
in
-
Ensure Python 3.14 and uv are available.
-
Install dev deps and hooks:
uv sync uv run pre-commit install
-
Run the full quality gate (required):
uv run poe check
This runs formatting, linting, tests (100% coverage), Markdown lint, and pre-commit hooks.
uv run poe check– required aggregate gateuv run poe ruff– lintuv run poe ruff-fmt– format checkuv run poe pytest– tests with coverageuv run poe pre-commit– all hooksuv run poe markdown– Markdown lint
- Environment is auto-loaded from
.envviapython-dotenv; never commit secrets. - Contributions should keep documentation (README.md and AGENTS.md) in sync with behavior and tooling.