BWISH(1)

πŸ“¦
version 7.44.0 Β· 2 versions
, in nixpkgs unstable

πŸ’… 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 -, bwish takes it as the name of a Tcl/Tk script to evaluate. She runs that script, then enters the event loop. πŸƒβ€β™€οΈ
  • Any remaining arg values get handed to the script through the Tcl global variables argv and argc, and argv0 is 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.tcl on Windows) if it exists. cute little startup ritual 🌸
πŸ’€ important vibe check: bwish does not interpret any command-line options of its own. every flag is left for the executed script to handle via argv. 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 πŸ’–


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