Skip to main content

Infrastructure layer for AI coding agents — evaluate, sync, and deploy agent configs across tools.

Project description

BinaryByte

CI PyPI Python License: MIT

BinaryByte is CI/CD for AI coding agents: evaluate agent-proposed diffs, version shared agent state, and deploy verified rules to multiple targets (Cursor, Gemini CLI, Claude Code, Windsurf, Copilot, plus plugins).

Current version: 0.3.0


Why BinaryByte

When you switch between editors and agents, rules and context drift. It’s also easy to merge risky diffs.

BinaryByte gives you:

  • Eval — run checks on a patch file or a git diff range; write a verdict + a state snapshot per version label.
  • State — keep one canonical state.yaml (memory + conventions) that can be deployed everywhere.
  • Deploy (gated) — render that state into each tool’s native file format only if the chosen version’s verdict passed.

Quickstart (60 seconds)

pip install binarybyte
binarybyte init .
binarybyte state add --key "stack" --value "Python 3.11, pytest"
binarybyte eval run --git-range HEAD~1..HEAD --version demo-1
binarybyte deploy run --version demo-1

Install

pip install binarybyte
binarybyte --version

Optional extras:

  • pip install "binarybyte[sandbox]" (Docker-based sandbox eval)
  • pip install "binarybyte[all]"

From source (development):

git clone https://github.com/Aryannovice/BinaryByte.git
cd BinaryByte
pip install -e ".[dev]"
pytest
ruff check .

Sandbox evaluation uses the Docker CLI when enabled in config.


CLI commands (quick reference)

Global help:

binarybyte --help
binarybyte state --help
binarybyte eval --help
binarybyte deploy --help

Setup:

  • Create .binarybyte/: binarybyte init (or binarybyte init path/to/project)

State:

  • Add memory: binarybyte state add --key K --value "V" [--source manual]
  • List entries: binarybyte state list
  • List snapshots: binarybyte state snapshots
  • Compare snapshots: binarybyte state diff --from v1 --to v2
  • Restore state from snapshot: binarybyte state rollback --version v1 (or --version last-passed)

Eval:

  • Evaluate a patch file: binarybyte eval run --diff changes.patch [--version v1]
  • Evaluate a git range: binarybyte eval run --git-range HEAD~1..HEAD [--version v1]

Deploy:

  • Deploy current state (defaults to latest verdict): binarybyte deploy run [--version latest|v1]
  • Deploy from a previous snapshot: binarybyte deploy rollback --version v1 (or --version last-passed)
  • Show deploy history: binarybyte deploy history
  • List available targets (built-ins + plugins): binarybyte deploy targets

Use in CI

BinaryByte is CI-friendly: binarybyte eval run exits non-zero when the verdict fails, so it can gate merges/releases.

Example:

binarybyte init .
binarybyte eval run --git-range "$BASE_SHA...$HEAD_SHA" --version "pr-123"

What gets written on disk

After init, BinaryByte writes per project:

.binarybyte/
  config.yaml
  state.yaml
  results/<version>/verdict.json
  results/<version>/state_snapshot.yaml
  deploy_log.json
  plugins/*.py
  checks/*.py

Deploy targets

Built-in deploy targets (when listed in agents.targets in .binarybyte/config.yaml):

Target id Output
cursor .cursor/rules/binarybyte.mdc
gemini-cli GEMINI.md
claude-code CLAUDE.md
windsurf .windsurfrules
copilot .github/copilot-instructions.md

See the config template in examples/sample-config.yaml.


Built-in evaluation (summary)

  • Safety — denied command patterns + denied paths + optional secret scanning.
  • Imports — flags new third-party imports that don’t resolve.
  • Secrets — scans added lines for API-key-like patterns (configurable).
  • Plugins — add custom checks under .binarybyte/checks/.
  • Sandbox (optional) — run commands in a Docker container against a temp project copy with the patch applied.

Plugins

Deploy adapters:

  • Drop Python files into .binarybyte/plugins/ that subclass BaseAdapter.
  • See examples/plugin_example.py.

Eval checks:

  • Add Python files under .binarybyte/checks/ exposing check(diff_text, config) -> CheckResult.

Extending to new tools

Agent tools change frequently. BinaryByte is designed so new targets can be added without changing the core package.

The recommended approach is:

  1. Add a deploy adapter as a project-local plugin under .binarybyte/plugins/.
  2. Add its NAME to agents.targets in .binarybyte/config.yaml.

See examples/plugin_example.py for a working adapter template.

Requesting a new built-in target

If you want BinaryByte to support a new tool out of the box, open an issue with:

  • Tool name + website/docs link
  • Exact output file path(s) it expects
  • Required format (Markdown/YAML/JSON) and a minimal example
  • Any constraints (max size, headings, frontmatter, etc.)

We usually start by shipping it as a plugin adapter first, then promote it to a built-in target once it’s stable.


Releasing (maintainers)

  1. Bump the version in pyproject.toml.
  2. Tag and push vX.Y.Z.
  3. GitHub Actions builds, validates (twine check), and publishes to PyPI via OIDC (Trusted Publishing).

Contributing

Contributions are welcome—new adapters, new checks, docs, and examples.

  • Run pytest -q and ruff check . before opening a PR.
  • Keep PRs focused and add tests where practical.

See CONTRIBUTING.md for the full dev workflow.


License

MIT — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

binarybyte-0.3.2.tar.gz (30.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

binarybyte-0.3.2-py3-none-any.whl (33.4 kB view details)

Uploaded Python 3

File details

Details for the file binarybyte-0.3.2.tar.gz.

File metadata

  • Download URL: binarybyte-0.3.2.tar.gz
  • Upload date:
  • Size: 30.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for binarybyte-0.3.2.tar.gz
Algorithm Hash digest
SHA256 e42d05c43a79645f25ce2ad9575b5e31c93ee0058404158134669f132443ac68
MD5 8c7cf1954d9526e6155ded1b51cd7c92
BLAKE2b-256 45c56dec3b701dd262511b920bb26be4b95ab9a6422cb4a9db0d5ffeb3aa5b89

See more details on using hashes here.

Provenance

The following attestation bundles were made for binarybyte-0.3.2.tar.gz:

Publisher: ci.yml on Aryannovice/BinaryByte

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file binarybyte-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: binarybyte-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 33.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for binarybyte-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a02335abb7859e58d5b2f282a9a1b154ba27d8c1b95fd8ded139dc49000cef8c
MD5 b1967f6ea788eaec822f9773cd57ba86
BLAKE2b-256 8f04d54f3fd6c1e00544da5ac2b976067af50df532036e18fc65bdb29d753dea

See more details on using hashes here.

Provenance

The following attestation bundles were made for binarybyte-0.3.2-py3-none-any.whl:

Publisher: ci.yml on Aryannovice/BinaryByte

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page