Cali CLI

A terminal calculator with real-time evaluation, currency conversion, and unit conversion.

Installation

Install Cali CLI globally using npm:

npm install -g cali-cli

Or run directly with npx without installing:

npx cali-cli

Usage

Interactive REPL (default)

Simply run cali to open the interactive editor with real-time calculation results, running totals, and syntax highlighting.

cali

Evaluate expressions

Pass expressions directly as arguments for quick calculations:

cali "100 + 50 * 2"
cali "100 USD in EUR"
cali "5 km in miles"

Process files

Open and process .cal files:

cali expenses.cal
cali -i expenses.cal  # Open in interactive mode

Pipe input

Pipe calculations from other commands:

echo "100 + 200" | cali
cat budget.cal | cali

Keyboard Shortcuts

ShortcutAction
Ctrl+SSave file
Ctrl+PShare (copy cali.run link)
Ctrl+LClear editor
Ctrl+CQuit
Ctrl+WDelete word
Ctrl+UDelete to start of line
Option+←/→Move by word

Features

  • Real-time evaluation - See results as you type
  • Currency conversion - 100 USD in EUR
  • Unit conversion - 5 km in miles, 20 C in F
  • Percentages - 100 + 10%, 25% of 200
  • Labels - rent: 1500
  • Comments - // this is a comment
  • Totals - total or total in USD

Examples

Monthly budget calculation:

// Monthly budget
rent: 1500 USD
groceries: 400
utilities: 150

total

Trip distance conversion:

// Trip distance
Paris to London: 450 km
London to Edinburgh: 650 km

total in miles

Requirements

Node.js 18 or higher is required to run Cali CLI.