Main Branch engine umbrella - scaffolds, validates, and graphs business-as-files repos. Claude Code first, runtime-agnostic by design.
Project description
mainbranch (mb)
Engine umbrella for Main Branch — scaffolds, validates, and graphs business-as-files repos.
This package is the Python entry point. Workflows, playbooks, educational content, and consumer-repo templates ship as bundled package data. Today, the day-to-day "do work" surfaces are packaged as Claude Code skills (markdown), invoked from inside Claude Code. The mb CLI is runtime-agnostic by design: future adapters should let Codex, Cursor, OpenClaw, Hermes, and local runtimes operate against the same business-as-files repo.
The source tree keeps the engine payload in one place: repo-root .claude/. During sdist/wheel builds, setup.py copies that tree into mb/_engine/.claude/ inside the build artifact so installed wheels can resolve skills, playbooks, reference materials, lenses, and educational prompts without a source checkout.
Install
pipx install mainbranch
That puts mb on your PATH. Verify:
mb --version
Subcommands
| Command | What it does |
|---|---|
mb onboard |
Human setup flow. Creates or connects a business repo, explains the local files/git/GitHub model, wires Claude Code skills, verifies discovery, and prints the next /mb-start step. Supports --yes and --json for smoke tests. |
mb init |
Scaffold a new business repo (business folders, CLAUDE.md, CODEOWNERS, git init) and wire the bundled Claude Code skill adapter. One question only: business name. |
mb doctor |
Diagnostic. Checks Claude Code, gh auth, network, librsvg, runtime wiring, and package freshness. Warns on cloud-backed finance paths and offers educational triage. |
mb status |
Daily briefing. Summarizes repo shape, install/runtime readiness, recent brain files, recent git activity, and GitHub tasks/proposals when gh is authenticated. Supports --json. |
mb start |
Runtime handoff. Verifies the current business repo, git, Claude Code, and /mb-start skill wiring, then prints the exact claude command or launches it with --launch. Supports --json. |
mb validate |
Frontmatter shape check across core/, research/, decisions/, bets/, log/, pushes/, legacy campaigns/, and documents/. Exit 1 on any fail. |
mb graph |
Walk linked_research / linked_decisions / supersedes; emit Graphviz DOT to stdout. --open shells to dot + open. |
mb similar-bets |
Find similar past bets and offer outcomes from repo truth. |
mb checkpoint |
Plan or save a business-readable git checkpoint. |
mb update |
Refresh the Main Branch engine according to install mode (pipx upgrade or clone git pull) and repair skill links. --check dry-runs; --json emits an envelope. |
mb migrate |
Inspect and apply numbered repo schema migrations. status, --check, and --apply support --json; --check prints privacy-safe summaries by default, with full diffs behind --diff. |
mb connect |
Connect provider credentials without committing secrets, test provider health, and inspect repair-safe integration status. |
mb site |
Inspect site readiness for launch-adjacent workflows. |
mb issue |
Draft and open privacy-safe GitHub issues from local friction. |
mb think <topic> |
Print the /mb-think workflow invocation hint for the currently supported runtime. |
mb resolve <key> |
Resolve a reference key from the curated library, local core files, or bundled stubs. |
mb skill path <name> |
Print the on-disk path to a bundled skill. |
mb skill validate <name> |
Validate bundled skill frontmatter, local references, and line-count gates. |
mb skill link --repo <path> |
Wire or repair Claude Code skill discovery for a business repo. Future runtime adapters should get equivalent wiring commands. |
mb skill repair --repo <path> |
Detect personal Claude Code skills that shadow Main Branch and safely back up stale Main Branch symlinks with --apply. |
mb educational <topic> |
Print an educational triage file. Powers mb doctor's "tell me more" prompts. |
Users on early 0.1.x installs must bootstrap once with
pipx upgrade mainbranch before mb update exists locally. Existing business
repos should run mb skill link --repo ., then mb skill repair --repo . after
upgrading.
Status
Main Branch is Claude Code first with a strong CLI front door: mb onboard, mb status, mb start, and mb update are public package surfaces. Runtime compatibility for Codex, Cursor, OpenClaw, Hermes, and local runtimes remains roadmap work. The schema is v1 and will evolve. The runtime boundary decision lives at decisions/2026-05-01-mb-cli-vs-agent-workflows-boundary.md; the engine master decision lives at decisions/2026-04-29-mb-vip-v0-1-0-master.md.
License
MIT.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mainbranch-0.3.37.tar.gz.
File metadata
- Download URL: mainbranch-0.3.37.tar.gz
- Upload date:
- Size: 1.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9eab643c064206c6d55752fbb1c5c9946cbb44da85a7df41c0e8d8169fab8e7d
|
|
| MD5 |
d270f56aca5f16ce36c87ce5ab6dd730
|
|
| BLAKE2b-256 |
2b9755be9a41372607f7dcf6efd1edb9dd642ee164aa1e3cf7a7c9d15d63378b
|
Provenance
The following attestation bundles were made for mainbranch-0.3.37.tar.gz:
Publisher:
publish-pypi.yml on noontide-co/mainbranch
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mainbranch-0.3.37.tar.gz -
Subject digest:
9eab643c064206c6d55752fbb1c5c9946cbb44da85a7df41c0e8d8169fab8e7d - Sigstore transparency entry: 1628494104
- Sigstore integration time:
-
Permalink:
noontide-co/mainbranch@7270a85a2efd855fedbd4014c380511583a2a12c -
Branch / Tag:
refs/tags/oe-v0.3.37 - Owner: https://github.com/noontide-co
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@7270a85a2efd855fedbd4014c380511583a2a12c -
Trigger Event:
release
-
Statement type:
File details
Details for the file mainbranch-0.3.37-py3-none-any.whl.
File metadata
- Download URL: mainbranch-0.3.37-py3-none-any.whl
- Upload date:
- Size: 1.2 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
955f5f70a55160e9c35f3b75ac10933b38780292df394442d5ab4a0b38992de3
|
|
| MD5 |
dd05f689715814f8a745a91e7de29bd9
|
|
| BLAKE2b-256 |
e753e2a6b37ced45c4176c0ac49e085cad92c40dc0a96cd2eef39cfc53e404cf
|
Provenance
The following attestation bundles were made for mainbranch-0.3.37-py3-none-any.whl:
Publisher:
publish-pypi.yml on noontide-co/mainbranch
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mainbranch-0.3.37-py3-none-any.whl -
Subject digest:
955f5f70a55160e9c35f3b75ac10933b38780292df394442d5ab4a0b38992de3 - Sigstore transparency entry: 1628494129
- Sigstore integration time:
-
Permalink:
noontide-co/mainbranch@7270a85a2efd855fedbd4014c380511583a2a12c -
Branch / Tag:
refs/tags/oe-v0.3.37 - Owner: https://github.com/noontide-co
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@7270a85a2efd855fedbd4014c380511583a2a12c -
Trigger Event:
release
-
Statement type: