Skip to main content

crew-chief

Local LLM service for portfolio-wide trivial inference tasks. Runs Ollama inside a Podman container and exposes a zero-dependency Python client so any repo can call it without cloud API access.

If you enable the listener workflows that poll or respond through personal Signal or Gmail channels, the explicit consent reference is ../../doc-repos/my-consent/messaging-and-email.md.

Prerequisites

  • Podman ≥ 4.x
  • Python ≥ 3.10 (for the client package)
  • curl (for scripts/pull_model.sh and scripts/status.sh)

Quick start

# 1. Build the image and start the service
bash scripts/start.sh

# 2. Pull a model (default: llama3.2)
bash scripts/pull_model.sh

# 3. Verify the service is healthy
bash scripts/status.sh

Python client

Install into the consuming repo's virtualenv:

. .venv/bin/activate          # the venv of the repo that will use the client
pip install -e ./util-repos/crew-chief

The virtualenv is not optional on current Debian, Ubuntu, Arch and openSUSE: since PEP 668 those distros refuse a pip install into the system Python with externally-managed-environment.

Then use it:

from crew_chief import CrewChiefClient

client = CrewChiefClient()                     # reads CREW_CHIEF_URL / CREW_CHIEF_MODEL env vars

# Single-turn generation
answer = client.generate("Summarise this in one sentence: ...")
print(answer)

# Multi-turn chat
reply = client.chat([
    {"role": "system", "content": "You are a concise assistant."},
    {"role": "user", "content": "What year was Python 3.10 released?"},
])
print(reply)

# Health check
if not client.health():
    print("Service is not running — start it with scripts/start.sh")

# List available models
for model in client.list_models():
    print(model)

CLI

crew-chief generate "What is the capital of France?"
crew-chief health
crew-chief models
crew-chief --model mistral generate "Translate 'hello' to Spanish."

Configuration

All settings are controlled through environment variables:

Variable Default Description
CREW_CHIEF_URL http://localhost:11434 Ollama service base URL
CREW_CHIEF_MODEL llama3.2 Model to use for requests
CREW_CHIEF_TIMEOUT 60 HTTP timeout in seconds
CREW_CHIEF_PORT 11434 Host port for the container
CREW_CHIEF_CONTAINER crew-chief Podman container name
CREW_CHIEF_IMAGE crew-chief:latest Podman image name
CREW_CHIEF_MODELS_VOLUME crew-chief-models Volume for persisted model weights

Copy config/ollama/config.env.example to config/ollama/config.env and adjust as needed.

Container management

bash scripts/start.sh        # build (if needed) + start
bash scripts/stop.sh         # stop
bash scripts/status.sh       # container state + service health
bash scripts/pull_model.sh mistral   # pull a different model

Running tests

./bootstrap.sh
.venv/bin/pytest -q

bootstrap.sh creates .venv, installs the package in editable mode, and verifies the crew-chief command runs. Pass --listener to include the listener extra, or --venv PATH to build the environment elsewhere.

Why not pip install -e . directly?

Since PEP 668, Debian, Ubuntu, Arch and openSUSE mark the system Python as externally managed, and pip refuses to install into it:

error: externally-managed-environment

Fedora still allows it, which is why the old instruction worked on some machines and not others. Installing into a virtualenv is correct on all of them, and on macOS and Windows too.

Tests are fully offline — no Ollama service required.

Contributing

See CONTRIBUTING.md.

License

MIT

Metadata

Release files for crew-chief 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for crew-chief 0.1.0
File Size Uploaded
crew_chief-0.1.0.tar.gz 63.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for crew-chief 0.1.0
File Interpreter ABI Platform
crew_chief-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 117.8 kB

Release files / crew_chief-0.1.0.tar.gz

Download URL crew_chief-0.1.0.tar.gz
Size 63.6 kB
Tags Source
SHA-256 checksum
How to use checksums
5bbd59aa0a350405364783712b17153ab6de066a805850e134a3e86bf15e93e0
BLAKE2b-256 checksum
How to use checksums
97284ca9c8f66a6d5a73bd447a82f5d44b5cddde2bbcb98cc3dde7432e5e5762
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.

Transparency log

Release files / crew_chief-0.1.0-py3-none-any.whl

Download URL crew_chief-0.1.0-py3-none-any.whl
Size 54.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f3308e81928dae60010b50d250780441acde841950c206a0645df84128779d7b
BLAKE2b-256 checksum
How to use checksums
d25af83fdb87fb2dcebe53e30d98eda73f6d4c8fb4dd95c451c3ce58fbcc3aea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page