install_prereqs: One-stop setup for a fresh machine

View source: R/setup.R

install_prereqsR Documentation

One-stop setup for a fresh machine

Description

Walks a non-technical user through everything needed to run screenllm:

Usage

install_prereqs(
  preset = NULL,
  models = .PINNED_DEFAULT_MODELS,
  interactive = base::interactive(),
  wait_seconds = 60L,
  ollama_url = getOption("screenllm.ollama_url")
)

Arguments

preset

One of "paper" (the four ~20-30B paper models, ~65 GB), "light" (four ~3-7B models, ~10 GB) or "none" (skip the model pull). Overrides models when set. Defaults to NULL, which means "use models".

models

Character vector of Ollama model tags to ensure are installed. Ignored if preset is supplied. Defaults to the four-LLM paper ensemble.

interactive

Whether to prompt the user before running install commands or pulling large models. Defaults to base::interactive(). When FALSE, the function reports missing components but never installs or downloads anything.

wait_seconds

Seconds to wait for the Ollama daemon to come up after (re)starting it. Defaults to 60.

ollama_url

Base URL of the Ollama server.

Details

  1. Detects the OS and checks whether Ollama is installed.

  2. If Ollama is missing, offers to install it (brew on macOS, winget on Windows, the official install script on Linux). If the user declines or the package manager is unavailable, opens https://ollama.com/download in the browser.

  3. Waits for the Ollama daemon to come up (up to wait_seconds).

  4. Pulls each model in models that is not already installed.

  5. Verifies with check_setup().

Safe to re-run: it is a no-op if everything is already in place.

Value

Invisible logical: TRUE if all prerequisites are ready after the call, FALSE otherwise.

Examples


# Check for Ollama without pulling any models. In a non-interactive
# session this only reports status and installs nothing.
install_prereqs(preset = "none")

## Not run: 
# Interactive setup that offers to install Ollama and pull models:
install_prereqs(preset = "light") # ~10 GB; runs on 8-16 GB RAM
install_prereqs(preset = "paper") # ~65 GB; needs a workstation

## End(Not run)

screenllm documentation built on Sept. 24, 2026, 5:11 p.m.