Get started with Pi and Berget AI
Install Pi and the Berget AI extension, connect it to Berget AI, and run your first AI-assisted coding session on European infrastructure
In this tutorial, you'll install Pi, add the Berget AI extension, and run your first prompt from the terminal. By the end, you'll have a working AI coding assistant running on Berget AI's European infrastructure.
Before you start
To complete this tutorial, you'll need:
- A terminal on macOS, Linux, or Windows
- A Berget AI account (free to create)
Set up Pi
Install Pi
Install the Pi coding agent:
curl -fsSL https://pi.dev/install.sh | shVerify the installation by running:
pi --versionCreate a Berget AI API key
- Go to API Keys in the Berget AI Console.
- Click + Create New Key.
- Enter a name in the Key Name field (e.g.
Pi). - Click + Create Key.
- Store it somewhere safe — it won't be shown again.
berget api-keys create --name "Pi"The key is printed once in full (sk_ber_... format). Store it somewhere safe — it won't be shown again.
Install the Berget AI extension
pi install npm:@bergetai/pi-providerRestart Pi or run /reload to load the extension. The extension registers Berget AI as a provider and loads the available models automatically.
Configure your API key
Choose one of the following methods to provide your API key.
Using environment variable:
export BERGET_API_KEY=sk_ber_...Using ~/.pi/agent/auth.json:
Create or edit ~/.pi/agent/auth.json and add a berget entry:
{
"berget": { "type": "api_key", "key": "sk_ber_..." }
}Run Pi
In your project directory, start Pi:
piSelect a model with /model, or cycle through available models with Ctrl+P. Models from Berget AI are prefixed with berget/.
List all available models from the command line:
pi --list-modelsWhat you built
You now have Pi running as an AI coding assistant in your terminal, backed by Berget AI. Every prompt you send, your code, your questions, the responses, stays within the EU and is processed on Berget AI's European infrastructure.
For more information on how to use Pi, see the Pi docs.