Skip to main content

Logfire CLI

The Rust command-line interface for Pydantic Logfire. Sign in, query your traces and logs, manage projects and tokens, and connect your coding agent to Logfire from the terminal.

This package installs the native CLI, not the Python instrumentation SDK. Install an application SDK separately to send telemetry; see the Logfire documentation.

Install

Try it with uv:

uvx logfire-cli --help

Install it as an isolated command-line tool:

uv tool install logfire-cli
logfire --help

Or use pipx install logfire-cli. In an activated virtual environment, you can also run python -m pip install logfire-cli.

The package provides both logfire and logfire-cli. If another package already provides a logfire command, use logfire-cli or uvx logfire-cli to select this CLI explicitly.

Python 3.9 or newer is required for the launcher. Wheels include the matching prebuilt binary for macOS (ARM64 and x86-64), Windows (ARM64, x86, and x86-64), GNU/Linux (ARM64, ARMv7, x86, x86-64, PowerPC 64 LE, RISC-V 64, and IBM Z), and musl Linux (ARM64, ARMv6, ARMv7, x86, and x86-64). You do not need Rust installed. GNU/Linux requires glibc 2.17 or newer, except RISC-V 64, which requires glibc 2.31. The musl wheels support compatible Alpine Linux versions.

New to Logfire

From your application's directory, create an account, organization, and first project in one guided flow:

logfire --region us signup --org acme --project my-app
logfire --org acme project current

Replace acme and my-app with the real names you want. Use --region eu for the EU region. Browser OAuth credentials go to the operating system credential store; the project SDK credential stays under .logfire/ in your application.

Then add instrumentation with an installed coding agent:

logfire --org acme setup

Use an existing account

Use your real organization name in place of acme, and eu instead of us if your data is in the EU region:

logfire --region us --org acme auth
logfire --org acme mcp projects

Complete sign-in and approve access in your browser. OAuth credentials are stored in the OS credential store, scoped to the Logfire origin and organization.

Choose a project from the list, then query its data through the hosted Model Context Protocol (MCP) server:

logfire --org acme mcp query run 'SELECT message FROM records LIMIT 20' --project my-app

For scripts, make the target explicit and request non-interactive JSON output:

logfire --org acme --no-input --output json mcp projects

Connect a local project

From your application's directory, create or choose a project interactively:

logfire --org acme init

To connect an exact existing project without a picker:

logfire --org acme init use --name my-app --permission send
logfire project current

OAuth remains in the OS credential store; the SDK token stays with the local project. Keep credential files out of version control.

To create additional read or write tokens for that project:

logfire --org acme token read
logfire --org acme token write

Each command creates a new token and prints the secret once to standard output. Store it securely; do not paste it into logs, issues, or chat. These commands do not replace the project's saved SDK write token.

Run Python with automatic instrumentation

The CLI selects the active project interpreter and delegates instrumentation to the Logfire Python SDK installed in that environment:

logfire run app.py
logfire run -m uvicorn main:app
logfire run pytest tests/

Use --python .venv/bin/python when interpreter discovery is ambiguous. Run logfire help run for selection rules and passthrough behavior.

Set up instrumentation with a coding agent

With a supported coding agent installed, run this from your application's directory:

logfire --region us --org acme setup

The CLI detects installed agents and hands off the Logfire setup instructions bundled with this release. The agent can change your project to add instrumentation, using its normal permission and approval controls. It receives the selected target and project identity, but it does not inherit the CLI's LOGFIRE_API_KEY, LOGFIRE_TOKEN, or LOGFIRE_MCP_TOKEN.

If you already know the exact project and setup task, pass them explicitly:

logfire --region us --org acme setup --project api --task instrumentation

Use bare setup when you want the CLI and agent to discover the task from the current directory.

To inspect the instructions without launching an agent:

logfire --region us --org acme wizard --print-prompt

Help and updates

logfire help
logfire help mcp
logfire help wizard
uv tool upgrade logfire-cli

Use the upgrade command for a uv tool install installation; otherwise upgrade with the package manager you used to install it.

See the Logfire documentation for application instrumentation and platform guides. Logfire CLI is licensed under the MIT license.

