2026-02-12 16:02:38 +01:00
2026-02-12 16:02:38 +01:00
2026-02-12 22:05:38 +01:00
2026-02-12 22:05:38 +01:00
2026-02-12 22:05:38 +01:00

Pierre Bot

Pierre Bot is an AI-powered code review companion designed for Bitbucket Server/Data Center. It fetches pull request diffs, analyzes them using Google's Gemini 2.0 Flash model, and identifies potential bugs, style issues, or logic errors.

Installation

Ensure you have Go installed, then clone the repository and build the binary:

git clone https://git.schreifuchs.ch/schreifuchs/pierre-bot.git
cd pierre-bot
go build -o pierre ./cmd/pierre/main.go

Configuration

Pierre Bot can be configured via Command Line Flags, Environment Variables, or a YAML Config File.

Configuration Hierarchy

  1. Command line flags
  2. Environment variables
  3. config.yaml in the current directory
  4. ~/.pierre.yaml

Required Environment Variables

To avoid passing sensitive tokens in plain text, it you cann export these:

export BITBUCKET_URL="https://your-bitbucket-instance.com"
export BITBUCKET_TOKEN="your-personal-access-token"
export LLM_API_KEY="your-gemini-api-key"

Usage Examples

The tool uses positional arguments for the specific Pull Request you want to target: pierre <project> <repo> <pr-id>

1. Basic Command Line Usage

If you have your environment variables set, simply run:

./pierre-bot PROJ-KEY my-app-repo 125

2. Using a Configuration File

You can create a config.yaml file to store persistent settings:

# config.yaml
bitbucket-url: "https://bitbucket.example.com"
bitbucket-token: "np-mY-S3cr3t-T0k3n"

Then run the bot:

./pierre-bot --config config.yaml PROJ-KEY my-app-repo 125

3. Overriding Everything via Flags

./pierre \
  --bitbucket-url="https://bitbucket.example.com" \
  --bitbucket-token="token" \
  MYPROJECT my-repo 42

Description
No description provided
Readme 18 MiB
Languages
Go 100%