Usage

The browser-based version of Numbat is available at https://numbat.dev/.

Interactive terminal

The terminal allows you to perform a sequence of calculations. You can use the arrow keys to browse through the command history. The special identifiers ans and _ refer to the result of the last calculation. For example:

>>> 60 kW h / 150 kW

    = 0.4 h

>>> ans -> minutes

    = 24 min

Commands

There is a set of special commands that only work in the web version:

CommandAction
listList all functions, dimensions, variables and units
list <what>Where <what> can be functions, dimensions, variables, units
info <identifier>Get more information about units, variables, and functions
clearClear screen
help, ?View short help text
resetReset state (clear constants, functions, units, …)

Key bindings

In interactive command-line mode, you can use the following key bindings. Most importantly, Tab for auto-completion, arrow keys and Ctrl-R for browsing the command history, and Ctrl-D for exiting the interactive session.

Key sequenceAction
TabAuto-completion
Ctrl-LClear screen
Up, DownBrowse command history
Ctrl-RSearch command history
Ctrl-CClear the current line
Shift-EnterInsert newline
Home, Ctrl-AMove cursor to the beginning of the line
End, Ctrl-EMove cursor to the end of the line
Ctrl-Left, Ctrl-RightMove cursor one word left/right
Ctrl-KRemove text to the right of the cursor
Ctrl-URemove text to the left of the cursor

Sharing calculations

To share the result of a calculation with someone else, you can just copy the URL from your browers address bar. As you enter new lines in the terminal, your input will be appended to the URL to build up something like https://numbat.dev/?q=let+P0+%3D+50_000+people%0A… that you can just copy and share. To reset the state and clear the URL, use the reset command (see above).