Skip to main content

Masterbrain Python Package

Published Python package for the Masterbrain monorepo. It owns the provider-neutral AI core, model provider adapters, FastAPI service, desktop launcher, Python tests, and PyInstaller packaging flow.

The package depends on the sibling airalogy package in source checkouts and uses it to validate and unpack .aira archives for the local protocol/record library.

For platform coverage and packaging limits, see ../../PLATFORM_SUPPORT.md. For PyPI release automation, see ../../RELEASING.md. For usage metering and Platform billing integration, see ../../docs/en/usage-and-billing.md.

Setup

cp .env.example .env
uv sync --dev

packages/masterbrain/.env is the standard location for local runtime configuration.

Run

Start the FastAPI server:

uv run uvicorn masterbrain.fastapi.main:app --reload --host 127.0.0.1 --port 8080

Launch the integrated desktop-style local app after building the frontend in apps/studio:

uv run masterbrain-studio

masterbrain-desktop is kept as a deprecated compatibility alias and will be removed in a future release.

You can bind the app to an existing workspace directory:

uv run masterbrain-studio --workspace /path/to/project

You can also pass an .aira archive path as the launch document. Masterbrain will import it into the local library before opening the UI:

uv run masterbrain-studio /path/to/archive.aira

OpenCode

Code-edit flows require an OpenCode runtime. Either install opencode globally, or vendor it locally:

python3 scripts/vendor_opencode.py

Tests

Run the Python package test suite:

uv run python -m pytest

pytest.ini excludes openai and qwen markers by default.

Packaging

PyPI publishing is handled by the repository-level GitHub Actions release workflow on v* tag pushes.

Build the packaged local bundle with the cross-platform CLI:

uv run masterbrain-build-desktop

Wrapper scripts are also available:

  • macOS / Linux: ./scripts/build_desktop_bundle.sh
  • Windows PowerShell: .\scripts\build_desktop_bundle.ps1

This builds the frontend from apps/studio, vendors OpenCode into packages/masterbrain/vendor/, syncs the packaging dependency group, writes the raw PyInstaller bundle to packages/masterbrain/dist/Masterbrain/, and then packages platform release artifacts under packages/masterbrain/dist/release/<platform>/.

  • macOS: unsigned Masterbrain.app and a versioned .zip
  • Windows x64: portable directory, portable .zip, and an Inno Setup .iss script; if ISCC.exe is available or passed via --inno-setup-compiler, the installer .exe is also built
  • Linux: portable directory and a versioned .tar.gz

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

masterbrain-0.10.0.tar.gz (115.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

masterbrain-0.10.0-py3-none-any.whl (190.2 kB view details)

Uploaded Python 3

File details

Details for the file masterbrain-0.10.0.tar.gz.

File metadata

  • Download URL: masterbrain-0.10.0.tar.gz
  • Upload date:
  • Size: 115.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for masterbrain-0.10.0.tar.gz
Algorithm Hash digest
SHA256 461a6451152b3b1414492d48f72c28b897e1f241677c532e68ce2821523dce2a
MD5 604e9076d7c8fdfeadaed226c90ebadd
BLAKE2b-256 8d28aa1299f0e4d99530962cfa0aaec23f39e51ead7f1be46aac1e6c427346ed

See more details on using hashes here.

Provenance

The following attestation bundles were made for masterbrain-0.10.0.tar.gz:

Publisher: release.yml on airalogy/masterbrain

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file masterbrain-0.10.0-py3-none-any.whl.

File metadata

  • Download URL: masterbrain-0.10.0-py3-none-any.whl
  • Upload date:
  • Size: 190.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for masterbrain-0.10.0-py3-none-any.whl
Algorithm Hash digest
SHA256 54b496d966c62ffe145c0af070e127f3cdeec2a4096fa9bfc934d327b9c11790
MD5 0d13aead983103c7b8aa3e7159f4c9c8
BLAKE2b-256 82969e83c9b5d5e7dcd8307d4ada7822a231e9eab71ab8b0c63c1ca558740e63

See more details on using hashes here.

Provenance

The following attestation bundles were made for masterbrain-0.10.0-py3-none-any.whl:

Publisher: release.yml on airalogy/masterbrain

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.11.0

2 files

0.10.1

2 files

This release

0.10.0 This release

2 files

0.9.1

2 files

0.9.0

2 files

0.8.0

2 files

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page