Skip to main content

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 Claude Code skills and global Codex mb-* skills grounded in the same deterministic mb facts. The mb CLI stays runtime-agnostic by design so future adapters can 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 and Codex guidance, verifies discovery, and prints the next start step. Supports --yes and --json for smoke tests.
mb init Scaffold a new business repo (business folders, CLAUDE.md, AGENTS.md, CODEOWNERS, git init) and wire bundled runtime guidance. 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, Codex guidance, and start-skill wiring, then prints the exact next step. Supports --json.
mb validate Frontmatter shape check across current business repo folders, with compatibility reads for old migrated surfaces where needed. 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 pulse install Install an operator-owned daily pulse wrapper.
mb leads grade Grade lead batches and calculate eligible-lead CPL beside raw CPL.
mb ledger init Create the what's-working creative ledger structure.
mb automation init Create an inspectable steered-loop automation contract.
mb production plan Inspect launch/production readiness without mutating providers or repos.
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, inspect hygiene/identity, and report 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.

If you installed Main Branch as a Claude Code plugin, package updates do not change the plugin that Claude Code has already loaded. After updating, re-add the Main Branch plugin (claude plugin marketplace add noontide-co/mainbranch) and restart Claude Code.

Status

Main Branch is Claude Code first with supported Codex CLI guidance through generated AGENTS.md and global mb-* skills. mb onboard, mb status, mb start, and mb update are public package surfaces. Cursor, OpenClaw, Hermes, and local runtimes remain 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.

Download files

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

Source Distribution

mainbranch-0.4.0.tar.gz (1.3 MB view details)

Uploaded Source

Built Distribution

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

mainbranch-0.4.0-py3-none-any.whl (1.3 MB view details)

Uploaded Python 3

File details

Details for the file mainbranch-0.4.0.tar.gz.

File metadata

  • Download URL: mainbranch-0.4.0.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for mainbranch-0.4.0.tar.gz
Algorithm Hash digest
SHA256 44624714dccfef3c3bf60487ce0b2998e9b4357f9d190043df7eab6b3569d321
MD5 76ae43a606d84df642a69098fa39f355
BLAKE2b-256 82e2d786fe5ade76971c0122790780e951436d22876a2382d7865e3938d4a13c

See more details on using hashes here.

Provenance

The following attestation bundles were made for mainbranch-0.4.0.tar.gz:

Publisher: publish-pypi.yml on noontide-co/mainbranch

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

File details

Details for the file mainbranch-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: mainbranch-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for mainbranch-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4e21b9f5e929a3fc6ab31d8b83bff780f7b13588f65087df006aa141a3e5ae32
MD5 312946f2a3bf537705ed244e50f70ab0
BLAKE2b-256 2a7f325e324635522a17e321f818ceef0bd60b6e9edbf57ad3d33502c80f0116

See more details on using hashes here.

Provenance

The following attestation bundles were made for mainbranch-0.4.0-py3-none-any.whl:

Publisher: publish-pypi.yml on noontide-co/mainbranch

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

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page