Credentials. init saves a project write token locally; keep it out of git.
data. Traces you send go to the hosted Logfire backend, which is closed source.
Who it is forA developer adding observability to an existing Python service.
The problemWiring tokens and projects by hand is fiddly.
The outcomeA project linked to Logfire and ready to receive traces.
What you need first
- Python with pip
- A Logfire account, since the backend is a closed source hosted service
- uv for the uvx commands
Steps
- Install with
pip install logfire - From your application's directory run
uvx logfire-cli authto sign in - Run
uvx logfire-cli initto select or create a project and save its write token locally - Call Logfire.configure() in your code, which does not prompt for setup
Prompt for your agent
Using pydantic/logfire, install it with `pip install logfire`, run `uvx logfire-cli auth` and `uvx logfire-cli init` in <my app directory>, then add logfire.configure() to the entrypoint.
Caveat. The server application is closed source; only the SDK and docs are in the repo.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for pydantic/logfire and "Connect a Python project to Logfire in two commands"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer