MCPcopy Index your code
hub / github.com/Canop/bacon

github.com/Canop/bacon @v3.23.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v3.23.0 ↗ · + Follow
746 symbols 1,589 edges 122 files 135 documented · 18%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

bacon

Latest Version site Chat on Miaou License: AGPL v3

bacon is a background code checker.

It's designed for minimal interaction so that you can just let it run, alongside your editor, and be notified of warnings, errors, or test failures in your Rust code.

screenshot

Documentation

The bacon website is a complete guide.

Below is only a short overview.

install

cargo install --locked bacon

Run this command too if you want to update bacon. Configuration has always been backward compatible so you won't lose anything.

Some features are disabled by default. You may enable them with

cargo install --features "clipboard sound"

check the current project

bacon

That's how you'll usually launch bacon, because other jobs like test, clippy, doc, your own ones, are just a key away: You'll hit c to see Clippy warnings, t for the tests, d to open the documentation, etc.

check another project

bacon --path ../broot

or

bacon ../broot

check all targets (tests, examples, benches, etc)

bacon --job check-all

When there's no ambiguity, you may omit the --job part:

bacon check-all

run clippy instead of cargo check

bacon clippy

This will run against all targets like check-all does.

run tests

bacon test

or bacon nextest if you're a nextest user.

bacon test

When there's a failure, hit f to restrict the job to the failing test. Hit esc to get back to all tests.

define your own jobs

First create a bacon.toml file by running

bacon --init

This file already contains some standard jobs. Add your own, for example

[jobs.check-win]
command = ["cargo", "check", "--target", "x86_64-pc-windows-gnu"]

or

[jobs.check-examples]
command = ["cargo", "check", "--examples"]
watch = ["examples"] # src is implicitly included

and run

bacon check-win

or

bacon check-examples

The bacon.toml file may evolve with the features and settings of your project and should be added to source control.

Optional features

Some bacon features can be disabled or enabled at compilation:

  • "clipboard" - disabled by default : necessary for the copy-unstyled-output action
  • "sound" - disabled by default : necessary for the play-sound action

Licences

Bacon is licenced under AGPL-3.0. You're free to use it to compile the Rust projects of your choice, even commercial.

The logo is designed by Peter Varo and licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. license

Extension points exported contracts — how you extend this code

Analyzer (Interface)
(no doc) [14 implementers]
src/analysis/analyzer.rs
Ignorer (Interface)
(no doc) [2 implementers]
src/ignorer/mod.rs
Md (Interface)
(no doc) [2 implementers]
src/tui/md.rs
LineAnalyzer (Interface)
an utility for those analyzers that can work with the LineAnalysis struct [3 implementers]
src/analysis/line_analyzer.rs

Core symbols most depended-on inside this repo

push
called by 151
src/result/command_output.rs
len
called by 54
src/result/command_output.rs
set
called by 48
src/conf/keybindings.rs
iter
called by 46
src/conf/keybindings.rs
push_line
called by 28
src/analysis/item_accumulator.rs
clear
called by 21
src/tui/search_state.rs
get
called by 20
src/conf/keybindings.rs
shortest_key_for
called by 20
src/conf/keybindings.rs

Shape

Method 488
Function 123
Class 98
Enum 33
Interface 4

Languages

Rust98%
TypeScript2%

Modules by API surface

src/tui/mission_state.rs82 symbols
src/tui/search_state.rs24 symbols
src/conf/keybindings.rs18 symbols
src/analysis/nextest/nextest_line_analyser.rs18 symbols
src/tty/tline.rs16 symbols
src/jobs/job.rs16 symbols
src/sound/volume.rs15 symbols
src/result/report.rs15 symbols
src/context.rs15 symbols
src/conf/action.rs15 symbols
src/jobs/concrete_job_ref.rs14 symbols
src/tty/tline_builder.rs13 symbols

For agents

$ claude mcp add bacon \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page