Although this is still work in progress, it should work and keep you productive.
- Managing multiple chats
- Managing multiple endpoints
- Managing multiple LLM settings
- Managing multiple system prompts
- Tool calling
- Using
/v1/chat/completionsendpoints - Markdown parsing
- LaTex math formula rendering (only tested in Kitty Terminal Emulator (no ssh) and Foot Terminal Emulator (ssh too))
- Long replies (no TUI freeze, fully async)
- Chat with images
- probably more ...
- Agent capabilities
- GUI alternative
- Audio
You might want to create a Python venv, first, to ensure no conflicts with other packages:
mkdir -p ~/.local/share/venv/spit.py
python3 -m venv --prompt spit.py ~/.local/share/venv/spit.py
If in the last step you got an error message about missing modules, you might have to do first:
$ sudo apt install python3-venv python3-pip
Then make sure libcairo2 and bubblewrap are installed. We need the former for LaTeX math formula rendering and the latter for sandboxing LLM function calls. On standard installations both are usually present. To simply make sure they are, do:
$ sudo apt install libcairo2 bubblewrap
We assume you want to save the app in ~, alias ${HOME}. Now, install spit.py and its dependencies:
$ cd ~
$ git clone https://github.com/fuzzybritches0/spit.py.git
$ source ~/.local/share/venv/spit.py/bin/activate
$ pip install -r ./spit.py/requirements.txt
$ playwright install chromium-headless-shell
We assume the Python venv is still active from the step above. You'll see (spit.py) at the start of your command line. If not, source ~/.local/share/venv/spit.py/bin/activate will do the trick. Finally, to start the app, do:
$ python3 ~/spit.py/main.py
For a more comfortable invocation you might want to save the following as a Bash script, maybe in ~/bin/spit.py.
#!/bin/bash
source ~/.local/share/venv/spit.py/bin/activate
python3 ~/spit.py/main.pyDon't forget to run chmod u+x ~/bin/spit.py after you've saved the file. Then it will be as simple as typing spit.py to start the app.
The minimum settings to use the app, is to setup an endpoint. Choose 'Manage Endpoints' and then choose 'Create new endpoint' and enter the necessary settings: A name for the new endpoint and the endpoint URL is the minimum required. Then choose 'Create New Chat' to start a new chat.
If you haven't set up an endpoint, yet, head over to https://github.com/ggml-org/llama.cpp/, and find out how it's done. If you use any other provider or software with an OAI '/v1/chat/completions' compatible endpoint, I cannot guarantee that it will work, since I've only tested the llama.cpp endpoint. But it says it is compatible.
Spit.py was tested with Python 3.13. It might work with other versions, too.
Also, if you want to help out in developing this app, whether you are human, or AI agent, don't hesitate to open an issue, request a pull, or get in contact otherwise. My email address is on my profile page here on github.com.
Have fun and be productive.
