Crates.io | brain-assistant |
lib.rs | brain-assistant |
version | 0.1.2 |
source | src |
created_at | 2023-06-01 17:56:43.539377 |
updated_at | 2023-06-07 19:35:05.731604 |
description | Mathematics tool and encyclopedia for the terminal |
homepage | https://github.com/spelbryggeriet/brain-assistant |
repository | https://github.com/spelbryggeriet/brain-assistant |
max_upload_size | |
id | 879990 |
size | 104,267 |
Brain Assistant is a CLI tool intended for computing mathematical expressions and being an encyclopedia for mathematical concepts.
Install using cargo:
cargo install brain-assistant
Pass an expression to the brain
command to parse and reduce an expression:
$ brain 1+2+3
6
$ brain 1*2*3
6
$ brain (1+2)*3
9
Invoke the brain
command without any arguments to start the graphical user
interface, with a REPL pane and an extra information pane. Exit the REPL by
pressing Ctrl-C
or Esc
.
If you are using zsh, parenthesises and multiplication might collide with the
glob pattern match settings. To prevent this, you can either quote the input
(e.g. brain "(1+2)*3"
), or prefix the command with noglob
(e.g
noglob brain (1+2)*3
). Even better, you can create an alias that always
disables glob pattern matching for brain
and save it in your zsh profile:
echo "alias brain='noglob brain'" >> ~/.zshrc