Skip to main content

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. In v0.1.x, 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 files, 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 substrate, wires Claude Code skills, verifies discovery, and prints the next /start step. Supports --yes and --json for smoke tests.
mb init Scaffold a new business repo (six 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 when gh is authenticated. Supports --json.
mb start Runtime handoff. Verifies the current business repo, git, Claude Code, and /start skill wiring, then prints the exact claude command or launches it with --launch. Supports --json.
mb validate Frontmatter shape check across decisions/, core/offers/, research/, log/, campaigns/, 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 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 think <topic> Print the /think workflow invocation hint for the currently supported runtime.
mb resolve <key> Resolve a reference path (checks free first, then paid).
mb skill path <name> Print the on-disk path to a bundled skill.
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 educational <topic> Print an educational triage file. Powers mb doctor's "tell me more" prompts.

Status

v0.1 is Claude Code first. Runtime compatibility for Codex, Cursor, OpenClaw, Hermes, and local runtimes is a v0.2+ commitment. 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


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.2.0.tar.gz (478.2 kB view details)

Uploaded Source

Built Distribution

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

mainbranch-0.2.0-py3-none-any.whl (586.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mainbranch-0.2.0.tar.gz
  • Upload date:
  • Size: 478.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mainbranch-0.2.0.tar.gz
Algorithm Hash digest
SHA256 6108b79b5283abb9c6f15d5491748879e0a7dc2a8c2797b6f0c2b7a3f764b200
MD5 4cb8b9dc75288e54440c59ccdad9d9d5
BLAKE2b-256 f1f21008d5bc6e82f989448d078e393ee4bcb339c5f7673b9eb1d80645c99040

See more details on using hashes here.

Provenance

The following attestation bundles were made for mainbranch-0.2.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.2.0-py3-none-any.whl.

File metadata

  • Download URL: mainbranch-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 586.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mainbranch-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b7cf2c3d403b93545388ab5b05c5fead8a97e0fc680e126b00d3c82ae4a3d426
MD5 2c7a7560f1755a752cf288365b26c77c
BLAKE2b-256 e2bd9a0de5219fcea8363d049aacf0853f1eff677adecb2019ce46b0fc26da9b

See more details on using hashes here.

Provenance

The following attestation bundles were made for mainbranch-0.2.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