Get Started
DocsTrack 1quickstart
/llms.txt
Hands-on2 min readbrevio-core v0.11.1

Quickstart (uvx brevio-core, pip install, First Scan & Fix)

Plain-English Summary (For Anyone)

Install with one command and scan your first change

Run `uvx brevio-core@0.11.1 scan --diff` or `pip install brevio-core==0.11.1` and scan the lines your branch adds. No API key and no configuration are needed.

Why this matters:
Python 3.10 or newer is the only requirement, and the package has no runtime dependencies.
Feedback comes in your own terminal, with one line per finding and a fix hint.
A few rules have one correct rewrite, and `--fix` applies it for you.
When to use:When you want to try brevio-core on your current git repository.
Technical Contract (For Engineers)
Line-level rules
CLI Invocation Signature:
uvx brevio-core@0.11.1 scan --diff origin/main --surface
Latency / Execution
Not measured for 0.11.1
Token Cost
No model call. No API key.
Exit Codes
0 = nothing found; 1 = findings; 2 = usage error (for example a base the checkout does not have)
Artifacts & Files Generated:
.brevio/baseline.json (optional)
Visual Execution Pipeline
5-Stage Progressive Flow
01Python 3.10+
Install or run
uvx brevio-core@0.11.1 or pip install brevio-core==0.11.1
02Optional
Baseline
Record the findings that are already there with brevio-core baseline
03Exit 1 on findings
Scan
Run brevio-core scan --diff on the lines your branch adds
044 rules
Fix
Preview with --fix --dry-run, then write with --fix

Run Without Installing via `uvx`

In Plain English:If you have `uv` installed, you don't even need to install brevio-core. Just run it in any git repository.
`uvx brevio-core@0.11.1 <command>` runs the package from PyPI in a temporary environment. The package has one console script named like the package, so the short form works. The long form is `uvx --from brevio-core==0.11.1 brevio-core <command>`. `pipx run --spec brevio-core==0.11.1 brevio-core scan --diff` does the same with pipx.
Running via uvx
Fixed (After)Exit 0
uvx brevio-core@0.11.1 scan --diff origin/main --surface
Terminal Output:
$ uvx brevio-core@0.11.1 scan --diff origin/main
app.py:4: [R5.4] Bare `except:` detected; specify explicit exception tuple
brevio-core: 1 finding(s) in 1 file(s), 0 baselined, 0 silenced
Explain: brevio-core explain R5.4

Permanent Local Installation

In Plain English:Install the command with pip and pin the version.
`pip install brevio-core==0.11.1` installs the `brevio-core` command. A single-file `brevio-core.pyz` is also attached to each GitHub release, and you can verify it with `gh attestation verify brevio-core.pyz --repo Brevio-Ventures/brevio-core`. The package needs Python 3.10 or newer and no compiler toolchain.
Install with pip
Fixed (After)Exit 0
pip install brevio-core==0.11.1
brevio-core scan --diff

Scanning Added Lines vs the Whole Repo

In Plain English:With --diff, brevio-core reads only the lines you added in your branch, so old code does not drown the report.
`--diff [BASE]` scans only the lines added against BASE (default origin/main, else main, else HEAD). A BASE the checkout does not have exits 2. A scan of a whole folder (`brevio-core scan`) reads the old lines too, and a baseline (`brevio-core baseline`) holds the findings that are already there so that only new ones are reported.

Applying Deterministic In-Place Fixes (`--fix`)

In Plain English:Add --fix and brevio-core rewrites the lines where a rule has exactly one correct fix. Everything else is left for you.
A rule has a fixer only when it has one correct rewrite, applied by code and not by a model. In 0.11.1 four rules have one: R5.4 (a bare `except:` becomes `except Exception:`), R9.2 (`@ts-ignore` becomes `@ts-expect-error`), R10.1 (a single-line Python `requests` call gets `timeout=30`) and R18.2 (a `target="_blank"` link gets `rel="noopener noreferrer"`). Use `--dry-run` with `--fix` to print the fixes as a unified diff and write nothing.
Fixing a Bare except
Flagged (Before)Exit 1
def load(path):
    try:
        return open(path).read()
    except:
        return None
Fixed (After)Exit 0
def load(path):
    try:
        return open(path).read()
    except Exception:
        return None
Terminal Output:
brevio-core scan --diff main --fix --dry-run
--- a/app.py
+++ b/app.py
@@ -1,5 +1,5 @@
 def load(path):
     try:
         return open(path).read()
-    except:
+    except Exception:
         return None
brevio-core: 1 fix(es) in 1 file(s) would be made; nothing written

Interactive Rule Explorer

Explore the brevio-core rules and load their examples into the panel on the right.

129 / 129 rules