Skip to main content Switch to mobile version bpilot 0.1.1 Intelligent backport helper for git repositories
pip install bpilot Copy PIP instructions
Intelligent backport helper for git repositories; helps backport/forwardport changes from one branch to another. bpilot automates the mechanical parts of backporting (fetch, branch, cherry-pick) and adds an LLM-assisted layer for conflict resolution and semantic gap analysis.
The LLM is a pure text-in/text-out function. It never sees git credentials and never executes anything, all repo mutation goes through the deterministic git-ops layer. Also, bpilot never merges.
Requires Python >= 3.10 and git on PATH.
pipx install bpilot # recommended: isolated env for the CLI # or pip install bpilot Both work the same on developer machines and in CI (e.g. a pip install bpilot step in GitHub Actions).
bpilot offers 4 commands. All to be run from the root of your project.
bpilot init # one-time setup, before first run: scaffold bpilot/skills/ + .bpilot/ for this project bpilot port # backport commits from current branch onto target branch bpilot finalize # optional; propose SKILL.md updates from a finished backport bpilot reset # discard session at any point in time during porting, return to original branch API key setup
bpilot uses OpenRouter for LLM inference. Get an API key from your OpenRouter dashboard, then provide it via one of:
Environment variable (works everywhere — local dev, CI, GitHub Actions):
export OPENROUTER_API_KEY="sk-or-..." Snap config (when running the snap; persists across sessions):
sudo snap set bpilot openrouter-api-key="sk-or-..." Without a key, bpilot falls back to --no-llm mode: mechanical cherry-pick only, no conflict resolution, no gap analysis. The --no-llm flag forces this regardless of key availability.
Scaffolds bpilot/skills/ with five starter SKILL.md files (valid frontmatter, empty section bodies) and the .bpilot/ session directory (added to .gitignore). When the LLM is available it refines two of the skill files from repo content:
verification-checks — inferred from README.md, CONTRIBUTING.md, pyproject.toml, and other config files.
version-control — inferred from README.md + a git analysis of branch names and recent commit messages.
The other three skills (conflict-resolution, gap-analysis, general-context) are left as placeholders; they're learned over time via finalize. Refuses to clobber an existing bpilot/skills/ directory.
bpilot port also auto-scaffolds on first run (unless --no-init is given), so init is optional — but recommended for the richer LLM-inferred starter content.
bpilot port abc123 8.0/edge # single commit bpilot port HEAD~3..HEAD 8.0/edge # commit range bpilot port abc123 8.0/edge --no-llm # mechanical cherry-pick only bpilot port abc123 8.0/edge --skip-baseline # skip the pre-cherry-pick baseline checks bpilot port abc123 8.0/edge --no-fetch # skip fetching; use the local target ref as-is bpilot port --continue # resume a paused run after manual conflict fixes If some conflicts can't be auto-resolved, the run pauses: the resolved files are committed, the failed ones are left in the working tree with conflict markers, and BACKPORT_REPORT.md explains what's outstanding. Fix the failed files, git add them, then run bpilot port --continue (no need to repeat / ) — your fixes are amended into the paused commit and any remaining commits are cherry-picked. To abandon a paused run instead, use bpilot reset.
By default the target branch is fetched from origin before branching. With --no-fetch the fetch is skipped and the local target ref is used as-is — useful when the environment running bpilot has no git credentials (e.g. a dev VM): fetch elsewhere first, as the local ref may be stale.
Local branch backport/ -to- with the cherry-picked + resolved changes, plus one labelled bpilot(gap): ... commit per applied gap fix.
BACKPORT_REPORT.md — what was done, gaps found (each mapped to its commit), token cost.
.bpilot/session.json — bpilot's end state, consumed later by finalize.
Review the branch (including the labelled bpilot(gap): commits — drop any you disagree with via git rebase -i / git reset), make manual edits, and run tests.
Proposes per-skill SKILL.md updates from a finished backport — diffing what bpilot suggested vs. what was accepted, classifying human edits, and asking the LLM to refine the skill files accordingly. Always human-reviewed; never auto-applied to a skill file.
Abort any in-progress cherry-pick, switch back to the original branch, force-delete the backport branch, and remove any session files (.bpilot/ and BACKPORT_REPORT.md).
Resolution order (highest precedence first):
CLI flags (--model, --no-llm, --skills-dir, ...)
Snap config (snap set bpilot = )
The API key never leaves the config module — it is forwarded to llm_client only and is never included in LLM prompts.
bpilot grounds its LLM prompts in repo-specific knowledge stored under bpilot/skills/ — a directory of named skills, each in its own subdirectory containing a SKILL.md:
bpilot/ └── skills/ ├── version-control/SKILL.md # branch + commit-message conventions ├── verification-checks/SKILL.md # format / lint / unit-test commands ├── conflict-resolution/SKILL.md # skip-file patterns + resolution rules ├── gap-analysis/SKILL.md # "Things to Check When Backporting" checklist └── general-context/SKILL.md # shared: lifecycle hooks, upgrade paths, files of interest Each SKILL.md conforms to the Agent Skills specification: YAML frontmatter (required name matching the parent directory, and description) followed by a markdown body of ## Section headers. The set of skills is fixed (4 task skills + general-context); see SKILLS_DIRECTORY_SPEC.md for the full spec and the section → skill mapping.
Point bpilot at a non-default location with --skills-dir.
WIP: GitHub Actions workflow
The same port / finalize can be invoked via PR comments. Planned commands:
/port — open a draft backport PR.
/finalize — propose SKILL.md updates on an open backport PR.
The bot carries the session snapshot as a hidden HTML comment embedded in the PR body (the session.py (de)serialisation and PR-body transport already exist). The gh-actions bot only opens draft PRs; it never merges.
Author: bpilot maintainers
Apache Software License (Apache-2.0)
License OSI Approved :: Apache Software License
Programming Language Python :: 3
Release files for bpilot 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
Built distribution (wheel)
Total release size: 138.1 kB
Release files / bpilot-0.1.1.tar.gz
Release files / bpilot-0.1.1-py3-none-any.whl
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.
Release history Release notifications | RSS feed
Nov 26, 2026 2 release files No provenance
Nov 25, 2026 2 release files No provenance
"PyPI", "Python Package Index", and the blocks logos are registered trademarks of the Python Software Foundation.
© 2026 Python Software Foundation




