pasture

command module
v0.0.0-...-49a5ef4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2026 License: Apache-2.0 Imports: 1 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

pasture

pasture lets you keep more local AI models than fit on your disk.

It works with Ollama, the program that runs AI models on your own computer. You download and use models the way you always do. When they need more room than you give them, pasture moves the ones you have not used lately off the disk, and brings one back as soon as something asks for it. Every app that works with Ollama works with pasture, with no change.

Install

pasture runs on macOS and Linux. Paste this command into Terminal:

curl -fsSL https://raw.githubusercontent.com/cinchapi/pasture/main/install.sh | sh

It installs pasture, and Ollama too when you have none, and starts pasture each time you log in. Then choose a model, download it, and use it:

pasture onboard
pasture add qwen2.5-coder:14b
pasture run qwen2.5-coder:14b

Get started walks through each step.

Guides

The reference describes each part of pasture in full, and Develop pasture builds it and runs its tests.

What pasture promises

  • pasture takes a model off the disk only when it can bring the model back: from your archive folder, or by downloading it again from where it came from. A model you built yourself stays, unless an archive folder holds a copy.
  • It never moves a model you pinned, a model Ollama has loaded, or a model an app is using.
  • When there is no room for a model, the download stops and says why, rather than fill your disk.
  • A web page from another site cannot use your models unless you allow that site, and even an allowed site cannot change pasture's settings or move your models.

How pasture works lists every promise in full.

License

Apache License 2.0. See LICENSE.

Documentation

Overview

Command pasture keeps a library of Ollama models larger than the disk. It runs in front of Ollama on Ollama's port, moves the least recently used models away when they outgrow the budget, and brings a model back when a request asks for it. See README.md for its commands.

Directories

Path Synopsis
internal
archive
Package archive keeps full copies of moved-away models in the archive folder, in the layout of Ollama's models folder, and copies them back.
Package archive keeps full copies of moved-away models in the archive folder, in the layout of Ollama's models folder, and copies them back.
cli
Package cli runs the pasture command: each subcommand, and `pasture serve`, which starts `ollama serve` behind the proxy and keeps the library within its budget.
Package cli runs the pasture command: each subcommand, and `pasture serve`, which starts `ollama serve` behind the proxy and keeps the library within its budget.
client
Package client sends the pasture command's requests to the running `pasture serve`, with the admin token.
Package client sends the pasture command's requests to the running `pasture serve`, with the admin token.
config
Package config reads and writes pasture's config file and state file, and names where pasture keeps its files.
Package config reads and writes pasture's config file and state file, and names where pasture keeps its files.
disk
Package disk measures the space that models take and the space left on the disk that holds them, the way df measures it on each system.
Package disk measures the space that models take and the space left on the disk that holds them, the way df measures it on each system.
fakeollama
Package fakeollama stands in for `ollama serve` in tests.
Package fakeollama stands in for `ollama serve` in tests.
files
Package files writes and copies files so that the result is on the disk before a call returns: through a temporary file and a rename, with each new folder entry synced.
Package files writes and copies files so that the result is on the disk before a call returns: through a temporary file and a rename, with each new folder entry synced.
harness
Package harness wires a Manager, its proxy, and the node link to a fake Ollama for tests, and holds the helpers that the tests of several packages share.
Package harness wires a Manager, its proxy, and the node link to a fake Ollama for tests, and holds the helpers that the tests of several packages share.
library
Package library keeps a library of Ollama models within a disk budget.
Package library keeps a library of Ollama models within a disk budget.
model
Package model names Ollama models and reads their manifests, and asks a model's registry what it serves.
Package model names Ollama models and reads their manifests, and asks a model's registry what it serves.
node
Package node pairs this machine with a Cinchapi account, keeps the link to the account open while paired, and serves HTTPS with API keys on a server with a public name.
Package node pairs this machine with a Cinchapi account, keeps the link to the account open while paired, and serves HTTPS with API keys on a server with a public name.
ollama
Package ollama talks to the `ollama serve` that pasture runs behind its proxy, and downloads Ollama when no ollama command is installed.
Package ollama talks to the `ollama serve` that pasture runs behind its proxy, and downloads Ollama when no ollama command is installed.
onboard
Package onboard suggests local models for the machine and the work it will do.
Package onboard suggests local models for the machine and the work it will do.
service
Package service sets up the service that runs `pasture serve`: a launchd job on macOS or a systemd user unit on Linux, and the log files.
Package service sets up the service that runs `pasture serve`: a launchd job on macOS or a systemd user unit on Linux, and the log files.
term
Package term holds the pasture command's helpers for the terminal: questions, arguments, how long ago a time was, and waits.
Package term holds the pasture command's helpers for the terminal: questions, arguments, how long ago a time was, and waits.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL