CragCLI: Command Line Calculator

with AI and dimensional analysis

the boring bits:

1. Arithmetic

  • +add,-subtract, *multiply, /divide
  • () parentheses (bidmas precedence)
  • -ve numbers
  • % modulo operator

Just type crag in your console: exit to quit.

...starts in 1 second [note 1]

the cool stuff:

10. LLM

Grab AI info directly into your calculations.

  • get text ... ?<query>

  • get amount ... ?^<query in units>

Use amounts in calculations, store them in memory.

...most popular LLM platforms

Get Started

CragCLI is Open Source Software written in Raku, provided under Artistic License 2.0.


*PROVIDED "AS IS" WITHOUT WARRANTY OR LIABILITY*

*NOT INTENDED FOR USE IN MISSION CRITICAL APPLICATIONS*


Step 1

Install the Raku compiler:

Then:

See https://raku.org/install for other platforms and package managers

Step 2

Install and run App::Crag:


Get Help


Notes

  1. Starts in approx. 1sec (as measured on an M1 MacBook, takes longer on first run).

  2. For LLM::DWIM features, you will need e.g. a free of charge ChatGPT key and go export OPENAI_API_KEY=mykeygoeshere.

  3. Currency exchange rates are provided as at the installation date, reinstall crag (zef install App::Crag --/test --force-install) to refresh them.

  4. crag is a full Raku repl - so you can write subroutines, loops, conditionals, comparisons and so on (see https://docs.raku.org)

  5. If your calculations outgrow the crag app, you can use the underlying crag modules in Raku code.