Installation#

Get OSPREY running in six steps; the last one, a container runtime, is optional. The whole process takes about 10 minutes.

What you’ll have when done
  • Node.js, Claude Code, and uv installed

  • An API key configured for your AI provider

  • The osprey CLI installed and on your PATH

  • The ability to create projects with osprey init

  • Optionally, Docker or Podman for osprey up

Step 1: Install Node.js#

Claude Code requires Node.js 22+.

brew install node

If you don’t have Homebrew, install it first:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Debian/Ubuntu — npm is a separate package here, and Claude Code needs it
sudo apt-get install -y nodejs npm

Your distribution’s own packages are the simplest route. Check what yours ships (node --version): many current releases package a Node below the 22 floor, and there the cleanest fix is a current Node from nvm.

Install Node.js inside your WSL2 environment, the same way as on Linux:

sudo apt-get install -y nodejs npm

Verify:

node --version
# You should see v22.x.x or higher

Step 2: Install Claude Code#

npm install -g @anthropic-ai/claude-code@2.1.322

The pinned version is the one OSPREY’s generated projects run. Installing it exactly — rather than whatever was published most recently — means a brand-new CLI release can’t change your setup the day it comes out. The pinned version is the one npm’s stable channel for Claude Code names.

Verify:

claude --version

Pinning the Claude Code CLI version#

Every OSPREY project runs one exact Claude Code version, and the install command above gives you the one new projects use. To run a different version in a project, set it under config: in profile.yml and run osprey build:

config:
  claude_code.cli_version: "2.1.322"   # one exact version

Then install that same version, so the claude on your machine matches the project:

npm install -g @anthropic-ai/claude-code@2.1.322

osprey health tells you whether the two agree.

Step 3: Install Python tools#

OSPREY uses uv for fast Python package management. It handles Python versions and virtual environments automatically.

brew install uv
curl -LsSf https://astral.sh/uv/install.sh | sh

Verify:

uv --version

Step 4: Set up your API key#

The OSPREY agent needs an API key for the AI provider. Set it in your shell profile now: an exported key is what a host-local run reads, and it is what seeds the first project you build. Its durable home comes later — see the note below.

CBORG is the LBNL AI proxy. If you don’t have a key yet, sign up at https://api.cborg.lbl.gov.

echo 'export CBORG_API_KEY="your-key-here"' >> ~/.zshrc
source ~/.zshrc

Replace your-key-here with your actual key. To verify:

echo $CBORG_API_KEY

Get an API key from https://console.anthropic.com/.

echo 'export ANTHROPIC_API_KEY="sk-ant-..."' >> ~/.zshrc
source ~/.zshrc

OSPREY supports 100+ providers via LiteLLM. Set the appropriate key:

# OpenAI
export OPENAI_API_KEY="sk-..."

# Google
export GOOGLE_API_KEY="..."

See Configure LLM Providers for the full list.

Note

Using bash instead of zsh? Replace ~/.zshrc with ~/.bashrc.

Where the key lives once you create a deployment

A shell export reaches a deployment repository once: when osprey init creates it. From then on the repository’s own .env is the key’s home — builds and deploys read it and never re-read your shell, so a key exported after the repository exists does not get in.

Keep the export for host-local runs and for seeding that first repository; put the key in the repository’s .env for anything you want to survive a rebuild. See Secrets.

Step 5: Install OSPREY#

Install OSPREY as a standalone CLI tool. uv creates an isolated environment for OSPREY and puts the osprey command on your PATH.

uv tool install osprey-framework

This is the right choice for most users. Your own projects stay separate from the tool — you’ll create them in their own directories with osprey init.

To upgrade later:

uv tool upgrade osprey-framework

Pre-releases. Both commands resolve to the newest stable release and skip pre-releases (versions ending in b1, rc1, …), so a beta announced for testing is not what they install. Ask for it explicitly:

# The newest version, pre-releases included
uv tool install --prerelease allow osprey-framework

# One specific pre-release
uv tool install --prerelease allow "osprey-framework==2026.9.0b2"

Pinning the version alone is not enough: the osprey-connectors release a pre-release framework is tested with can be a pre-release too, and --prerelease allow is what lets the resolver take it. uv tool upgrade --prerelease allow osprey-framework moves an installation on to the next pre-release.

Clone the repository if you want to pin to a specific git ref, track main for unreleased changes, or contribute back to OSPREY.

git clone https://github.com/als-apg/osprey.git
cd osprey
uv sync --extra dev

This creates a .venv inside the clone with OSPREY installed in editable mode plus dev dependencies. Commands in the rest of the docs that show osprey ... should be run as uv run osprey ... from inside the clone, or activate the venv with source .venv/bin/activate.

Verify:

osprey --version

OSPREY versions follow the YYYY.M.P CalVer scheme (e.g. 2026.5.1; git tags carry a v prefix, e.g. v2026.5.1) — the first two segments identify the release window and the patch segment increments for hotfixes. See CHANGELOG.md for details.

Step 6: Install a container runtime (optional)#

osprey up runs a project and its services (simulation IOCs, databases, the observability stack) in containers, and needs Docker or Podman for that. The core agent workflow does not require containers, so you can skip this step and come back to it when you deploy.

Download from the Docker website and verify:

docker --version
docker compose version
docker buildx version

OSPREY’s service images need BuildKit: Docker Desktop includes it; on a Linux Docker Engine install the docker-buildx-plugin package. Podman needs nothing extra.

Install from the Podman website and verify:

podman --version

On macOS/Windows, also run:

podman machine init
podman machine start

You’re done! 🎉#

OSPREY is installed and ready to use. Here’s what to do next:

Hello World Tutorial

Build your first agent with the simulator served in process. One MCP server, zero complexity. Takes about five minutes.

Hello World Tutorial
Guided Facility Setup

Set OSPREY up for your own detector, beamline, or accelerator subsystem. A guided conversation generates a ready-to-build project profile tailored to your system. Takes about 10–15 minutes.

Guided Facility Setup
Advanced: Services & detailed configuration

The steps above cover the core installation. The following are only needed for specific use cases.

Deploying Services

See Container Deployment for setting up containerized services like databases, simulation IOCs, or the observability stack.

Detailed Configuration

See Configure LLM Providers for provider setup and Build Profiles for the full build profile YAML reference.

Troubleshooting#

Common issues
“claude: command not found”

Install Claude Code: npm install -g @anthropic-ai/claude-code@2.1.322

“osprey: command not found”

If you installed via uv tool install osprey-framework, make sure uv’s tool bin directory is on your PATH — run uv tool update-shell once and open a new terminal. If you installed from source, either activate the venv (source .venv/bin/activate) or prefix commands with uv run from inside the clone.

MCP connection failed

Start sessions with osprey chat or osprey web, not a bare claude. They run Claude Code in the project’s build/ directory, where the rendered .mcp.json lives.

Provider authentication error

Check that your API key is exported: echo $CBORG_API_KEY (or whichever key you’re using). Re-source your shell profile if needed: source ~/.zshrc

Python version mismatch

OSPREY requires Python 3.11+. Check with python3 --version. The uv tool can install the right version automatically.

Verification checklist:

node --version       # Should be 18+
claude --version     # Should print version
uv --version         # Should print version
osprey --version     # Should print version