---
title: Setup
description: Walk through the guided setup wizard to configure Feynman.
section: Getting Started
order: 3
---

The `feynman setup` wizard configures your model provider, API keys, and optional packages. It runs automatically on first launch, but you can re-run it at any time to change your configuration.

## Running setup

```bash
feynman setup
```

The wizard walks you through three stages: model configuration, authentication, and optional package installation.

## Stage 1: Model selection

Feynman supports multiple model providers. The setup wizard presents a list of available providers and models. Select your preferred default model using the arrow keys:

```
? Select your default model:
  anthropic:claude-sonnet-4-20250514
> anthropic:claude-opus-4-20250514
  openai:gpt-4o
  openai:o3
  google:gemini-2.5-pro
```

The model you choose here becomes the default for all sessions. You can override it per-session with the `--model` flag or change it later via `feynman model set <provider:model>`.

## Stage 2: Authentication

Depending on your chosen provider, setup prompts you for an API key or walks you through OAuth login. For providers that support Pi OAuth (like Anthropic and OpenAI), Feynman opens a browser window to complete the sign-in flow. Your credentials are stored securely in the Pi auth storage at `~/.feynman/`.

For API key providers, you are prompted to paste your key directly:

```
? Enter your API key: sk-ant-...
```

Keys are encrypted at rest and never sent anywhere except the provider's API endpoint.

## Stage 3: Optional packages

Feynman's core ships with the essentials, but some features require additional packages. The wizard asks if you want to install optional presets:

- **session-search** -- Enables searching prior session transcripts for past research
- **memory** -- Automatic preference and correction memory across sessions
- **generative-ui** -- Interactive HTML-style widgets for rich output

You can skip this step and install packages later with `feynman packages install <preset>`.

## Re-running setup

Configuration is stored in `~/.feynman/settings.json`. Running `feynman setup` again overwrites previous settings. If you only need to change a specific value, edit the config file directly or use the targeted commands like `feynman model set` or `feynman alpha login`.
