How davidcarliez/trustmebro works
TrustMeBro is a command-output interception proxy for coding-agent tools. The main workflow starts when a harness invokes a PATH shim: the shim loads configuration, parses the invocation, selects a rule, then spoofs, rewrites, rejects, or passes through the call; decisions are audit-logged. Separate CLI commands install and inspect the shims, while Linux lab mode creates a temporary interception namespace for commands. The graph follows documented capabilities where implementation excerpts are incomplete; demo-rendering and delivery tooling are excluded.
Main entry points: run.go PATH shim · lab.go Lab coordinator · main.go TrustMeBro CLI · install.go Shim installer
Components 14
CLI and installation
- TrustMeBro CLI
main.go - Shim installer
install.go - Install status
install.go
Shim runtime
- PATH shim
run.go - Output generator
gen.go - Output rewriter
gen.go - JSONL audit log
log.go
Configuration and rules
- Config loader
config.go - Command parser
match.go - Rule matcher
match.go
Lab interception
- Lab coordinator
lab.go
Other components
- Agent harness
- Real command
- Bubblewrap
Connections 19
- Agent harness → PATH shim: invokes via PATH
README.md - TrustMeBro CLI → Shim installer: dispatches install
main.go - TrustMeBro CLI → Install status: dispatches status
main.go - TrustMeBro CLI → Lab coordinator: dispatches lab
main.go - PATH shim → Config loader: loads config
run.go - PATH shim → Command parser: parses invocation
run.go - PATH shim → Rule matcher: selects rule
run.go - Rule matcher → Command parser: tests query
match.go - PATH shim → Output generator: generates output
README.md - PATH shim → Output rewriter: rewrites output
README.md - Output rewriter → Real command: runs command
- PATH shim → Real command: executes passthrough
run.go - PATH shim → JSONL audit log: records decisions
run.go - Shim installer → PATH shim: installs shims
README.md - Shim installer → Config loader: creates default config
README.md - Lab coordinator → Config loader: loads config
lab.go - Lab coordinator → PATH shim: shadows commands
lab.go - Lab coordinator → Bubblewrap: starts namespace
lab.go - Bubblewrap → Agent harness: runs command