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.6

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.6
File
logfire_cli-0.1.6-py3-none-win_arm64.whl Python 3 none Windows ARM64 Details
logfire_cli-0.1.6-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
logfire_cli-0.1.6-py3-none-win32.whl Python 3 none Windows x86-32 Details
logfire_cli-0.1.6-py3-none-musllinux_1_2_x86_64.whl Python 3 none Linux musl 1.2+ x86-64 Details
logfire_cli-0.1.6-py3-none-musllinux_1_2_i686.whl Python 3 none Linux musl 1.2+ x86-32 Details
logfire_cli-0.1.6-py3-none-musllinux_1_2_armv7l.whl Python 3 none Linux musl 1.2+ ARMv7l Details
logfire_cli-0.1.6-py3-none-musllinux_1_2_aarch64.whl Python 3 none Linux musl 1.2+ ARM64 Details
logfire_cli-0.1.6-py3-none-manylinux_2_31_riscv64.whl Python 3 none Linux glibc 2.31+ RISC-V 64 Details
logfire_cli-0.1.6-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.6-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl Python 3 none Linux glibc 2.17+ IBM System/390x Details
logfire_cli-0.1.6-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl Python 3 none Linux glibc 2.17+ PowerPC 64-le Details
logfire_cli-0.1.6-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl Python 3 none Linux glibc 2.17+ x86-32 Details
logfire_cli-0.1.6-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl Python 3 none Linux glibc 2.17+ ARMv7l Details
logfire_cli-0.1.6-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details
logfire_cli-0.1.6-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details
logfire_cli-0.1.6-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details
logfire_cli-0.1.6-py3-none-linux_armv6l.whl Python 3 none linux armv6l Details

Total release size: 55.6 MB

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

Download URL logfire_cli-0.1.6-py3-none-win_arm64.whl
Size 2.7 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
3609cdce11c34e7ed5d7a6b1cee774b9de198a4c31632d6a18cb6423da888dce
BLAKE2b-256 checksum
How to use checksums
395faacd40290b357ed062f8012f2d4f8ce3911e107180822f20d4189bce72ff
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.6-py3-none-win_amd64.whl

Download URL logfire_cli-0.1.6-py3-none-win_amd64.whl
Size 2.9 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
8d3db3f730e2ff8f193d4410008deaddbbe7c0330120079b3daad6acf8fb5d52
BLAKE2b-256 checksum
How to use checksums
fb7a1549befcf54659d795363deced87fa7f4d48f4cc93bc6a8682d83f0da5a6
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.6-py3-none-win32.whl

Download URL logfire_cli-0.1.6-py3-none-win32.whl
Size 2.6 MB
Tags Python 3 Windows x86-32
SHA-256 checksum
How to use checksums
3b7797f92a140979fa4895b8125933ddcb38df524884c947c4d4ae5060c21b68
BLAKE2b-256 checksum
How to use checksums
4b6f4a29adedde48207dd4ac78780d8d87439e06fd561d87694b35e3ab7488c0
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.6-py3-none-musllinux_1_2_x86_64.whl

Download URL logfire_cli-0.1.6-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
54014c06ffd0eccb4371d6e7a9d2c8ee080a014d3d4fef29f9d6f51032c38828
BLAKE2b-256 checksum
How to use checksums
c3aea4c244d9d06b21bcf6d6e1a8a5e5824346720fa7c18bcd6d8ca2a5f4f392
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.6-py3-none-musllinux_1_2_i686.whl

Download URL logfire_cli-0.1.6-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
fa12d5b1078d7b3e03d14c2854a29346da0b33ed4eaeaea9f0eaa4a305e76765
BLAKE2b-256 checksum
How to use checksums
9032ae6c1f8fea8d655e795f83bcc091b46d4049d5fcade80e8341846dd934fd
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.6-py3-none-musllinux_1_2_armv7l.whl

Download URL logfire_cli-0.1.6-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
df0f65baa77bbd3967c53e63b15ad93b282d8aba26e2dcd427803c6155e097fa
BLAKE2b-256 checksum
How to use checksums
2609676d70cfcaaad9e0fdd22003bf8d812036e75dc19238a57d1f11481b6d23
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.6-py3-none-musllinux_1_2_aarch64.whl

