# Repository Briefing: qybaihe/bla
> Source: https://repoforai.com/repo/qybaihe/bla (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/qybaihe/bla
- **Official Docs / Website**: https://bla.tools
- **Category**: Coding, Skills & MCP (AI 编程 / Skills / MCP)
- **Primary Language**: TypeScript
- **License**: MIT
- **Engineering Health**: A+ (95/100 · Maintenance 35/35 · Adoption 20/25 · Releases 20/20 · License 20/20)
- **Latest Release**: bla-agents-3.7.0 (2026-11-29) — https://github.com/qybaihe/bla/releases
- **Review Snapshot**: 2026-12-02
- **Deployment / Stack Signals**: MCP, CLI, Local AI
- **Momentum**: 7,780 ★ total (+248 24h / +700 7d) · 961 forks
- **Topics**: `adversarial-ai`, `ai-security`, `android-security`, `binary-protection`, `claude-code`, `codex`, `cursor`, `electron-security`, `gguf`, `ghidra`, `llm-security`, `mcp`
- **When to Use**: Best for: Teams shipping proprietary client-side logic across multiple artifact types that can stage, regression-test, and roll back hardened releases. Skip if: You need client-side secrecy, cannot test the promoted build, or cannot tolerate meaningful changes to package size or startup behavior.

## Overview
```text
### Architecture & Core Mechanics
BLA is a TypeScript application with two local interfaces: a standalone CLI and an MCP server for coding agents. The `bla-agents` package exposes `bla`, `bla-agents`, and `bla-shield`. Its four declared runtime dependencies are `@babel/parser`, `@babel/traverse`, `@babel/types`, and `@babel/generator`, which support AST inspection and rewriting on the JavaScript side. The CLI can harden built artifacts without a model in the transformation loop.

The workflow separates audit and planning, optional agent-assisted source changes, format-specific artifact hardening, and structural verification. Seeded transforms adapt to each format, rather than applying a generic text rewrite to every input. Optional self-sealing and sibling-artifact integrity checks extend protection across covered files, but coverage is not universal. `bla_verify` checks hardened structure; it is not a behavioral test or a proof of secrecy.

### Key Capabilities & Differentiators
BLA exposes 31 MCP tools across a 26-format catalog that includes JS/TS, Electron ASAR, WASM, Python, native binaries, SQLite, GGUF, Safetensors, and Android DEX. GGUF and Safetensors are files to harden, not inference backends. The Vite integration processes JavaScript chunks and source maps; non-JavaScript artifacts use the post-build workflow. Hardening reports give release owners concrete checks: failed and excluded artifacts, output size, plaintext survivors, and integrity coverage.

The 3.7.0 showcase passed all 16 bundled execution, query, or structural checks; some were structural only. Its 1,293.6× token and 600.3× cost multipliers are internal projections, not metered usage. A separate 3.6.0 study measured 1.86×–3.58× baseline-adjusted median input tokens on four gate-passing fixtures, yet reconstruction passed all 12 functional checks in each of the 15 hardened runs. Live probes on 14 fixtures against REA commit `05be423` showed mixed outcomes, including default limits that callers could raise.

### Trade-offs & Limitations
BLA is most compelling when a proprietary release has several artifact types and needs one review and promotion workflow. For a JS-only release, a conventional obfuscator offers a narrower integration and less compatibility surface to test. Neither is a substitute for keeping secrets and authorization decisions on a server, and artifact hardening does not replace code signing.

Budget for larger outputs and possible build or startup regressions, especially because the documented default profile is `bankrupt`. Test expected behavior, package size, startup, and rollback on the same artifacts you intend to ship. The evidence supports increased analysis effort on tested configurations, not durable secrecy: unkeyed re-sealing remained possible in the maintainer-run evaluation, and native debugger or decompiler coverage was not established by the live fixture probes. Standalone DEX support also does not amount to a full APK pipeline; APK re-signing is unsupported.

### Hardware & Deployment Guide
Run BLA where the build outputs are produced or staged. The package requires Node.js `^22.23.4 || >=24.0.0`; no GPU, model weights, or hosted inference service is required for the standalone CLI. Build first, run `harden . --dry-run` to inspect discovery, then run `harden .` to create a partial mirror in `.bla-hardened/`. Use `--apply` only after reviewing the results: it overwrites recognized build outputs, not source files. Originals are kept outside the project, and `--restore` provides a rollback path. Test the promoted build before distribution.

For a coding-agent integration, `setup` registers BLA and `doctor --verify-handshake` checks connectivity. Pin the package version in CI and test upgrades against real artifacts. Release 3.6.1 began rejecting unknown client IDs and reporting unreadable JSON as a parse error. Release 3.7.0 moved registered-output hashing to chunked reads and strips carriage returns from artifact-derived terminal text.
```

## Key Capabilities
```text
- Runtime: TypeScript on Node.js, with four Babel dependencies for parsing, traversing, and generating JavaScript ASTs.
- Tool surfaces: 31 MCP tools and three CLI entry points: `bla`, `bla-agents`, and `bla-shield`.
- Format coverage: 26 artifact formats, spanning JavaScript, Electron ASAR, WASM, native binaries, SQLite, and model files.
- Release safety: Write-free discovery, a partial mirror in `.bla-hardened/`, and explicit promotion and restore operations.
- Measured evidence: One shell-agent study recorded 1.86×–3.58× median input-token use on four gate-passing fixtures, without preventing reconstruction.
- Verification scope: Structural checks, integrity coverage, and fixture checks inform release review but do not replace application tests.
```

## Quick Start / Clone
```bash
npx -y bla-agents@3.7.0 harden . --dry-run
```
