Metadata-Version: 2.1
Name: seagoat
Version: 0.16.2
Summary: A semantic-code search engine
License: MIT
Author: Daniel Kantor
Author-email: git@daniel-kantor.com
Requires-Python: >=3.10,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: appdirs (>=1.4.4,<2.0.0)
Requires-Dist: blessed (>=1.20.0,<2.0.0)
Requires-Dist: chromadb (>=0.4.0,<0.5.0)
Requires-Dist: click (>=8.1.3,<9.0.0)
Requires-Dist: flask (>=2.3.2,<3.0.0)
Requires-Dist: gitpython (>=3.1.31,<4.0.0)
Requires-Dist: nest-asyncio (>=1.5.6,<2.0.0)
Requires-Dist: prompt-toolkit (>=3.0.38,<4.0.0)
Requires-Dist: psutil (>=5.9.5,<6.0.0)
Requires-Dist: pygments (>=2.15.1,<3.0.0)
Requires-Dist: requests (>=2.31.0,<3.0.0)
Requires-Dist: ripgrepy (>=2.0.0,<3.0.0)
Requires-Dist: setuptools (>=68.0.0,<69.0.0)
Requires-Dist: tqdm (>=4.65.0,<5.0.0)
Description-Content-Type: text/markdown

<!-- markdownlint-disable MD033 -->

<h1>
  <p align="center">
    <img src="assets/logo-small.png" alt="Logo" width="200"/>
    <font size="8"><b>SeaGOAT</b></font>
  </p>
</h1>

A code search engine for the AI age. SeaGOAT leverages vector
embeddings to enable to search your codebase semantically.

![&nbsp;](assets/demo.gif)

_🛟 Looking for someone to help me benchmark the accuracy of SeaGOAT._
_If you can help me make it happen, [let me know](https://github.com/kantord)!_

## Getting started

### Install SeaGOAT

In order to install SeaGOAT, you need to have the following
dependencies already installed on your computer:

- Python 3.11 or newer
- ripgrep

To install SeaGOAT using `pipx`, use the following command:

```bash
pipx install seagoat
```

### Start SeaGOAT server

In order to use SeaGOAT in your project, you have to start the SeaGOAT server
using the following command:

```bash
seagoat-server start /path/to/your/repo
```

### Search your repository

If you have the server running, you can simply use the
`gt` or `seagoat` command to query your repository. For example:

```bash
gt "Where are the numbers rounded"
```

You can also use
[Regular Expressions](https://en.wikipedia.org/wiki/Regular_expression)
in your queries, for example

```bash
gt "function calc_.* that deals with taxes"
```

### Stopping the server

You can stop the running server using the following command:

```bash
seagoat-server stop /path/to/your/repo
```

## Development

**Requirements**:

- [Poetry](https://python-poetry.org/)
- Python 3.11 or newer
- [ripgrep](https://github.com/BurntSushi/ripgrep)

### Install dependencies

After cloning the repository, install dependencies using the following command:

```bash
poetry install
```

### Running tests

#### Watch mode (recommended)

```bash
poetry run ptw
```

#### Test changed files

```bash
poetry run pytest .  --testmon
```

#### Test all files

```bash
poetry run pytest .
```

### Manual testing

You can test any SeaGOAT command manually in your local development
environment. For example to test the development version of the
`seagoat-server` command, you can run:

```bash
poetry run seagoat-server ~/path/an/example/repository
```

