| name | bn |
| description | Inspect and edit an already-open Binary Ninja database through the local bn CLI, including decompilation, disassembly, callsites, types, verified mutations, and unrestricted in-process Python. |
bn
Use the live GUI database through bn. Start with bn target list; use bn doctor if bridge state is unclear. With multiple views open, pass the returned --target <selector> or set BN_TARGET. Omission works only with one view. --target active deliberately follows the GUI tab.
Read only what the task needs
bn function search player
bn function info player_update
bn decompile player_update
bn disasm player_update
bn disasm 0x401234 --count 20
bn disasm 0x401234 --end 0x401280
bn xrefs player_update
bn refs player_update
bn bundle function player_update projectile_update --include decompile,disasm --out /tmp/functions.json
function info is a compact summary; add --locals or use local list for full variable details. Bundles default to decompile, disassembly, and outbound references. --include all exports every section without duplicating HLIL. Multiple-function bundles retain successful reads alongside per-function errors and exit nonzero if any fail.
Linear disasm --count/--end works without a containing function and reports where decoding stops. --end is exclusive. For windows in an analyzed function use --before-instructions/--after-instructions. With --match, --before/--after always count text lines; without --match, disassembly also accepts them as legacy instruction-window aliases.