Metadata-Version: 2.1
Name: arey
Version: 0.0.6
Summary: Simple large language model playground.
Author-email: codito <codito@codito.in>
Project-URL: Homepage, https://github.com/codito/arey
Project-URL: Documentation, https://apps.codito.in/arey
Project-URL: Source, https://github.com/codito/arey
Project-URL: Changelog, https://github.com/codito/arey/blob/master/CHANGELOG.md
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Environment :: Console
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: MacOS
Classifier: Topic :: Communications :: Chat
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Terminals
Classifier: Topic :: Utilities
Classifier: Topic :: Text Processing :: Markup :: Markdown
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: click >=8.1.7
Requires-Dist: llama-cpp-python >=0.2.85
Requires-Dist: markdown >=3.5.2
Requires-Dist: ollama >=0.1.6
Requires-Dist: openai >=1.12.0
Requires-Dist: python-frontmatter >=1.1.0
Requires-Dist: pyyaml >=6.0.1
Requires-Dist: rich >=13.7.0
Requires-Dist: tiktoken >=0.6.0
Requires-Dist: watchfiles >=0.21.0
Requires-Dist: wurlitzer >=3.0.3
Provides-Extra: samples
Requires-Dist: beautifulsoup4 ; extra == 'samples'
Requires-Dist: lxml ; extra == 'samples'
Provides-Extra: test
Requires-Dist: mkdocs ; extra == 'test'
Requires-Dist: mkdocs-material ; extra == 'test'
Requires-Dist: pre-commit ; extra == 'test'
Requires-Dist: pytest ; extra == 'test'
Requires-Dist: pytest-mock ; extra == 'test'
Requires-Dist: pytest-cov ; extra == 'test'
Requires-Dist: ruff ; extra == 'test'

# arey

> Arey (अरे, sanskrit) — ind. Interjection of calling.

Arey is a simple large language model playground in your terminal.

- ✨ Command line interface, works everywhere python is available.  
- 🤖 Use any llama.cpp, ollama model or an openai compatible endpoint.  
- 💬 Chat with your favorite local models. CPU friendly 🍀  
- 🙋 Ask anything to AI models with a single command.  
- 📋 Supercharged prompt fine-tuning workflow ❤️ Edit your prompt in _any_ editor
and `arey` will generate a completion on save.  
- 🔓 No telemetry, no internet, nothing to sell.

See [Get Started](https://apps.codito.in/arey) or notes below for a quick guide.

https://github.com/codito/arey/assets/28766/6b886e49-6124-4256-84d9-20449c783a34

🚧 See **Roadmap** below.

## Installation

```sh
# Install pipx if needed: `pip install pipx`
# Ensure ~/.local/bin is available in system PATH
pipx install arey
```

Windows troubleshooting notes are [here](docs/windows.md).

[WSL]: https://learn.microsoft.com/en-us/windows/wsl/install

## Usage

```sh
❯ arey --help
Usage: arey [OPTIONS] COMMAND [ARGS]...

  Arey - a simple large language model app.

Options:
  -v, --verbose BOOLEAN  Show verbose logs.
  --help                 Show this message and exit.

Commands:
  ask   Run an instruction and generate response.
  chat  Chat with an AI model.
  play  Watch FILE for model, prompt and generate response on edit.
```

On the first run, `arey` will create a configuration file in following location:

- `~/.config/arey/arey.yml` for Linux or Mac systems.
- `~/.arey/arey.yml` for Windows.

Please update the `models` section in the config yml to your local model path.

### 1. Ask Arey something!

`arey ask "Who is Seneca? Tell me one of his teachings"`

### 2. Chat with Arey

`arey chat`

### 3. Run Arey in play mode

Use to fine-tune a prompt in your editor while `arey` keeps completing your prompt on every save.

```sh
❯ arey play /tmp/arey_playzl9igj3d.md

Welcome to arey play! Edit the play file below in your favorite editor and I'll generate a
response for you. Use `Ctrl+C` to abort play session.

Watching `/tmp/arey_playzl9igj3d.md` for changes...

───────────────────────────────────── 2024-01-21 17:20:01 ──────────────────────────────────────
✓ Model loaded. 0.57s.

Life is short because it passes by quickly and can end at any moment. We should make the most of
our time here on earth and live a virtuous life according to stoicism.

◼ Canceled.

Watching `/tmp/arey_playzl9igj3d.md` for changes...
```

## Development

See <https://apps.codito.in/arey/contribute>.

## Roadmap

- [x] Chat and task modes for interactive or batch queries
- [x] Define new tasks with only a prompt, no code. See docs/samples directory
      for examples.
- [x] Markdown formatting for chat mode.
- [x] Ollama support.
- [ ] OpenAI server support.
- [ ] Command support in chat. E.g., logs, change model, copy, clear, etc.
- [ ] Discover prompts from user directory
- [ ] Manage prompts and create new interactively
- [ ] Download models and manage them
- [ ] Release v0.1
- [ ] Add [textfx](https://github.com/google/generative-ai-docs/tree/main/demos/palm/web/textfx)
- [ ] Add offline knowledge bases and RAG. See
      <https://library.kiwix.org/#lang=eng>

## License

MIT
