SlopCop
SlopCop checks a change through the yet to be deployed hosted SlopCop check API. The CLI ships the working-tree change to the service, the service applies it to the base commit and runs the hosted policy catalog plus any repository rules selected, and the CLI prints the report. There is no local analyzer: a check never needs a Bifrost install, and the CLI never decides on its own that there is nothing to check.
The command is built for agents and one-shot CI: no prompts, one request, and the analyzer's exit contract.
Install
make install
or:
go install github.com/BrokkAi/slopcop/cmd/slopcop@latest
Go 1.25 or newer is required to build.
On Windows, the PowerShell installer takes the latest release instead of building:
irm https://raw.githubusercontent.com/BrokkAi/slopcop/master/install.ps1 | iex
It verifies the release checksum, installs slopcop.exe to
%LOCALAPPDATA%\Programs\slopcop, and adds that directory to the user Path.
SLOPCOP_VERSION, SLOPCOP_INSTALL_DIR, and SLOPCOP_NO_MODIFY_PATH override
its defaults.
The npm package carries the release binary for macOS, Linux, and Windows on x64 and arm64, so it needs no Go toolchain:
npm install --global @brokkai/slopcop
npx @brokkai/slopcop --help
Node 22 or newer is required to run that package.
The PyPI package carries the release binary for those same targets as wheels, so it needs no Go toolchain either:
pip install brokk-slopcop
The package is brokk-slopcop because PyPI already has an unrelated project
named slopcop; the command it installs is still slopcop, and python -m brokk_slopcop runs the same binary.
Enable it in an agent
The binary carries the agent skill that teaches a coding agent how to run
slopcop. slopcop init installs it into each well-known skills directory whose
harness is present, and names what it did:
| Location | Harness |
|---|---|
~/.agents/skills/slopcop/ |
Codex, opencode |
~/.claude/skills/slopcop/ |
Claude Code, opencode |
$CODEX_HOME/skills/slopcop/, or ~/.codex/skills/slopcop/ |
Codex home |
A skill that is already there is left alone, so local edits survive and running
init again is safe. slopcop init --no-skill skips the install and any update
of it.
Sign in
slopcop login # browser device flow
slopcop login --token "$SLOPCOP_TOKEN" # existing credential, for CI and agents
The browser flow prints a URL and a code and stores the token once the login is
approved. The service URL defaults to https://slopcop.com; --service,
$SLOPCOP_SERVICE, or a stored value override it.
The credential lives in slopcop/config.json under the user config directory
and is written owner-only. slopcop logout clears it.
Precedence:
| Value | Order |
|---|---|
| Service URL | --service, $SLOPCOP_SERVICE, stored by slopcop login, https://slopcop.com |
| Token | $SLOPCOP_TOKEN, stored value |
Check
slopcop # check the change in the current checkout
slopcop check --format json # same, machine-readable
slopcop --root ../repo --base HEAD~1
The base commit defaults to the merge base with the branch upstream, then the
merge base with origin/HEAD, then HEAD. The service must already have the
base commit in its clone; a missing one comes back as the service's
base_not_found message and remedy.
Every run sends one check request, even when the working tree matches the base and the patch is empty. A clean result or a failure always comes from the service.
Flags:
| Flag | Meaning |
|---|---|
--root PATH |
repository to check (default .) |
--base REV |
base commit or revision for the change |
--format human|json|sarif |
report format (default human) |
--fail-on never|finding|note|warning|error |
exit-1 threshold (default finding) |
--policy PATH |
repository-relative .rqlp file to evaluate (repeatable) |
--no-policy-discovery |
skip .slopcop/policies rules |
--timeout DURATION |
one check request timeout (default 10m) |
--verbose |
print the resolved request to stderr |
What is sent
One git patch from the base commit to the working tree. An empty change is
sent as an empty patch, not filtered out. The patch carries committed but
unpushed work, unstaged edits, untracked files, deletions, renames, mode
changes, and binary content. Git-ignored files stay out, except selected
.slopcop/policies rules, which must travel because the service evaluates them
from the patched checkout.
The service owns the limits on what a check accepts. When a change is too
large or touches too many files, the service's payload_too_large response is
printed verbatim; the CLI does not impose its own limits.
Every check also runs the hosted catalog. Rules under
.slopcop/policies/**/*.rqlp are added automatically unless
--no-policy-discovery is set.
Output and exit codes
The service answers structured data; the CLI renders it. human prints one
block per finding, a summary line, and any omitted or incomplete checks. json
prints status, baseCommit, summary, findings, incomplete, and
failure when the analysis did not complete. sarif prints a SARIF 2.1.0
log.
| Exit | Meaning |
|---|---|
0 |
Check completed; nothing crossed the --fail-on level |
1 |
A finding crossed --fail-on |
2 |
The check was incomplete, or the CLI or service failed |
The service applies --fail-on and sets the status; the exit code follows it.
Service failures print the closed contract exactly: message, remedy, and any
install URL. The codes, messages, and remedies are defined by the service in
server/src/check.rs of BrokkAi/bifrost-service; the CLI does not
rewrite them. The remedies name no client, so when one says to sign in the CLI
adds the slopcop login command after it. A failed request prints no report
on stdout.
While SlopCop is still indexing the repository, the service answers
indexing_in_progress at once instead of running the check. The CLI prints it
and exits 2 without waiting or retrying.
API
The CLI calls POST <service>/v1/check with a bearer token:
{
"repoUrl": "https://github.com/owner/name",
"baseCommit": "0123456789abcdef0123456789abcdef01234567",
"change": "<base64 git patch>",
"selection": {"files": [".slopcop/policies/rule.rqlp"]},
"failOn": "finding"
}
The service rejects any other field. The response carries status,
baseCommit, applied, summary, findings, incomplete, and failure
when the analysis did not complete. Non-2xx responses carry code, message,
remedy, retryable, and an optional installUrl.
slopcop login uses the device flow: POST /api/device returns a
deviceCode, userCode, verificationUri, expiresIn, and interval, and
POST /api/token returns 202 while pending or 200 with a token once
approved. The polling codes are authorization_pending, slow_down,
expired_token, and access_denied.
Development
make test # go test ./...
make vet # go vet ./...
make build # bin/slopcop-<goos>-<goarch>
make cross-check # linux, darwin, and windows on amd64 and arm64
make npm-test # node --test npm/test
make wheels # pypi-dist/, one wheel per release target
Releases are tag-driven. Pushing a v*.*.* tag runs GoReleaser, which builds
linux, darwin, and windows for amd64 and arm64, packages tar.gz archives
(zip on Windows) with checksums.txt, and publishes the GitHub release.
.goreleaser.yaml is the single source of truth; CI runs goreleaser check
and a snapshot build on every change, and make release-check runs the same
locally when GoReleaser is installed. The same tag push then packs
@brokkai/slopcop from those release archives and publishes it to npm with
trusted publishing, so the package needs no npm
token.
The same tag also packs a wheel per release target from the binaries GoReleaser
just built, installs the wheel for every platform GitHub can run, and
publishes brokk-slopcop to PyPI with
trusted publishing, so that package needs no PyPI
token either.
Layout:
| Path | Purpose |
|---|---|
cmd/slopcop |
process entry point |
internal/cli |
cobra commands, selection, exit codes |
internal/gitx |
remote canonicalization, base resolution, patch building |
internal/service |
/v1/check client and the wire contract |
internal/report |
human, JSON, and SARIF rendering from the structured response |
internal/config |
stored service URL and token |
npm |
launcher, packer, and tests of the @brokkai/slopcop package |
packaging/pypi |
wheel packer and launcher of the brokk-slopcop package |
skills/slopcop |
the agent skill the binary embeds and installs |
docs/npm-publishing.md |
npm release flow and trusted publisher setup |
docs/pypi-publishing.md |
PyPI release flow and trusted publisher setup |
.goreleaser.yaml |
tag release build, archives, and checksums |
Metadata
Release files for brokk-slopcop 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
Total release size: 26.8 MB
Release files / brokk_slopcop-0.0.3-py3-none-win_arm64.whl
| Download URL | brokk_slopcop-0.0.3-py3-none-win_arm64.whl |
|---|---|
| Size | 3.2 MB |
| Tags | Python 3 Windows ARM64 |
|
SHA-256 checksum How to use checksums |
3575a6abf81c4a121cae7c7c660da9e2e3bd62b0e19615e7a25e33d250b26485
|
|
BLAKE2b-256 checksum How to use checksums |
8988530cc301eab69bfded0b780772a4d4fd523bf935750cd0eac61a94a8b9ca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 15, 2026.
Transparency logRelease files / brokk_slopcop-0.0.3-py3-none-win_amd64.whl
| Download URL | brokk_slopcop-0.0.3-py3-none-win_amd64.whl |
|---|---|
| Size | 3.6 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
b43c1f15ef67895bad12d68f6acf3a447fbf09fd2b35cca13deb13927b4fb56a
|
|
BLAKE2b-256 checksum How to use checksums |
6e7add1bfae8431413a083f2859c0c62b6eaee4f7358c03648bbb118ad368c68
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 15, 2026.
Transparency logRelease files / brokk_slopcop-0.0.3-py3-none-musllinux_1_2_x86_64.whl
| Download URL | brokk_slopcop-0.0.3-py3-none-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 3.5 MB |
| Tags | Linux musl 1.2+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
d91290c03a4434cde738680656c69d31f51aafc0038400c50111fc7688fc53c8
|
|
BLAKE2b-256 checksum How to use checksums |
13d47978db92675cff6b1b6ff5313bc7583cfd108192d1495855b066e85d1a8b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 15, 2026.
Transparency logRelease files / brokk_slopcop-0.0.3-py3-none-musllinux_1_2_aarch64.whl
| Download URL | brokk_slopcop-0.0.3-py3-none-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 3.1 MB |
| Tags | Linux musl 1.2+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
577ce6a69d76c68c900c7f00b6a1782eefd4bfa11744f16b1135052df60e0775
|
|
BLAKE2b-256 checksum How to use checksums |
fedde5584cf8e86d536f264415a9c5b84f094f4b74b6a0a73dc90ddfd9d706d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 15, 2026.
Transparency logRelease files / brokk_slopcop-0.0.3-py3-none-manylinux_2_17_x86_64.whl
| Download URL | brokk_slopcop-0.0.3-py3-none-manylinux_2_17_x86_64.whl |
|---|---|
| Size | 3.5 MB |
| Tags | Linux glibc 2.17+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
bad781fcab6242bf31088a835f33f29b8d691cd8ea988ed43a41204efae6b724
|
|
BLAKE2b-256 checksum How to use checksums |
02f1affc32e25bc87eb9af6776b8e0c6d1d271a257b3485fb6da31c3299f661e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 15, 2026.
Transparency logRelease files / brokk_slopcop-0.0.3-py3-none-manylinux_2_17_aarch64.whl
| Download URL | brokk_slopcop-0.0.3-py3-none-manylinux_2_17_aarch64.whl |
|---|---|
| Size | 3.1 MB |
| Tags | Linux glibc 2.17+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
d8bfe7c6900e72622f3a77f1a0eb4c5c43e42549634bbfd8f29e9e24b6371d96
|
|
BLAKE2b-256 checksum How to use checksums |
835ae3b94c038829862dcb6ab84e5ec5c49c006c9166f49cfeeaa9a90b475d57
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 15, 2026.
Transparency logRelease files / brokk_slopcop-0.0.3-py3-none-macosx_12_0_x86_64.whl
| Download URL | brokk_slopcop-0.0.3-py3-none-macosx_12_0_x86_64.whl |
|---|---|
| Size | 3.5 MB |
| Tags | Python 3 macOS 12.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
a03d42957852e73dcfb9b2d185361885994c0ef0c954fb0361fc4d11b946e167
|
|
BLAKE2b-256 checksum How to use checksums |
e4e852791f3188fda7c8bbbe34352a27fd0f4908225b4d41bd463614bc5e1a27
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 15, 2026.
Transparency logRelease files / brokk_slopcop-0.0.3-py3-none-macosx_12_0_arm64.whl
| Download URL | brokk_slopcop-0.0.3-py3-none-macosx_12_0_arm64.whl |
|---|---|
| Size | 3.3 MB |
| Tags | Python 3 macOS 12.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
d6dc2b8921f498e82c6084a898eb55b8637ec1f8b4bee417a96952f63e8a580e
|
|
BLAKE2b-256 checksum How to use checksums |
c0746e45d9dbab0ad5734d31e9ddcf770762b53b8793fad33a43bd7b412d3f20
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 15, 2026.
Transparency logSecurity for brokk-slopcop 0.0.3
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
All 8 files in this release have been uploaded with provenance metadata.
Attestation for brokk_slopcop-0.0.3-py3-none-win_arm64.whl
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 15, 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.