13 releases (4 breaking)
Uses new Rust 2024
new 0.8.0 | Apr 22, 2025 |
---|---|
0.7.0 | Apr 22, 2025 |
0.6.0 | Apr 21, 2025 |
0.5.8 | Apr 21, 2025 |
0.4.0 | Apr 21, 2025 |
#763 in Text processing
511 downloads per month
265KB
3K
SLoC
Cali
Cali is a terminal-based calculator that interprets natural language for real-time calculations, including arithmetic, currency conversions, unit conversions, and date/time operations.
Installation
Option 1: Install with Homebrew
brew tap borhansaflo/cali
brew install cali
Option 2: Install with Cargo
cargo install cali
Option 3: Download Pre-compiled Binaries
Download the latest release for your platform from the releases page
Option 4: Building from Source
-
Clone the repository:
git clone https://github.com/BorhanSaflo/cali.git cd cali
-
Build with Cargo:
cargo build --release
-
The compiled binary will be available at
target/release/cali
Installing the Binary
cargo install --path .
Usage
Basic Operations
Start Cali by running:
./target/release/cali
# Or if installed with cargo install
cali
Type expressions and see results instantly:
10 + 5 # 15
20 * 3 # 60
100 / 4 # 25
Variables
Assign values to variables and use them in calculations:
price = 10 USD
tax = 7%
total = price + price * tax # $10.70
Unit Conversions
Convert between various units:
5 km in miles # 3.10686 mi
10 USD in EUR # €8.50
350 ml in cups # 1.47981 cup
Date Calculations
Perform date-related calculations:
next friday # 2025-04-18
next monday + 2 weeks # 2025-05-05
Percentages
Calculate percentages:
20% of 50 # 10
price - 15% # $8.50
Keyboard Shortcuts
Enter
: Add a new lineUp/Down
: Navigate through linesLeft/Right
: Move cursor horizontallyHome/End
: Move to start/end of lineBackspace/Delete
: Delete charactersCtrl+q
: Quit the applicationCtrl+s
: Save the current file
License
Dependencies
~12–29MB
~472K SLoC