Show HN: BraKet - classify shell command effects in microseconds in TS or Rust g...

@show

Show HN: BraKet - classify shell command effects in microseconds in TS or Rust github.com · 2 points · 1 comments · HN thread

TL;DR BraKet is an open-source TypeScript and Rust library, with a CLI, that classifies what a Bash command would do (filesystem, network, process and other capabilities) by parsing it without executing it. It is meant for coding-agent permission systems, and the author reports classification in roughly 0.5 to 2 microseconds for a single command on a Ryzen 7 3800X.

  • Analyzes Bash commands statically, reporting capabilities such as filesystem, network, processes, execution, credentials and remote_resources, each rated use, read or mutate.
  • Covers 906 root commands and 8,194 command paths; unsupported syntax or unknown commands return unknown rather than a guess.
  • Benchmarks: single command takes 1.936 µs in TypeScript/Node.js and 0.550 µs in Rust; a long input of about 18,000 characters takes 126 µs and 13 µs respectively.
  • Results are also exposed as a bitmask (3 bits per capability), with -1 for unknown and 0 for no effects.
  • Built on a customized fork of Unbash after Tree-sitter and mvdan/sh were judged too slow or heavy; licensed Apache-2.0 with ISC attribution for Unbash.
  • Motivation is reducing permission prompt fatigue in the Dirac coding agent, replacing a static allowlist of safe commands.

Discussion The thread is essentially empty: the only comment is a one-line summary calling the project an ultra-fast shell command classifier for coding agents. There is no substantive debate, criticism or questions yet, so the mood is neutral and the submission has drawn little attention.

#shell #codingAgents #permissions #bashParser #rust #typescript