Metadata-Version: 2.4
Name: talk-to-a-file
Version: 0.0.2
Summary: Simple CLI to talk to a file
Author-email: Deven Mistry <masterdeven@gmail.com>
License: MIT License
        
        Copyright (c) 2024 deven367
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Keywords: anthropic,pypdf,click
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: click
Requires-Dist: PyPDF2
Requires-Dist: anthropic
Requires-Dist: rich
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: mkdocs-material; extra == "dev"
Requires-Dist: mkdocstrings[python]; extra == "dev"
Requires-Dist: pytest; extra == "dev"
Dynamic: license-file

# talk-to-a-file
![Docs](https://github.com/deven367/talk-to-a-file/actions/workflows/docs.yml/badge.svg)
![pytest](https://github.com/deven367/talk-to-a-file/actions/workflows/pytest.yml/badge.svg)

This is a very simple utility script that I just created so that you could send the content of a pdf to an LLM and talk to it.

## instructions

To install the app, you just need to do,

```sh
pip install talk-to-a-file

# or

pip install git+https://github.com/deven367/talk-to-a-file
```

If you wish to develop/contribute to the project,

```sh
git clone https://github.com/deven367/talk-to-a-file
cd talk-to-a-file
pip install -e .
```

### prerequisites

To use this package, you need to use your own `ANTHROPIC_API_KEY`. Before using the CLI command, you need to set the environment variable. To do so,

```sh
export ANTHROPIC_API_KEY=<your-api-key>
```

## how it works

Once the package is installed, you can use the CLI command, `talk-to-a-file`,

The CLI has a required argument, `pdf`, which is the path to the pdf file that you want to read.

![alt text](docs/cli.png)

Here is a small example, where I talk to the pdf file, `docs/tcm.pdf`,

![alt text](docs/cli-example.png)

To quit the CLI, you can type `exit` or `quit`.

## how to contribute

Issues and PRs are welcome. If you have any suggestions or improvements, feel free to open an issue or a PR.
