Metadata-Version: 2.4
Name: knowledgelm
Version: 4.0.0
Summary: A NotebookLM companion for batch downloading NSE company announcements
Project-URL: Homepage, https://github.com/eggmasonvalue/KnowledgeLM
Project-URL: Repository, https://github.com/eggmasonvalue/KnowledgeLM
Project-URL: Issues, https://github.com/eggmasonvalue/KnowledgeLM/issues
Author: eggmasonvalue
License: MIT
License-File: LICENSE
Keywords: fundamental-analysis,india,investor-tools,notebooklm,nse,stocks
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Office/Business :: Financial :: Investment
Requires-Python: >=3.12
Requires-Dist: beautifulsoup4
Requires-Dist: click>=8.1.0
Requires-Dist: markdownify
Requires-Dist: nse
Requires-Dist: pandas
Requires-Dist: requests
Requires-Dist: selenium>=4.40.0
Requires-Dist: streamlit
Requires-Dist: weasyprint
Requires-Dist: webdriver-manager>=4.0.2
Provides-Extra: dev
Requires-Dist: pytest; extra == 'dev'
Requires-Dist: pytest-cov; extra == 'dev'
Requires-Dist: ruff; extra == 'dev'
Description-Content-Type: text/markdown

# KnowledgeLM

A CLI and web app to batch download NSE company announcements by category.  
Intended as a companion for NotebookLM and other research tools.

## Features

- **CLI**: Batch download filings with `knowledgelm download SYMBOL --from DATE --to DATE`
- **Web UI**: Streamlit app for interactive downloads
- Download announcements by category: Transcripts, Investor Presentations, Credit Ratings, Related Party Transactions, Annual Reports
- **AI Agent Skill**: Works with Claude Code, Gemini CLI, Codex, and other LLM agents
- **NotebookLM Integration**: Easily add downloaded files as sources to NotebookLM notebooks

## Quick Start (CLI)

```bash
# Install
uv tool install knowledgelm

# Download all categories for a company
knowledgelm download HDFCBANK --from 2023-01-01 --to 2025-01-26

# Download specific categories
knowledgelm download INFY --from 2020-01-01 --to 2025-01-26 --categories transcripts,credit_rating

# List available categories
knowledgelm list-categories

# List downloaded files (for NotebookLM integration)
knowledgelm list-files ./HDFCBANK_knowledgeLM --json
```

## AI Agent Skill Installation

KnowledgeLM includes an agent skill for use with Claude Code, Gemini CLI, Codex, or any LLM that supports the [Agent Skills](https://agentskills.io) standard.

**To install the skill, give this prompt to your AI agent:**

> Install the knowledgelm-nse skill by copying the `.agent/skills/knowledgelm-nse/` directory (including all bundled resources) from the knowledgelm repository to your skills directory. The skill enables batch downloading of NSE India company filings and integration with NotebookLM.

The agent will locate the skill directory and install it to the appropriate location for your environment.

## Web UI Usage

1. Run the Streamlit app:
   ```bash
   streamlit run src/knowledgelm/app.py
   ```

2. Enter the company symbol, start date, and end date.
3. Choose the download folder.
4. Select download categories and/or which filings to display.
5. Click "Fetch Filings" to download.

**Note on Credit Ratings:** The app tries the primary source first (all available ratings). If unavailable, the fallback only fetches ratings within your date range.

## Requirements

- Python 3.12+
- [uv](https://docs.astral.sh/uv/) (recommended)

Using uv:

```bash
uv sync
```

## Development

```bash
# Run tests
pytest

# Run with coverage
pytest --cov

# Format code
ruff format src/ tests/
```

