Metadata-Version: 2.4
Name: ask-log
Version: 1.0.0a2
Summary: An AI log analyzer with chat interface
Author-email: Vandan Savla <vsavla21@gmail.com>
Project-URL: Homepage, https://github.com/vandan-savla/ask-log
Project-URL: Repository, https://github.com/vandan-savla/ask-log
Project-URL: Issues, https://github.com/vandan-savla/ask-log/issues
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Logging
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: click
Requires-Dist: rich
Requires-Dist: prompt-toolkit
Requires-Dist: questionary
Requires-Dist: pyyaml
Requires-Dist: numpy
Requires-Dist: tiktoken
Requires-Dist: chromadb
Requires-Dist: litellm
Requires-Dist: fastembed
Requires-Dist: langchain
Requires-Dist: langchain-core
Requires-Dist: langchain-community
Requires-Dist: langchain-text-splitters
Requires-Dist: langchain-classic
Requires-Dist: langchain-huggingface
Provides-Extra: openai
Requires-Dist: langchain-openai; extra == "openai"
Provides-Extra: anthropic
Requires-Dist: langchain-anthropic; extra == "anthropic"
Provides-Extra: google
Requires-Dist: langchain-google-genai; extra == "google"
Requires-Dist: langchain-google-vertexai; extra == "google"
Dynamic: license-file

## Ask Log

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
[![Python](https://img.shields.io/badge/Python-3.10%20|%203.11%20|%203.12%20|%203.13-blue)](https://www.python.org/downloads/)
[![OS](https://img.shields.io/badge/OS-Windows%20|%20macOS%20|%20Linux-555)](#)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](CONTRIBUTING.md)

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

![Static Badge](https://img.shields.io/badge/py-package-brightgreen?label=PyPI%20package&link=https%3A%2F%2Fpypi.org%2Fproject%2Fask-log%2F)


---

### 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

```bash
pip install ask-log
```

---

## Quickstart

Once installed, the `ask-log` command is available.

```bash
# 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 last-session
```

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

```bash
# 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 convo

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

Configuration is stored at `~/.ask-log/config.yaml`.
Saved conversation transcripts are stored in `~/.ask-log/history/`. The `--save` value is treated as a filename; if you provide a path, only its filename is used. Existing transcripts with that filename are loaded and updated when the chat ends.

---

## 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 in `~/.ask-log/history/` so you can resume it 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](CONTRIBUTING.md) for guidelines, a suggested workflow, and development tips.

---

## License

## This project is licensed under the [MIT License](LICENSE).
