Skip to content

Contributing

Hello! Thank you for your interest in contributing to this project. This guide will help you get started.

Prerequisites

Windows setup
  1. Open PowerShell

  2. Install scoop

    Terminal window
    Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
    Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression
  3. Install git, node through scoop

    Terminal window
    scoop install git nodejs
  4. Install pnpm through corepack

    Terminal window
    corepack enable
    corepack prepare pnpm@latest --activate
macOS setup
  1. Open Terminal, (or iTerm2, Ghostty, Kitty, etc.)

  2. Install git, node through brew

    Terminal window
    brew install git node
  3. Install pnpm through corepack

    Terminal window
    corepack enable
    corepack prepare pnpm@latest --activate
Linux setup
  1. Open Terminal

  2. Follow nodesource/distributions: NodeSource Node.js Binary Distributions to install node

  3. Follow Git to install git

  4. Install pnpm through corepack

    Terminal window
    corepack enable
    corepack prepare pnpm@latest --activate

If you have already contributed to this project before

Make sure your local repository is up to date with the upstream repository:

Terminal window
git fetch -all
git checkout main
git pull upstream main --rebase

If you have a working branch, to make your branch up to date with the upstream repository:

Terminal window
git checkout <your-branch-name>
git rebase main

Fork this project

Click on the Fork button on the top right corner of the moeru-ai/airi page.

Clone

Terminal window
git clone https://github.com/<your-github-username>/airi.git
cd airi

Create your working branch

Terminal window
git checkout -b <your-branch-name>

Install dependencies

Terminal window
corepack enable
pnpm install

Choose the application you want to develop on

Documentation site

Terminal window
pnpm -F @proj-airi/docs dev

Stage web (Frontend for airi.moeru.ai, or airi.ayaka.io)

Terminal window
pnpm -F @proj-airi/stage-web dev

Stage Tamagotchi (Electron app for アイリ VTuber)

Terminal window
pnpm -F @proj-airi/stage-tamagotchi dev

Telegram bot integration

A Postgres database is required.

Terminal window
cd services/telegram-bot
docker compose up -d

Configure .env

Terminal window
cp .env .env.local

Edit the credentials in .env.local.

Migrate the database

Terminal window
pnpm -F @proj-airi/telegram-bot db:generate
pnpm -F @proj-airi/telegram-bot db:push

Generate bundles for Monorepo packages

Terminal window
pnpm packages:stub

Run the bot

Terminal window
pnpm -F @proj-airi/telegram-bot start

Discord bot integration

Terminal window
cd services/discord-bot

Configure .env

Terminal window
cp .env .env.local

Edit the credentials in .env.local.

Generate bundles for Monorepo packages

Terminal window
pnpm packages:stub

Run the bot

Terminal window
pnpm -F @proj-airi/discord-bot start

Minecraft agent

Terminal window
cd services/minecraft

Start a Minecraft client, export your world with desired port, and fill-in the port number in .env.local.

Configure .env

Terminal window
cp .env .env.local

Edit the credentials in .env.local.

Generate bundles for Monorepo packages

Terminal window
pnpm packages:stub

Run the bot

Terminal window
pnpm -F @proj-airi/minecraft-bot start

Commit

Before commit

Commit

Terminal window
git add .
git commit -m "<your-commit-message>"

Push to your fork repository

Terminal window
git push origin <your-branch-name> -u

You should be able to browse the branch on your fork repository.

Creating Pull Request

Navigate to moeru-ai/airi page, click on the Pull requests tab, and click on the New pull request button, click on the Compare across forks link, and select your fork repository.

Review the changes, and click on the Create pull request button.

Whooo-ya! You made it!

Congratulations! You made your first contribution to this project. You can now wait for the maintainers to review your pull request.