bussola
Local, per-function code review for git branches. bussola serve opens a review UI on localhost that works directly on your repository, without needing a hosting service.
Bussola is Italian for compass: it helps you find your way through a large change, one function at a time.
- Changes between a branch and its base (the same three-dot diff a pull request shows) are split into reviewable units: functions, methods, class bodies, TypeScript and Go types, module-level code, and whole files for languages that are not parsed.
- An approval is tied to the content of a unit, not to a commit. After new commits, a rebase or a force-push, a unit with the same content stays approved.
- When an approved unit changes, you see the diff between the version you approved and the current one.
- Module-level code and whole files can also be approved one selection of lines at a time.
- "Since my last review" shows only what appeared or changed after you last clicked "Mark as reviewed".
- Comment threads are anchored to lines and follow them when the code moves. They can be sent to the GitHub pull request.
Python (.py, .pyi), TypeScript (.ts), TSX, JavaScript (.js, .jsx, .mjs, .cjs) and Go (.go) are parsed with tree-sitter. Everything else is reviewed as whole files.
In Go, each function, method and type is its own unit. A method is named after its receiver type (Service.Run, also for *Service and Stack[T]), and its card is shown under the card of that type when both are in the same file. Each type in a grouped type ( ... ) block is a separate unit.
Install
Requirements: Python 3.12+, git, and the GitHub CLI (gh) for the GitHub features only.
uv tool install bussola
pipx install bussola works too. bussola is developed on macOS and tested on macOS and Linux. Windows is not tested yet.
To install from a clone instead, you also need Node.js 22.12+ to build the UI (frontend/.nvmrc pins 24):
npm --prefix frontend ci
npm --prefix frontend run build
uv tool install .
The UI build goes to src/bussola/static/ and is packaged with the Python wheel, so rebuild it before reinstalling.
Usage
bussola serve
Run inside a repository to register it and open the browser. Settings (top right) opens a window with Open pull request, Add repository and Code font. To add other repositories, use Browse... under Add repository: it lists the git repositories found in your home folder (up to four levels deep, skipping hidden folders, node_modules, Library and similar), and its Browse folders tab lets you pick any other folder. You can also paste a path. Options: --repo PATH, --host 127.0.0.1, --port 8765, --no-open.
The printed link contains a one-time session token. Opening it stores the token in a cookie for that browser; if you open bussola another way and see "Not authorized", use the printed link again.
bussola status feature/x --base develop
bussola refresh feature/x --fetch
status refreshes the review of a branch and prints the state of each changed unit. refresh records a new revision if any commit changed (--fetch runs git fetch --prune first). The base defaults to base_branch from .bussola.toml, then the first of develop, main, master that exists. An open review page picks up new revisions by itself.
Reviewing
The review header has two actions:
- Sync (shortcut
r) first fetches the branch from its remote (on a pull request review: the pull request's latest commits and comments from GitHub), then records any new commits as a new revision. Approvals of units that did not change are kept. If the remote or GitHub cannot be reached, it checks the local branch and says so. When the review is linked to a pull request, it then sends your unsent comments to GitHub (see below); the button shows how many are waiting, as in "Sync · 3 to send". - Mark as reviewed remembers where you are. It approves and closes nothing; the Since my last review filter then shows only what changes after this point.
Image files changed in the review (PNG, JPEG, GIF, WebP, AVIF, BMP, ICO, SVG) show the image before and after the change, with its size; SVG files also keep their text diff.
Diffs are syntax highlighted with the colors GitHub uses, by file extension (Python, TypeScript, JavaScript, Go, Java, Kotlin, Ruby, Rust, PHP, C/C++, C#, Swift, SQL, shell, YAML, JSON, HTML/XML, CSS, Markdown and others). The whole unit is highlighted at once, so strings and comments that span several lines keep their color even when part of them is collapsed.
Code font in Settings sets the font and size used for code. It suggests the common coding fonts installed on your computer; in Chrome and Edge, List all installed monospaced fonts asks the browser for permission and lists every installed monospaced font. You can also type the name of any installed font. Ligatures turns ligatures on or off for fonts that have them (Fira Code, JetBrains Mono, Victor Mono and similar; SF Mono, Menlo and Monaco have none), and Font features turns on OpenType features such as stylistic sets (ss01, Monaspace's ligatures) or zero. The choice is kept in this browser.
Units that still need review start open and the others closed. Approving a unit closes its card, and a card opens again when its unit needs review again (approval revoked, or new changes).
| State | Meaning |
|---|---|
| New | Not approved yet |
| Approved | You approved this exact content |
| Approved (moved) | You approved the same content under another name or path, which no longer exists |
| Changed since approval | You approved an earlier version; the diff shows approved to current by default |
| Partly approved | Some of the changed lines of a module or file are approved |
| Removed | The unit was deleted; approving it confirms the deletion |
Methods are shown inside their class's card. When only methods of a class changed, the class still gets a card, marked "no changes outside its methods", with nothing to approve.
A unit's own name does not count towards its content, so renaming a function with an unchanged body keeps the approval.
To approve part of a module or file, click changed lines in its diff (shift-click extends the selection) and press "Approve selection". An approved line needs review again if it or the line next to it changes.
Keyboard: j / k next and previous unit, n next unit to review, a approve or revoke (or approve the selected lines), c comment, r check for new commits.
Comments
Click a line number to start a thread on that line. To comment on several lines, drag over their line numbers or shift-click another line number; the thread is sent to GitHub as a multi-line comment. Use "Comment on file" in a file header, or the conversation panel for comments on the whole review. Comments and pull request descriptions are rendered like on GitHub: GitHub Flavored Markdown (tables, task lists, line breaks), > [!NOTE] style alerts, safe HTML, highlighted code, mermaid diagrams, owner/repo#123 links, and images attached on GitHub (downloaded through bussola with your gh login, since GitHub only serves them to signed-in users). You can edit or delete your own comments, and delete a thread you started as long as nobody else replied to it (otherwise resolve it). Deleted threads disappear from bussola but stay on GitHub if they were already sent. When the code changes, a thread moves with its line. It follows a renamed unit, and becomes outdated, showing the original snippet, when its line is gone.
Reviewing GitHub pull requests
For a repository with a GitHub remote, Pull requests on its card lists the open pull requests (read with the GitHub CLI, see below), each with its number of comments and how many review threads are still unresolved on GitHub. The list of reviews shows the same for bussola's own threads.
- Open pull request in Settings takes a GitHub pull request link (
https://github.com/<owner>/<repository>/pull/<number>, with or without/filesor an anchor). bussola looks for a repository you added whose remote points to that GitHub repository; if there is none, it scans your home folder as Browse does, adds the first clone it finds and uses it. Then it opens the pull request review as Review below does. You can also openhttp://127.0.0.1:<port>/github.com/<owner>/<repository>/pull/<number>directly: replacehttps://in a GitHub link with the bussola address. - Review downloads the pull request's code with
git fetchintorefs/bussola/pull/<number>, so your branches are not touched. It then starts a review against the pull request's base branch, already linked to the pull request. - Sync reviews fetches the latest commits of every pull request you are reviewing in that repository and records new revisions. Pull requests that were closed or merged are marked as such. A review of a branch that you linked to a pull request is refreshed the same way its own Sync does it: the branch is fetched and the pull request comments are imported.
- The filter above the repositories (Open, Merged, Closed, All) shows open pull requests and branch reviews by default; reviews of merged or closed pull requests are hidden until you pick another filter. Each repository says how many reviews the filter hides, and the choice is kept in this browser.
- On a pull request review, Sync does the same for that one pull request.
- The pull request's description is shown under the review header (collapsible, long ones are cut short until you click Show all) and is updated at every sync.
- Comments already on GitHub are brought into the review each time: line comments become threads on the same lines (or on the file when the line is outdated or outside the changed units), conversation comments and review summaries become review comments, and resolved threads stay resolved. Your own GitHub comments show as yours, and replying in bussola to an imported thread sends the reply to GitHub. Comments that came from GitHub link back to it.
- While a pull request review is open, bussola syncs its comments with GitHub every 3 minutes, and again when you come back to the page. New comments and replies are added, comments edited on GitHub are updated (unless you edited them in bussola and have not sent the edit yet), and threads resolved or reopened on GitHub follow. The header says when the last sync happened, and tells you when new commits were pushed so you can Sync. Comments deleted on GitHub stay in bussola.
- Resolving or reopening a thread that is also on GitHub does the same on GitHub. If GitHub refuses (for example, you lack write access), the thread stays as it was and the error is shown.
bussola contacts GitHub only when you press one of these buttons, or for the automatic sync while a pull request review is open.
Sending comments to GitHub
Sync sends the comments you have not sent yet as one pull request review. A pull request review is already linked; for a branch review with unsent comments, Sync offers the open pull requests of that branch (or a PR number) and sends once you pick one. It uses the GitHub CLI, so run gh auth login once; bussola never stores a token.
- Lines inside the pull request diff become review comments on that line.
- Other lines, outdated threads and file threads become file comments that quote the line.
- Review threads go into the review body.
- Later replies and edits are sent as replies and edits of the published comments. Deleting a thread locally does not change GitHub; resolving or reopening one that is on GitHub does.
- Sending is blocked while the pull request head differs from the reviewed commit, because line numbers would not match.
Approvals stay local.
Configuration
Optional .bussola.toml at the repository root:
base_branch = "develop"
file_level = ["**/migrations/*.py", "*.lock", "package-lock.json", "pnpm-lock.yaml", "*.min.js"]
ignore = ["vendor/**", "docs/**"]
file_level: globs reviewed as whole files instead of being parsed. Setting it replaces the defaults shown above.ignore: globs left out of the review entirely.- Glob matching: a pattern without
/matches the file name at any depth,**/matches any number of directories, and*stays within one directory.
Data
Reviews, approvals and comments are stored in SQLite at platformdirs.user_data_dir("bussola")/bussola.db (on macOS ~/Library/Application Support/bussola). Set BUSSOLA_DATA_DIR to use another directory.
A registered repository is remembered by its path and its first commit. If you move it, add it again from the new location and its reviews follow.
Security
The server is meant for one person on one machine.
- Network: it listens on
127.0.0.1by default and warns if you pass another--host. - Session token: every API call needs the session token cookie (HttpOnly, SameSite=Strict).
- Host check: requests whose
Hostheader is not127.0.0.1:<port>orlocalhost:<port>are rejected, which blocks DNS rebinding. - Git refs and files: refs are validated with
git rev-parse --verify --end-of-optionsbefore use. File contents are read only from the git object database. - Opening links: GitHub links are opened by the server in your default browser, as a new tab, so they work even when the bussola page runs in an app-style window. The server only opens
https://github.comaddresses. - Outbound traffic: the only network access is
git fetchwhen you ask for it,ghwhen you sync or have a pull request review open, and downloads of images attached on GitHub shown in comments and descriptions. - Rendered Markdown: HTML in comments and descriptions is sanitized with GitHub's rules before it is shown. Attached images are served from
/api/forge/assetonly forhttps://github.com/.../assets/...links and only when they are images, with a sandboxing Content-Security-Policy.
Status
bussola is used on real pull requests, but it is young. Until 1.0, commands, options and the UI may change between minor versions. Your data is kept across upgrades: the database is migrated automatically at startup, and a change to how files are split into units is applied to existing reviews at their next Sync, without losing approvals of units that did not change.
FAQ
Does my code leave my machine?
No. bussola reads your local clone. It only talks to your git remote when you sync, and to GitHub through your own gh login when you use the pull request features.
Do I need GitHub?
No. Any two branches of a local repository can be reviewed. GitHub adds pull request listing, comment import and sending comments back.
Is it a replacement for GitHub's review UI?
It is a place to do the reading. Approvals stay with you and follow the code across force-pushes and rebases; comments go back to the pull request so the discussion stays where your team has it.
Can several people review the same branch?
Each person runs bussola on their own machine and keeps their own approvals. Comments are shared through the pull request.
What about other languages?
Files that are not parsed are still reviewed, as whole files with line selections. Adding a language means adding a tree-sitter extractor in src/bussola/units/extractors/; see CONTRIBUTING.md.
Contributing
See CONTRIBUTING.md for the development setup and checks, and docs/design.md for how units, revisions, approvals, threads and the GitHub integration work. Report security issues as described in SECURITY.md.
License
bussola is released under the MIT License. It is not affiliated with GitHub; GitHub is a trademark of GitHub, Inc.
The UI bundles third-party libraries; their licenses are listed in THIRD_PARTY_LICENSES.md, which the UI build writes next to the app and the package ships. Diagrams use elkjs (EPL-2.0), whose source code is available from that repository.
Metadata
Release files for bussola 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| bussola-0.1.0.tar.gz | 1.9 MB | With provenance | Details for bussola-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bussola-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for bussola-0.1.0-py3-none-any.whl |
Total release size: 3.9 MB
Release files / bussola-0.1.0.tar.gz
| Download URL | bussola-0.1.0.tar.gz |
|---|---|
| Size | 1.9 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
31c3315c22566636e572b55b8a67e8da62a9ecd837dd8b784ed952c2a3f5d18f
|
|
BLAKE2b-256 checksum How to use checksums |
9dca001a12a31c42db46050fefcea8bd1e0ad018562a7008c483bc17b0038438
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.
Transparency logRelease files / bussola-0.1.0-py3-none-any.whl
| Download URL | bussola-0.1.0-py3-none-any.whl |
|---|---|
| Size | 2.0 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ac2c38747d5e3df18ad85cfabee207d5ad02f44290d7fce667e6c1c5fd307e40
|
|
BLAKE2b-256 checksum How to use checksums |
8b256b0a04cd613559cbaeac8366c179c2f05c32a6e89c32fa9253b2775f00d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.
Transparency logSecurity for bussola 0.1.0
Provenance
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for bussola-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.
Transparency logA 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.