Download URL logfire_cli-0.1.6-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
0112785c8693a71ce7e6e00552743995734495b2b100283bdd09c311f65ddd53
BLAKE2b-256 checksum
How to use checksums
a4eedf44f78e5169a64f833c2bee2ed1bfab5c1dc9622e3a589dd5dbdd868bf9
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.6-py3-none-manylinux_2_31_riscv64.whl

Download URL logfire_cli-0.1.6-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
365073577540c93fd601495ce92c6487e70890e8c158b7846f1973ffd3ede1cf
BLAKE2b-256 checksum
How to use checksums
0111353d562281d27b7a556952a93a947762dffcc974de46ffe462e91a735aa4
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.6-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL logfire_cli-0.1.6-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
170fc1ff53f4ead595a109d1ff60954de9dacffd9ebb7ac4037aa313c7ec8525
BLAKE2b-256 checksum
How to use checksums
2557ecb1c368d54d5200b04f18da61350cad82ab28b8c443a866b632387ec0a7
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.6-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl

Download URL logfire_cli-0.1.6-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
85f03faef5b9e522bec79d215afffcb83e2e7b3be54741b47d5dde15287bc6eb
BLAKE2b-256 checksum
How to use checksums
186bd6caf00d8eb123c4a0457a39512d9f8d8b1894fc5b6898ae04e18a453d2f
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.6-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl

Download URL logfire_cli-0.1.6-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
acec87135989a4097228e48e662105dd11ff74398e5ba53162991360e21e0870
BLAKE2b-256 checksum
How to use checksums
da06afb21f9678f2b878061ca42b892553031297b261b5d991cfd7525641d998
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.6-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl

Download URL logfire_cli-0.1.6-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
730df1bf7569c4e9eab3f8e1cfddd99e9f96dd423f55e81f75241066439ed5d9
BLAKE2b-256 checksum
How to use checksums
0163bb367db0e70b694c71b52070ec5b24f1a15b8a20a41be4921abdee76a0a0
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.6-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl

Download URL logfire_cli-0.1.6-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
85b1ef09489b86c8b9eb62ebbb137f62aa1fce02d4dcfef0ce8ec3bb5d46c00a
BLAKE2b-256 checksum
How to use checksums
a8f952726fcfbe634825de1e4668e43a4b355d426e8382d8f444443865e2f232
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.6-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL logfire_cli-0.1.6-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
2a2252842caffafe7c1d6a3955fc50d36b6734db84d46f186b0752574e5df533
BLAKE2b-256 checksum
How to use checksums
288db1e9c6da2d1ff16e67f23ec9bf41c6346824ed39cd6643fc23a6bbcfb54d
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.6-py3-none-macosx_11_0_arm64.whl

Download URL logfire_cli-0.1.6-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
761b2232092f18d30c84d5fd054337d1d60e741b1c172ba646909b1115d77a48
BLAKE2b-256 checksum
How to use checksums
f4c2dd862a3836ce40d569686c6a1a8a429d60d12f22010204a9dbc4db37c9ac
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.6-py3-none-macosx_10_12_x86_64.whl

Download URL logfire_cli-0.1.6-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
89e8310d74832af6a66f6a8ffdd7207a47f971f7f944d77a82e59c3042d0083a
BLAKE2b-256 checksum
How to use checksums
c2d6a3726a5515e662e9744c8140251e1fdfa24d4c518bb5d58ba63c8512d4f0
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.6-py3-none-linux_armv6l.whl

Download URL logfire_cli-0.1.6-py3-none-linux_armv6l.whl
Size 3.3 MB
Tags Python 3 linux armv6l
SHA-256 checksum
How to use checksums
9e3fbebf083dabecbeed0983e94d0ab171c2a0a5f05a33f8af173d337098f283
BLAKE2b-256 checksum
How to use checksums
2706caf023b537e599395daf1a3a23e4a22632ad46296a228f15733213c9901f
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

0.1.7

17 release files

This release

0.1.6 This release

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