Logfire comes with a CLI used for authentication and project management:
{{ logfire_help }}
You need to be authenticated to use the Logfire.
!!! abstract Read the Terms of Service and Privacy Policy if you want to know how we handle your data. 🤓
To authenticate yourself, run the auth
command in the terminal:
logfire auth
You will be prompted to select a data region (EU or US). To specify this
via the cli instead of interactively, use logfire --region eu auth
or logfire --region eu auth
Then you will be given the option to open logfire in your browser:
After pressing "Enter"
, you will be redirected to the browser to log in to your account.
Then, if you go back to the terminal, you'll see that you are authenticated! 🎉
To clean most the files created by Logfire, run the following command:
logfire clean
The clean command doesn't remove the logs, and the authentication information stored in the ~/.logfire
directory.
To also remove the logs, you can run the following command:
logfire clean --logs
The inspect command is used to identify the missing OpenTelemetry instrumentation packages in your project.
To inspect your project, run the following command:
logfire inspect
This will output the projects you need to install to have optimal OpenTelemetry instrumentation.
!!! warning "🚧 Work in Progress 🚧" This section is yet to be written, contact us if you have any questions.
To check the projects you have access to, run the following command:
logfire projects list
You'll see something like this:
❯ logfire projects list
┏━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┓
┃ Organization ┃ Project ┃
┡━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━┩
│ Kludex │ backend │
│ Kludex │ worker │
└──────────────┴────────────────┘
To use an already created project, run the following command:
logfire projects use <project-name>
For example, to use the backend
project, you can run:
logfire projects use backend
To create a new project, run the following command:
logfire projects new <project-name>
Follow the instructions, and you'll have a new project created in no time! 🥳