Release files for logfire-cli 0.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for logfire-cli 0.1.7
File
logfire_cli-0.1.7-py3-none-win_arm64.whl Python 3 none Windows ARM64 Details
logfire_cli-0.1.7-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
logfire_cli-0.1.7-py3-none-win32.whl Python 3 none Windows x86-32 Details
logfire_cli-0.1.7-py3-none-musllinux_1_2_x86_64.whl Python 3 none Linux musl 1.2+ x86-64 Details
logfire_cli-0.1.7-py3-none-musllinux_1_2_i686.whl Python 3 none Linux musl 1.2+ x86-32 Details
logfire_cli-0.1.7-py3-none-musllinux_1_2_armv7l.whl Python 3 none Linux musl 1.2+ ARMv7l Details
logfire_cli-0.1.7-py3-none-musllinux_1_2_aarch64.whl Python 3 none Linux musl 1.2+ ARM64 Details
logfire_cli-0.1.7-py3-none-manylinux_2_31_riscv64.whl Python 3 none Linux glibc 2.31+ RISC-V 64 Details
logfire_cli-0.1.7-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details
logfire_cli-0.1.7-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl Python 3 none Linux glibc 2.17+ IBM System/390x Details
logfire_cli-0.1.7-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl Python 3 none Linux glibc 2.17+ PowerPC 64-le Details
logfire_cli-0.1.7-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl Python 3 none Linux glibc 2.17+ x86-32 Details
logfire_cli-0.1.7-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl Python 3 none Linux glibc 2.17+ ARMv7l Details
logfire_cli-0.1.7-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details
logfire_cli-0.1.7-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details
logfire_cli-0.1.7-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details
logfire_cli-0.1.7-py3-none-linux_armv6l.whl Python 3 none linux armv6l Details

Total release size: 55.6 MB

Release files / logfire_cli-0.1.7-py3-none-win_arm64.whl

Download URL logfire_cli-0.1.7-py3-none-win_arm64.whl
Size 2.7 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
2739f4e6c855c284b106c7e36a1f1fc08907227bd87927cd0d452811e9d63c88
BLAKE2b-256 checksum
How to use checksums
b6a16a06706d62462e05f435edd6e9f1fcaaafbe99c5e56a1cd565180f3a2d8f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / logfire_cli-0.1.7-py3-none-win_amd64.whl

Download URL logfire_cli-0.1.7-py3-none-win_amd64.whl
Size 2.9 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
4f97d7a89a6ff4a46d84878230e03226342bba3fbaeb7d2f031c544d96874b2f
BLAKE2b-256 checksum
How to use checksums
26240fb3e0394e60520aab8d9e5db5667f213f951db9f26a83c5baf6ce93703f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / logfire_cli-0.1.7-py3-none-win32.whl

Download URL logfire_cli-0.1.7-py3-none-win32.whl
Size 2.7 MB
Tags Python 3 Windows x86-32
SHA-256 checksum
How to use checksums
820fa215dc5f5c5f3e2dd82f07393d2a1e00da0e87be2a88bba250e7edb48d42
BLAKE2b-256 checksum
How to use checksums
6a6fc5a6c97e35468bdca9e05f9c936cdacb811bf75ed802f36a50182f4a30dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / logfire_cli-0.1.7-py3-none-musllinux_1_2_x86_64.whl

Download URL logfire_cli-0.1.7-py3-none-musllinux_1_2_x86_64.whl
Size 3.7 MB
Tags Linux musl 1.2+ x86-64 Python 3
SHA-256 checksum
How to use checksums
4b2839e53c6d48caf680c2689d6b9aea8281d7505617ea5e959349e9f7b1ca8a
BLAKE2b-256 checksum
How to use checksums
a6e81af43555e9c720c02878847e992b09f462624bb0b487ca10835d0a413941
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / logfire_cli-0.1.7-py3-none-musllinux_1_2_i686.whl

Download URL logfire_cli-0.1.7-py3-none-musllinux_1_2_i686.whl
Size 3.4 MB
Tags Linux musl 1.2+ x86-32 Python 3
SHA-256 checksum
How to use checksums
200a157bf348facb2c52248e515a932ac02b357a51aa274e9af42dd68fbce79f
BLAKE2b-256 checksum
How to use checksums
02062a2355f8dbf48b81ca09d043d3d3c431025b3a0216db1b1eae47e490b682
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / logfire_cli-0.1.7-py3-none-musllinux_1_2_armv7l.whl

Download URL logfire_cli-0.1.7-py3-none-musllinux_1_2_armv7l.whl
Size 3.3 MB
Tags Linux musl 1.2+ ARMv7l Python 3
SHA-256 checksum
How to use checksums
c9384c3c7bcb69d61f16eb7bf554bd55347de0f21455319c34764fb2d98d40fd
BLAKE2b-256 checksum
How to use checksums
ee86a080dfe197ff9e1ad899c9169c593a850fb6a59f55a3fd6a406ad66123b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / logfire_cli-0.1.7-py3-none-musllinux_1_2_aarch64.whl

Download URL logfire_cli-0.1.7-py3-none-musllinux_1_2_aarch64.whl
Size 3.5 MB
Tags Linux musl 1.2+ ARM64 Python 3
SHA-256 checksum
How to use checksums
9ebf5167e7e156314c02d8e6306c745f51f5a2903290567d546825a4e2a85822
BLAKE2b-256 checksum
How to use checksums
1f975f31ea4cfa108ff9fd093d480964896c4dcd248a30214d72ad78954516cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / logfire_cli-0.1.7-py3-none-manylinux_2_31_riscv64.whl

