{"id":14964501,"url":"https://github.com/loguru-ai/loguru-cli","last_synced_at":"2026-01-05T09:48:37.048Z","repository":{"id":249823902,"uuid":"832059443","full_name":"Loguru-AI/Loguru-CLI","owner":"Loguru-AI","description":"An interactive commandline interface that brings intelligence to your logs.","archived":false,"fork":false,"pushed_at":"2024-07-30T17:05:10.000Z","size":112,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-26T04:15:06.367Z","etag":null,"topics":["ai","artificial-intelligence","gen-ai","generative-ai","llama","llama3","llm","log","log-ai","log-analysis","log-analytics","log-intelligence","logs-ai","logs-intelligence","ollama"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Loguru-AI.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-22T09:18:06.000Z","updated_at":"2025-03-21T20:40:06.000Z","dependencies_parsed_at":"2024-07-25T15:57:18.462Z","dependency_job_id":"56bc55fe-f3a9-4b82-b43f-3ef6f7106d57","html_url":"https://github.com/Loguru-AI/Loguru-CLI","commit_stats":{"total_commits":7,"total_committers":1,"mean_commits":7.0,"dds":0.0,"last_synced_commit":"e0bc08109d9790189d7aec822aa252a02f0aff89"},"previous_names":["loguru-ai/loguru-cli"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Loguru-AI%2FLoguru-CLI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Loguru-AI%2FLoguru-CLI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Loguru-AI%2FLoguru-CLI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Loguru-AI%2FLoguru-CLI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Loguru-AI","download_url":"https://codeload.github.com/Loguru-AI/Loguru-CLI/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245585810,"owners_count":20639671,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","artificial-intelligence","gen-ai","generative-ai","llama","llama3","llm","log","log-ai","log-analysis","log-analytics","log-intelligence","logs-ai","logs-intelligence","ollama"],"created_at":"2024-09-24T13:33:16.445Z","updated_at":"2026-01-05T09:48:36.993Z","avatar_url":"https://github.com/Loguru-AI.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Loguru CLI\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/Loguru-AI/Loguru-CLI/main/loguru.png\" width=\"200\" alt=\"\"\u003e\n\u003c/p\u003e\n\nAn interactive commandline interface that brings intelligence to your logs.\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://pypi.org/project/loguru-cli/\"\u003e\n        \u003cimg alt=\"PyPI - Version\" src=\"https://img.shields.io/pypi/v/loguru-cli?style=for-the-badge\u0026label=Latest%20Version\u0026color=green\u0026link=https%3A%2F%2Fpypi.org%2Fproject%2Floguru-cli%2F\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://pypi.org/project/loguru-cli/\"\u003e\n        \u003cimg alt=\"PyPI - Downloads\" src=\"https://img.shields.io/pypi/dm/Loguru-CLI?style=for-the-badge\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n### What is it?\n\n**Loguru-CLI** (read as \"Log Guru\" 📋🧘) is a Python package that brings intelligence to your logs. It is designed to be a\nuniversal tool for log\naggregation and analysis, with seamless integrations with any LLM (Large Language Model), whether self-hosted or\ncloud-based.\n\n### Features\n\n- Leverage LLMs to gain insights from your logs.\n- Easily integrate with any LLM (self-hosted or cloud-service offerings).\n- Easily hook up any log sources to gain insights on your logs. Perform refined/advanced queries supported by the\n  logging platform/tool (by applying capabilities such as function-calling (tooling) of LLM) and gain insights on the\n  results.\n- Save and replay history.\n- Scan and rebuild index from your logs.\n- Markdown-based pretty-printing of LLM responses in your console\n\n\u003e [!NOTE]\n\u003e Currently supports filesystem-based logs only, with plans to extend support to more log sources soon.\n\n### Roadmap\n\n#### Log sources\n\n| Log Source | Availability |\n|------------|--------------|\n| Log files  | ✅️           |\n| ELK Stack  |              |\n| Graylog    |              |\n\n#### LLM Integrations\n\n| LLM Integration | Availability | Additional Info                                                      |\n|-----------------|--------------|----------------------------------------------------------------------|\n| Ollama          | ✅️           |                                                                      |\n| Gemini          | ✅️           | Generate API Key from [here](https://aistudio.google.com/app/apikey) |\n| OpenAI          |              |                                                                      |\n| Amazon Bedrock  |              |                                                                      |\n\n### Getting Started\n\n```shell\npip install loguru-cli\n```\n\n\u003e [!NOTE]  \n\u003e Install one of these based on your environment - `faiss-gpu==1.7.2` or `faiss-cpu==1.8.0.post1`\n\n#### Show config\n\n```shell\nloguru show-config\n```\n\n#### Scan and rebuild index from log files\n\n```shell\nloguru scan\n```\n\nThis takes some time to scan your logs.\n\n```text\nUsing config: /Users/macuser/.loguru/config.json\nScanning log locations to rebuild index. Please be patient. This may take a while.\nScanning directory: /Users/macuser/logs/auth...\nProcessing /Users/macuser/logs/auth/auth-service.log...\nCreating new vector store with logs of /Users/macuser/logs/auth/auth-service.log...\nScanning directory: /Users/macuser/logs/customer-details...\nProcessing /Users/macuser/logs/customer-details/customer-details-service.log...\nUpdating vector store with logs of /Users/macuser/logs/customer-details/customer-details-service.log...\nScanning complete.\n```\n\n#### Run app\n\n```shell\nloguru run\n```\n\n#### Sample Interactions\n\n```text\n\u003e\u003e\u003e List all the errors\n\n1. The error message indicates that there is a problem connecting to the PostgreSQL database at localhost on port 5432. Specifically, it says \"Connection refused\". This means that either the hostname or port number is incorrect, or the postmaster (the process that manages the PostgreSQL server) is not accepting TCP/IP connections.\n2. The stack trace shows that the problem is occurring in the HikariCP connection pool, which is being used to manage connections to the database. Specifically, it says \"Exception during pool initialization\". This suggests that there may be a problem with the configuration of the connection pool or the database connection settings.\n3. It is also possible that there is a firewall or network issue preventing the connection from being established. For example, if there is a firewall on the server running PostgreSQL, it may be blocking incoming connections on port 5432.\n```\n\n```text\n\u003e\u003e\u003e What are the services used and what states are they in?\n\n1. auth-service, which ran on 10/01/2024 and failed to start.\n2. customer-details-service, which ran on 14/01/2024 and also failed to start.\n```\n\n```text\n\u003e\u003e\u003e Give me a summary of the top errors as a table with the first column as timestamp, second column as component/service name and the third column as the short error summary.\n  \n  ────────────────  ──────────────────────────  ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────\n  Timestamp         Component/Service Name      Error Summary\n  10/01/2024 11:05  auth-service                Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.\n  14/01/2024 12:06  customer-details-service    Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.\n  14/01/2024 12:09  customer-details-service    java.lang.NoClassDefFoundError: org/springframework/core/type/classreading/ClassFormatException\n  ────────────────  ──────────────────────────  ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────\n```\n\n#### Sample Config\n\n```json\n{\n  \"service\": \"gemini\",\n  \"gemini\": {\n    \"api_key\": \"your-api-key\",\n    \"llm_name\": \"gemini-1.5-flash\"\n  },\n  \"ollama\": {\n    \"hosts\": [\n      \"http://localhost:11434/\"\n    ],\n    \"llm_name\": \"mistral\",\n    \"embedding_model_name\": \"all-MiniLM-L6-v2\",\n    \"options\": {\n      \"temperature\": 0.1\n    }\n  },\n  \"num_chunks_to_return\": 100,\n  \"data_sources\": [\n    {\n      \"type\": \"filesystem\",\n      \"ds_params\": {\n        \"recursion_depth\": 2,\n        \"file_size_limit\": \"100MB\",\n        \"scan_locations\": [\n          {\n            \"location\": \"/path/to/log-dir\",\n            \"pattern\": \"\\n\"\n          },\n          {\n            \"location\": \"/path/to/another-log-dir\",\n            \"pattern\": \"\\n\"\n          }\n        ]\n      }\n    }\n  ]\n}\n```\n\n### Development\n\n#### Install the libs\n\n```shell\nmake libs\n```\n\n#### Setup as a local dev installation\n\n```shell\nmake dev-install\n```\n\n#### Build wheel\n\n```shell\nmake wheel\n```\n\n### Roadmap\n\n- [ ] Auto log pattern identification and parsing\n- [ ] Support for non-filesystem based vector stores\n- [ ] Ignore `/history`, `/bye` while storing the commands in command history\n- [ ] Handle keyboard interrupt during the token-generation phase\n- [ ] Support for streaming the responses to console\n- [ ] Support for switching between raw mode and tools mode (function-calling). Maybe by enabling custom `set` command.\n  For example: `set raw true` and `set raw false` to toggle between the modes.\n\n### Contributing\n\nContributions are most welcome! Whether it's reporting a bug, proposing an enhancement, or helping with code - any sort\nof contribution is much appreciated.\n\n### Credits\n\n- [MDV](https://github.com/axiros/terminal_markdown_viewer): Amazing package to pretty-print Markdown text in\n  console.[^1]\n- [Loghub](https://github.com/logpai/loghub): A beautiful collection of freely accessible logs. [^2]\n- [Prompt Toolkit](https://github.com/prompt-toolkit/python-prompt-toolkit): An elegant library for powerful interactive\n  command line applications. [^3]\n\n[^1]: MDV Python pacakge on PyPi: https://pypi.org/project/mdv/\n\n[^2]: Jieming Zhu, Shilin He, Pinjia He, Jinyang Liu, Michael R.\nLyu. [Loghub: A Large Collection of System Log Datasets for AI-driven Log Analytics](https://arxiv.org/abs/2008.06448).\nIEEE International Symposium on Software Reliability Engineering (ISSRE), 2023.\n[^3]: `prompt-toolkit` Python pacakge on PyPi: https://pypi.org/project/prompt-toolkit/\n\n### License\n\nThis project is licensed under the MIT License - see\nthe [LICENSE](https://github.com/Loguru-AI/Loguru-CLI/blob/main/LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floguru-ai%2Floguru-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floguru-ai%2Floguru-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floguru-ai%2Floguru-cli/lists"}