Skip to main content

An AI log analyzer with chat interface

Project description

Ask Log

License: MIT Python OS PRs Welcome

Ask Log is a CLI-first assistant that helps you explore, summarize, and reason about application logs through a conversational interface. Point it at a log file, ask questions, and iterate quickly.

This project uses LangChain under the hood and supports multiple LLM providers (OpenAI, Anthropic, Google), configurable via a simple guided setup. Conversations are optionally saved so you can resume later.


Quick links

Configure Start Chat Status


Features

  • Conversational log analysis over any text log
  • Local vector index (FAISS) for retrieval-augmented answers
  • Provider-agnostic via LangChain: OpenAI, Anthropic, Google Gemini
  • Persistent conversation history per-log for continuity
  • Colorful, ergonomic CLI using rich and click

Installation (local, editable)

No PyPI release yet. Install locally in editable mode for fast iteration.

1) Clone

git clone https://github.com/vandan-savla/ask-log.git
cd ask-log

2) Create and activate a virtual environment

  • Windows (PowerShell)
py -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install -U pip setuptools wheel
  • macOS/Linux (bash)
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -U pip setuptools wheel

3) Install the project in editable mode

Core installation:

pip install -e .

Quickstart

Once installed, the ask-log command is available.

# 1) Configure your preferred provider and model
ask-log configure

# 2) Check configuration
ask-log status

# 3) Analyze a log file interactively; optionally save the conversation
ask-log chat --log-file /path/to/app.log --save ~/.ask-log/last-session.json

During configuration, you’ll be prompted for provider credentials and model. Supported providers are:

  • OpenAI: OPENAI_API_KEY
  • Anthropic: ANTHROPIC_API_KEY
  • Google: GOOGLE_API_KEY

Commands

# Guided config flow (choose provider, model, and options)
ask-log configure

# Show current provider configuration
ask-log status

# Start an interactive session on a specific log file
ask-log chat --log-file /path/to/logfile.log --save path/to/convo.json

# Reset configuration (removes ~/.ask-log/config.yaml)
ask-log reset

Configuration is stored at ~/.ask-log/config.yaml.


Tips

  • Use natural language questions like “What errors do you see?”, “Summarize main events”, “Any anomalies around 10:32?”
  • Use --save to capture the conversation so you can resume context later.
  • The first run on a large log may build a local vector index; subsequent runs will be faster.

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines, a suggested workflow, and development tips.


License

This project is licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ask_log-1.0.0a1.tar.gz (14.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ask_log-1.0.0a1-py3-none-any.whl (14.8 kB view details)

Uploaded Python 3

File details

Details for the file ask_log-1.0.0a1.tar.gz.

File metadata

  • Download URL: ask_log-1.0.0a1.tar.gz
  • Upload date:
  • Size: 14.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ask_log-1.0.0a1.tar.gz
Algorithm Hash digest
SHA256 08d617fb31e6d6d96d428369675e6d8fcffe890caed6c590e37a09e5edb6b1a2
MD5 b198375a559faa24857665ca6c844eb9
BLAKE2b-256 767cae0fb84595b408a51204290ac7a4e98a2f3a1cabdaeb92478071199c426a

See more details on using hashes here.

Provenance

The following attestation bundles were made for ask_log-1.0.0a1.tar.gz:

Publisher: python-publish.yml on vandan-savla/ask-log

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ask_log-1.0.0a1-py3-none-any.whl.

File metadata

  • Download URL: ask_log-1.0.0a1-py3-none-any.whl
  • Upload date:
  • Size: 14.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ask_log-1.0.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 b367e1ed5f0a0ef2f9ec5578302044f23761b7a4b9cc1ddc0df8421901b641db
MD5 2f5eca37726f04e2c3fa7177d2719d09
BLAKE2b-256 dd803cdec75ad4b6424dc769a55b034b67f0fe1a8de5301dc90b6b228f99054e

See more details on using hashes here.

Provenance

The following attestation bundles were made for ask_log-1.0.0a1-py3-none-any.whl:

Publisher: python-publish.yml on vandan-savla/ask-log

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page