Download URL logfire_cli-0.1.7-py3-none-manylinux_2_31_riscv64.whl
Size 3.4 MB
Tags Linux glibc 2.31+ RISC-V 64 Python 3
SHA-256 checksum
How to use checksums
6c5fb7910496ffd0ff6f7caac06865531f9c4f2b413b3b1eb4b4c9d790a34cf8
BLAKE2b-256 checksum
How to use checksums
e5176cf24d623472424559e8b6a7c3fabf5509a6d58c975e8945d6b0fd399d43
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / logfire_cli-0.1.7-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL logfire_cli-0.1.7-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 3.6 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
017c5811d58664696cb28130775a5ac92dd46b0daf022aa7a091814b992f6ab6
BLAKE2b-256 checksum
How to use checksums
d37cc9244dd8444421b4bfcb4994ac2877834dfe05698e7a971339e0fc9edf2f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / logfire_cli-0.1.7-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl

Download URL logfire_cli-0.1.7-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl
Size 3.4 MB
Tags Linux glibc 2.17+ IBM System/390x Python 3
SHA-256 checksum
How to use checksums
22c24562917870514030cd5afceba5f2da0337bd41dca56583b101cc597e0ed2
BLAKE2b-256 checksum
How to use checksums
016fa05537f026bd41996f548e86f806cf9d9230b16adf8e1fcd2881603a4d52
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / logfire_cli-0.1.7-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl

Download URL logfire_cli-0.1.7-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Size 3.7 MB
Tags Linux glibc 2.17+ PowerPC 64-le Python 3
SHA-256 checksum
How to use checksums
54fa73ccdcb4fccc752f9b8154052cb11fc8c2c5d1fe2a8c19334133407aaca6
BLAKE2b-256 checksum
How to use checksums
d7a6f4efa714324f100b7bdeda145c64a9798a49b108d90f11dc1ac8548b074a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / logfire_cli-0.1.7-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl

Download URL logfire_cli-0.1.7-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
Size 3.6 MB
Tags Linux glibc 2.17+ x86-32 Python 3
SHA-256 checksum
How to use checksums
e6e5f6be753ae271825efd3b7eae4f5f95bba7221ba3baedb20c84134c6f5723
BLAKE2b-256 checksum
How to use checksums
f8258b7ddfbc72d6d0755818748847edbac082ee5947c3a63dc60a5656fa91ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / logfire_cli-0.1.7-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl

Download URL logfire_cli-0.1.7-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Size 3.2 MB
Tags Linux glibc 2.17+ ARMv7l Python 3
SHA-256 checksum
How to use checksums
68565c633b8e05435777156cbc6b9d6ed2d86a779ea05e3f7a30c7da896a9184
BLAKE2b-256 checksum
How to use checksums
11735c313959649d38957add20625c1f33197285cdb36e9daadcccb7e43f52ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / logfire_cli-0.1.7-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL logfire_cli-0.1.7-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 3.5 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
59ed5ab66c9e207d261a8f718c5c21fe64782d595429cfa45876c60da27021b5
BLAKE2b-256 checksum
How to use checksums
739be18989a1d9b941fd3569b2738871b7150545e4fd03ad76bcbe8698ac6eab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / logfire_cli-0.1.7-py3-none-macosx_11_0_arm64.whl

Download URL logfire_cli-0.1.7-py3-none-macosx_11_0_arm64.whl
Size 2.7 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
bc0e44bc4c6a32fc82733be7f6e395d34b3522941ac9398112e46924d8a86bad
BLAKE2b-256 checksum
How to use checksums
adadf259f98891c74870475b95ded7463bf7904b52053424f9ad9d758b539c0c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / logfire_cli-0.1.7-py3-none-macosx_10_12_x86_64.whl

Download URL logfire_cli-0.1.7-py3-none-macosx_10_12_x86_64.whl
Size 2.9 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
18f1422aec517a1e185d9bb93d67dd81f72b7fac96b1d9fa5a45b1a49d83eb78
BLAKE2b-256 checksum
How to use checksums
bfa92cc4dd94532f1e6588bcc3081638b6054bd7240d2b3b3bf6be21293057c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / logfire_cli-0.1.7-py3-none-linux_armv6l.whl

Download URL logfire_cli-0.1.7-py3-none-linux_armv6l.whl
Size 3.3 MB
Tags Python 3 linux armv6l
SHA-256 checksum
How to use checksums
2584f33cbc1ce0895904f16fd0259152b2e8db7d020e0c206f1972ad354de1c1
BLAKE2b-256 checksum
How to use checksums
0ddfc3478c83c95d7121735a627fe8806cbadf616101153c5999bcc5a990aa99
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

0.1.8

17 release files

This release

0.1.7 This release

17 release files

0.1.6

17 release files

0.1.5

17 release files

0.1.4

5 release files

0.1.3

5 release files

0.1.2

5 release files

0.1.1

5 release files

0.1.0

4 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page