Pi CLI

Install Gab AI as a Pi model provider with first-use API key setup, model switching, and Gab API tools.

Prerequisites

Install

Install the official Gab AI package from npm: You can also try the package for one Pi run without installing it globally:

pi install npm:@gabai/pi-gab-ai
pi --no-extensions -e npm:@gabai/pi-gab-ai --models "gab/*"

Setup

Start Pi and run the Gab command. Pi prompts for your Gab AI API key once and saves it in Pi's auth store. On Pi 0.84.1 and newer this uses Pi's public provider-auth APIs instead of the old internal authStorage hook. Environment variables also work for scripted or temporary sessions:

/gab
export GAB_API_KEY="YOUR_GAB_API_KEY"
pi --models "gab/*"

First-use prompt

If you select a Gab model before setup, the package prompts for your API key on first use. GAB_AI_API_KEY is accepted as an alternative environment variable.

Models

Gab models appear in Pi's normal model picker under the gab provider. Switch models from inside Pi with:

pi --list-models gab
pi --provider gab --model arya
pi --model gab/gpt-5-5
pi --models "gab/*"
/gab arya
/gab gpt-5-5
/gab refresh
/gab status
/gab logout

Gab API Tools

The package also registers Gab API tools so Pi agents can use Gab capabilities directly during tool-calling workflows.

Use gab_generate_image to create one image of a red square centered on a white background.

Troubleshooting