-
Notifications
You must be signed in to change notification settings - Fork 1
Deployment EN
This document describes how to install, configure and update Spendif.ai. For backup, restore and database management β database.en.md. For installation on native Mac, Linux with Ollama and Windows with llama.cpp β installazione.en.md.
- Quick installation (one-liner Docker)
- Docker Compose installation from repository
- Native installation (development / Mac) 3b. Native desktop app (macOS / Windows / Linux)
.envconfiguration- Updating the application
- Docker operational commands
- Troubleshooting
- Uninstall
| Concept | Analogy | What it means in practice |
|---|---|---|
| Image | Cooking recipe | The package containing all the code and dependencies |
| Container | Cooked dish | The running app, created from the image |
| Volume | External notebook | The persistent folder where the database lives β survives even if the container is deleted |
What does NOT delete your data:
-
docker compose downβ safe -
docker compose up -d --buildβ safe (rebuilds the image, data intact)
What DELETES data:
-
docker compose down -vβ οΈ deletes the volumes β use only for a full reset
The only prerequisite is Docker Desktop installed and running.
Mac / Linux:
curl -fsSL https://raw.githubusercontent.com/drake69/spendifai/main/installer/install.sh | bashWindows (PowerShell):
irm https://raw.githubusercontent.com/drake69/spendifai/main/installer/install.ps1 | iexThe script creates the ~/spendifai/ folder, downloads the image from GitHub Container Registry, starts the container and opens the browser at http://localhost:8501 automatically.
Local AI included (optional): the script asks whether to install Ollama with the
gemma3:12bmodel β downloaded automatically in the background on first start (~8 GB, ~10β15 minutes). Alternatively you can configure an external API key (OpenAI/Anthropic) from the βοΈ Settings page.
Update:
docker compose --project-directory ~/spendifai pull && docker compose --project-directory ~/spendifai up -d
Uninstall:
curl -fsSL https://raw.githubusercontent.com/drake69/spendifai/main/installer/uninstall.sh | bash
Suitable for those who want to modify the code or configure LLM profiles (Ollama, llama.cpp).
git clone https://github.com/drake69/spendif-ai.git spendifai
cd spendifaicp .env.example .envdocker compose up -d --build-
--buildforces the image to be rebuilt (required on first launch or after code updates) -
-dstarts in the background
The app is available at http://localhost:8501
The REST API is available at http://localhost:8000 Β· Interactive docs: http://localhost:8000/docs
# Ollama (Linux / server with GPU)
docker compose --profile ollama up -d
# llama.cpp (Windows / CPU)
docker compose --profile llama-cpp up -dFor complete LLM backend configuration β installazione.en.md.
| Tool | Minimum version |
|---|---|
| Python | 3.13 |
| uv | any β curl -Ls https://astral.sh/uv/install.sh | sh
|
git clone https://github.com/drake69/spendif-ai.git spendifai
cd spendifai
uv sync
cp .env.example .env
# Startup script (recommended)
./start.sh # UI only (default)
./start.sh api # REST API only
./start.sh all # UI + API
# On Windows
start.bat # same options: ui | api | all
# Or manually
uv run streamlit run app.pyThe app is available at http://localhost:8501
To also start the REST API manually:
uv run uvicorn api.main:app --host 0.0.0.0 --port 8000The
ledger.dbdatabase is created automatically in the project folder on first launch.
Spendif.ai can run as a native desktop application β a native window (pywebview) embedding the Streamlit server. No Terminal, no external browser.
- Native window using WebKit (macOS), Edge WebView2 (Windows) or GTK/WebKit (Linux)
- Automatic download of the recommended LLM model for your hardware (1β7 GB depending on RAM)
- Zero-touch llama.cpp configuration β everything works on first launch with no user intervention
- Splash screen with progress bar during startup
| Platform | Command |
|---|---|
| macOS (installer) | bash packaging/macos/install.sh |
| macOS (Homebrew) | brew tap drake69/spendifai && brew install --cask spendifai |
| Windows | Right-click install.ps1 β "Run with PowerShell" |
| Windows (winget) | winget install SpendifAi.SpendifAi |
| Ubuntu/Debian (.deb) | bash packaging/linux/build-deb.sh && sudo apt install ./build/spendifai_*.deb |
| Ubuntu/Debian (script) | bash packaging/linux/install-debian.sh |
| Red Hat/Fedora (.rpm) | bash packaging/linux/build-rpm.sh && sudo dnf install ./build/spendifai-*.rpm |
| Red Hat/Fedora (script) | bash packaging/linux/install-redhat.sh |
uv sync --extra desktop
uv run python -m desktop.launcher- Installs Python, uv and system dependencies (pywebview requires WebKit/GTK on Linux)
- Clones the repository and creates the virtualenv with
uv sync --extra desktop - Detects hardware (RAM, GPU) and downloads the recommended GGUF model from HuggingFace
- Configures
.envwithLLM_BACKEND=local_llama_cppand the model path - Creates a launcher (
.appon macOS, shortcut on Windows,.desktopon Linux)
User data: the database and models live in
~/.spendifai/(macOS/Linux) or%APPDATA%\Spendif.ai\(Windows), separate from the code. Reinstalling the code does not touch your data.
The .env file contains only two parameters. All other settings (LLM, API keys, date format, language, etc.) are configured from the interface on the βοΈ Settings page.
cp .env.example .env| Parameter | Description | Default |
|---|---|---|
SPENDIFAI_DB |
SQLite database URI | sqlite:///ledger.db |
TAXONOMY_PATH |
Path to the YAML file used as initial seed for categories. At runtime the taxonomy lives in the DB (taxonomy_category / taxonomy_subcategory) and is managed from the UI. The YAML is read only on first start or when changing language. |
taxonomy.yaml |
SPENDIFAI_DB=sqlite:///ledger.db
TAXONOMY_PATH=taxonomy.yaml
# Only for the llama-cpp profile:
# LLAMA_MODEL=gemma-3-4b-it-Q4_K_M.ggufNever add
.envto git β verify that.gitignorecontains the line.env.
docker compose --project-directory ~/spendifai pull
docker compose --project-directory ~/spendifai up -dgit pull origin main
docker compose down
docker compose up -d --buildgit pull origin main
uv sync
pkill -f "streamlit run app.py"
uv run streamlit run app.pyDatabase migrations are applied automatically on startup β no manual intervention is required.
# Container status
docker compose ps
# Real-time logs
docker compose logs -f spendifai
# Healthcheck
docker inspect spendifai_app --format='{{.State.Health.Status}}'
# Stop (data intact)
docker compose down
# Stop + remove orphan containers (data intact)
docker compose down --remove-orphans
# β οΈ Full reset including volumes (DATA LOSS)
docker compose down -vFor the one-liner installation, add --project-directory ~/spendifai to every command, e.g. docker compose --project-directory ~/spendifai logs -f.
# Check what is using the port
lsof -i :8501
# Native
pkill -f "streamlit run app.py"
# Docker
docker compose down && docker compose up -ddocker compose logs --tail=50 spendifaiCommon causes:
-
.envmissing or incorrect values - Volume not mounted correctly
- Port 8501 already in use
The gemma3:12b model requires ~8 GB of RAM. Change the model from the βοΈ Settings page:
| Model | Required RAM |
|---|---|
gemma3:12b |
~8 GB |
qwen2.5:7b |
~5 GB |
llama3.2:3b |
~3 GB |
Errors such as database is locked, file corruption, restore from backup β database.en.md.
The uninstall scripts interactively remove all Spendif.ai components. No data is deleted without explicit confirmation.
Mac / Linux:
curl -fsSL https://raw.githubusercontent.com/drake69/spendifai/main/installer/uninstall.sh | bashWindows (PowerShell):
irm https://raw.githubusercontent.com/drake69/spendifai/main/installer/uninstall.ps1 | iexThe script asks separately for each component:
| What | Detail |
|---|---|
| Transaction database | Volumes spendifai_data and spendifai_logs
|
| Ollama models | Volume ollama_models (~8 GB) |
| llama.cpp + models/ folder |
llama.cpp:server image + GGUF files |
| Docker images |
ghcr.io/drake69/spendif-ai + ollama/ollama (~500 MBβ1 GB) |
| Installation folder |
~/spendifai/ (or SPENDIFAI_INSTALL_DIR) |
| Docker Desktop removal guide | Step-by-step guide for macOS / Linux / Windows |
For native installations (non-Docker), each platform has its own uninstaller:
| Channel | Command |
|---|---|
| macOS (script) | bash packaging/macos/uninstall.sh |
| macOS (Homebrew) |
brew uninstall --cask spendifai (to also remove data: --zap) |
| Windows (script) |
.\packaging\windows\uninstall.ps1 (supports -Silent) |
| Windows (Apps & features) | Settings β Apps β Spendif.ai β Uninstall |
| Windows (winget) | winget uninstall SpendifAi.SpendifAi |
| Ubuntu/Debian | sudo apt remove spendifai |
| Fedora/RHEL | sudo dnf remove spendifai |
| Linux (script) | bash packaging/linux/uninstall.sh |
All uninstallers ask for interactive confirmation before removing user data (~/.spendifai/). AI models are asked separately (they can be 1β7 GB).
Data preserved: uninstalling the code (via package manager or script) does not remove the database and models in
~/.spendifai/. For a full cleanup, use the uninstall script or manually remove~/.spendifai/.