Skip to main content

Terminal UI for Ollama

Project description

PAR LLAMA

About

PAR LLAMA is a TUI application designed for easy management and use of Ollama based LLMs. The application was built with Textual and Rich

Screenshots

Supports Dark and Light mode as well as custom themes.

Local Models Dark

Model View Dark

Site Models Dark

Local Models Light

Prerequisites for running

  • Install and run Ollama
  • Install Python 3.11 or newer

Prerequisites for dev

  • Install pipenv
  • Install GNU Compatible Make command

Prerequisites for model quantization

If you want to be able to quantize custom models, download the following tool from the releases area: HuggingFaceModelDownloader

Install Docker Desktop

Pull the docker image ollama/quantize

docker pull ollama/quantize

Installing from mypi using pipx

pipx install parllama

Installing from mypi using pip

Create a virtual environment and install using pip

mkdir parllama
cd parllama
python -m venv venv
source venv/Scripts/activate
pip install parllama

Installing for dev mode

Clone the repo and run the following from the root of the repo:

make first-setup

Command line arguments

usage: parllama [-h] [-v] [-d DATA_DIR] [-u OLLAMA_URL] [-t THEME_NAME] [-m {dark,light}] [-s {local,site,tools,create,logs}]
                [--restore-defaults] [--clear-cache] [--no-save]

PAR LLAMA -- Ollama TUI.

options:
  -h, --help            show this help message and exit
  -v, --version         Show version information.
  -d DATA_DIR, --data-dir DATA_DIR
                        Data Directory. Defaults to ~/.parllama
  -u OLLAMA_URL, --ollama-url OLLAMA_URL
                        URL of your Ollama instance. Defaults to http://localhost:11434
  -t THEME_NAME, --theme-name THEME_NAME
                        Theme name. Defaults to par
  -m {dark,light}, --theme-mode {dark,light}
                        Dark / Light mode. Defaults to dark
  -s {local,site,tools,create,logs}, --starting-screen {local,site,tools,create,logs}
                        Starting screen. Defaults to local
  --restore-defaults    Restore default settings and theme
  --clear-cache         Clear cached data
  --no-save             Prevent saving settings for this session.

Environment Variables

  • PARLLAMA_DATA_DIR - Used to set --data-dir
  • PARLLAMA_THEME_NAME - Used to set --theme-name
  • PARLLAMA_THEME_MODE - Used to set --theme-mode
  • OLLAMA_HOST - Used to set --ollama-url

Running Par Llama

with pipx installation

From anywhere:

parllama

with pip installation

From parent folder of venv

source venv/Scripts/activate
parllama

Dev mode

From repo root:

make dev

Themes

Themes are json files stored in the themes folder in the data directory which defaults to ~/.parllama/themes

The default theme is "par" so can be located in ~/.parllama/themes/par.json

Themes have a dark and light mode are in the following format:

{
  "dark": {
    "primary": "#e49500",
    "secondary": "#6e4800",
    "warning": "#ffa62b",
    "error": "#ba3c5b",
    "success": "#4EBF71",
    "accent": "#6e4800",
    "panel": "#111",
    "surface":"#1e1e1e",
    "background":"#121212",
    "dark": true
  },
  "light": {
    "primary": "#004578",
    "secondary": "#ffa62b",
    "warning": "#ffa62b",
    "error": "#ba3c5b",
    "success": "#4EBF71",
    "accent": "#0178D4",
    "background":"#efefef",
    "surface":"#f5f5f5",
    "dark": false
  }
}

You must specify at least one of light or dark for the theme to be usable.

Theme can be changed via command line with the --theme-name option.

Roadmap

Where we are

  • Initial release - Maintain and create new models

Where we're going

  • Basic chat with LLM
  • Chat history / conversation management
  • Chat with multiple models at same time to compare outputs
  • LLM tool use

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

parllama-0.2.3.tar.gz (42.9 kB view hashes)

Uploaded Source

Built Distribution

parllama-0.2.3-py3-none-any.whl (56.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page