CragCLI

1 min read Original article ↗

CragCLI: Command Line Calculator

with AI and dimensional analysis

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:

  • Linux => curl https://rakubrew.org/install-on-perl.sh | sh

  • macOS => curl https://rakubrew.org/install-on-macos.sh | sh

  • Windows => download https://rakubrew.org/install-on-cmd.bat and then execute that script in a CMD terminal

Then:

  • rakubrew download
  • rakubrew switch

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

Step 2

Install and run App::Crag:

  • zef install App::Crag --/test
  • crag '0.1+0.2' one-liner
  • crag interactive REPL

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.