BWISH(1)
π bwish(1) β the BRL-CAD Tcl/Tk windowing shell π
okay so welcome to bwish, bestie β the manual page for it, anyway. This is section 1 of the BRL-CAD manual, and honestly? She's kind of the main character of BRL-CAD's graphical scripting world, iykyk. Let's get into it π
β¨ NAME β¨
bwish β BRL-CAD's Tcl/Tk windowing shell. that's it, that's the vibe π
πΈ SYNOPSIS πΈ
bwish [script [arg ...]]
Both script and arg are optional β the brackets said so, not me π«Ά
π¦ DESCRIPTION π¦
So bwish is a Tcl/Tk windowing shell, right? Think of it as the standard Tk wish(1) interpreter's cooler sibling β same energy, except this one comes preloaded with BRL-CAD's Tcl/Tk extensions: libtclcad, Itcl/Itk, and the associated BRL-CAD libraries. She's basically born ready β¨
She's also the graphical counterpart to btclsh(1), and she provides the scripting + GUI foundation that BRL-CAD tools like mged(1) and archer(1) are built on top of. So yeah, iconic behavior π
here's how the arguments work:
- If the first argument does not begin with a
-,bwishtakes it as the name of a Tcl/Tk script to evaluate. She runs that script, then enters the event loop. πββοΈ - Any remaining
argvalues get handed to the script through the Tcl global variablesargvandargc, andargv0is set to the script name. very generous of her π
And if no script is given (or the first argument begins with a -), she just runs interactively:
- she reads commands from standard input, with emacs-style command-line editing and history β so like Ctrl+A, Ctrl+E, Ctrl+K, Ctrl+W, plus the arrow keys for history and cursor movement. your fingers already know these π
- on startup she evaluates the resource file
~/.bwishrc(or~/.bwishrc.tclon Windows) if it exists. cute little startup ritual πΈ
π important vibe check:bwishdoes not interpret any command-line options of its own. every flag is left for the executed script to handle viaargv. so don't come for her about options, she literally has none, periodt.
π₯ EXAMPLES π₯
Example 1. Run a Tk script with arguments
bwish make_dialog.tcl 800x600 model.g
This evaluates the Tcl/Tk script make_dialog.tcl with the BRL-CAD extensions already loaded, passing 800x600 and model.g to the script as argv. And because libtclcad is initialized, the script can open and query BRL-CAD geometry databases directly. no cap, straight to the geometry ππ
Example 2. Interactive geometry scripting
bwish
bwish> package require Tk
bwish> set db [go_open db file model.g]
bwish> button .quit -text Quit -command exit; pack .quit
Starts an interactive session, builds a little Tk control, and works with a BRL-CAD database through the bundled commands β all without writing a separate script file. the way that she just... does it all in the prompt π§β¨
π SEE ALSO π
brlcad(1), btclsh(1), mged(1), archer(1)
go read those too, bestie, they're all part of the family π«Ά
β AUTHOR β
BRL-CAD Team π
π COPYRIGHT π
This software is Copyright (c) 1989-2026 by the United States Government as represented by U.S. Army Research Laboratory.
(yes, the dates are literally 1989-2026, copy them exactly, don't @ me π)
π BUG REPORTS π
Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org
like, please actually tell them, she wants to be her best self ππ
and that's the page, bestie!! π
β¨ this whole thing comes to you from the BRL-CAD crew β the BWISH(1) page in the BRL-CAD manual set β mwah, go script something iconic ππ¦π
π¦ where this page comes from
- nixpkgs unstable: brlcad 7.44.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms