# <img src="docs/assets/logo.png" alt="" width="32"> <img src="docs/assets/omegga-emoji.png" alt="" width="32"> Omegga

**[Documentation](https://omegga.brickadia.dev/)** &
[Discord](https://discord.gg/UcdwTYhS75) (Read the docs before asking questions in the Discord please!)

Omegga wraps [Brickadia](https://brickadia.com/)'s server console to provide interactivity and utility via plugins along with a web interface for managing your server.

Omegga can do things like:

- Automatically update/restart your server
- Manage your worlds from a web interface and load a world on startup/restart
- Chat with players while not on the server
- Read chat history with timestamps
- See kick and ban history
- Configure plugins from a web interface
- Manage permissions and multi-user role based access to the above features on a web ui

Omegga plugins can do things like:

- Interface with in-game wires and react to in-game wire events
- Add custom chat !commands and /commands
- Respond to and send chat messages
- Load bricks onto a player's template
- Load/Clear regions of bricks, entities
- Damage/heal players
- Give/remove weapons to players
- Change the environment
- Teleport players, detect player's positions
- Grant players roles
- Detect when a brick with an interact component is clicked

## Screenshots

[<img src="docs/assets/screenshots/console-home.png" alt="The omegga console" width="256"/>](docs/assets/screenshots/console-home.png)
[<img src="docs/assets/screenshots/chat-search.png" alt="Searching chat history" width="256"/>](docs/assets/screenshots/chat-search.png)
[<img src="docs/assets/screenshots/plugins.png" alt="The plugin list" width="256"/>](docs/assets/screenshots/plugins.png)
[<img src="docs/assets/screenshots/dashboard.png" alt="The web UI dashboard" width="256"/>](docs/assets/screenshots/dashboard.png)
[<img src="docs/assets/screenshots/players.png" alt="The player list and inspector" width="256"/>](docs/assets/screenshots/players.png)
[<img src="docs/assets/screenshots/metrics.png" alt="Server metrics" width="256"/>](docs/assets/screenshots/metrics.png)

## Install

Omegga runs on linux, including the [Windows Subsystem for Linux](docs/install/wsl.md). **Do not install or run it as root**; if `whoami` prints "root", [create a new user](docs/install/linux.md#creating-a-new-user) first.

Get Omegga on Debian, Ubuntu, Fedora, or Arch with:

```sh
curl -fsSL https://omegga.brickadia.dev/install.sh | bash
```

[Omegga `install.sh` Docs](docs/install/linux.md#quick-setup) | [Omegga `install.sh` Source](tools/install.sh)

<details>
<summary>Manual Install for Debian or Ubuntu</summary>

```sh
# update what's installed, then install what omegga needs
sudo apt update && sudo apt upgrade
sudo apt install curl git build-essential python3 wget tar openssl lib32gcc-s1

# download nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash

# activate nvm
. ~/.nvm/nvm.sh

# install node version 24
nvm install 24

# install omegga
npm i -g omegga
```

</details>

Then make a folder for your server and start it:

```sh
mkdir myServer && cd myServer
omegga
```

Omegga will prompt for credentials as necessary and only stores the auth tokens brickadia generates on login. **Omegga does not store your password**.

To run it in a container instead, see [Containers](docs/containers.md), or [Pterodactyl](docs/guides/pterodactyl.md) to run it as an egg under a Pterodactyl panel. For the long version, including troubleshooting, see [Installing](docs/install/README.md).

## Documentation

Everything below is also published as a book at
**<https://omegga.brickadia.dev/>**.

| Setting up | |
| --- | --- |
| [Installing](docs/install/README.md) | [linux](docs/install/linux.md), [WSL](docs/install/wsl.md), or a [container](docs/containers.md) |
| [Pterodactyl](docs/guides/pterodactyl.md) | running omegga as a Pterodactyl egg |
| [Running](docs/running.md) | starting a server and keeping it updated |
| [Configuration](docs/config.md) | `omegga-config.yml`, field by field |
| [Environment variables](docs/env.md) | what omegga reads from the environment |
| [Troubleshooting](docs/troubleshooting.md) | when it does not start |
| [Uninstalling](docs/uninstall.md) | removing omegga and the game |

| Plugins | |
| --- | --- |
| [Plugins](docs/plugins/README.md) | structure, `doc.json`, config, and the plugin store |
| [Installing plugins](docs/plugins/installing.md) | `omegga install`, updating, removing |
| [Node VM plugins](docs/plugins/safe.md) | the default plugin type |
| [Node plugins](docs/plugins/unsafe.md) | unsafe plugins with raw access to omegga |
| [JSON RPC plugins](docs/plugins/jsonrpc.md) | plugins in any language |

| API | |
| --- | --- |
| [Omegga](docs/api/omegga.md) | the server |
| [Player](docs/api/player.md) | one player |
| [Plugin](docs/api/plugin.md) | `config`, `store`, `metrics` |
| [Events](docs/api/events.md) | what omegga emits as the server runs |
| [Log parsing](docs/api/log-parsing.md) | console output omegga does not already parse |

| Operating a server | |
| --- | --- |
| [Metrics](docs/metrics.md) | the Prometheus endpoint and the web UI dashboards |
| [Web UI permissions](docs/permissions.md) | roles and scopes |
| [HTTPS](docs/guides/https.md) | a real certificate, with Caddy or nginx |
| [Running on another machine](docs/guides/remote.md) | ssh, file sharing, several omeggas |

## Contributing

```sh
git clone https://github.com/brickadia-community/omegga.git && cd omegga
npm i
npm link      # run this checkout as the `omegga` command
npm run dist  # build the web ui, omegga's typescript, and omegga.d.ts
```

`npm run lint`, `npm run typecheck`, and `npm test` are what CI runs. The API
pages under `docs/api` are generated from the JSDoc in `src/`; run
`npm run docs:api` after changing those comments.

### Release Process

1. **Bump**: Bump `version` in `package.json` and sync the lockfile with
    `npm i --package-lock-only`.
2. **Changelog**: Move the `## Latest` entries in `CHANGELOG.md` under a
    `## <version> - <date>` heading. Preview with `just notes`
3. **Pterodactyl**: Point the pinned image in `docker/pterodactyl/egg-omegga.json` at the new
    `<major>.<minor>`. Releases only move `latest`, `<major>`, and
    `<major>.<minor>`, so a pin left on the previous minor is frozen on an
    image that will never be rebuilt, while still being selectable in the
    panel.
4. **Linters**: `just check`
5. **Commit**: Ensure everything is pushed
6. **Tag**: `just tag` pushes `v<version>` and builds the ghcr image and npm releases
7. **Approve the npm release**: A developer with npm access must do the following:

    ```sh
    npm stage list omegga    # find the stage-id
    npm stage download <id>  # optional, inspect the tarball before approving
    npm stage approve <id>   # prompts for an OTP, then publishes
    ```
