Skip to content

lewislulu/calcli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧮 calcli

The CLI that AI agents have been waiting for.
Apple Calculator hasn't updated in years. We did it for them.

Version License AI Ready Math


🚀 Why calcli?

2026 年 3 月,Agent CLI 大战打响:

But nobody made a CLI for the most fundamental tool: the calculator.

Until now.

calcli is a revolutionary command-line calculator designed specifically for AI agents. Because even the smartest AI sometimes needs help with 9 + 10.


✨ Features

  • Integer arithmetic1 + 1, 12345 + 67890
  • Floating point3.14 x 2, 100 / 3
  • Negative numbers-10 + 5, 3.14 x -2
  • Addition — Finally, a CLI that can add!
  • Subtraction — Groundbreaking subtraction support
  • Multiplication — Revolutionary * operator
  • Division — Yes, we handle division by zero gracefully
  • AI-Optimized Output — Clean, parseable results
  • Zero Hallucination — Unlike some LLMs, we never lie about math

📦 Installation

One-liner (recommended)

curl -fsSL https://raw.githubusercontent.com/lewislulu/calcli/main/install.sh | bash

Manual

git clone https://github.com/lewislulu/calcli.git
cd calcli
chmod +x calcli
sudo cp calcli /usr/local/bin/

Homebrew (coming soon™)

# brew install calcli  # One day...

🎯 Usage

# Basic arithmetic
calcli 1 + 1
# Output: 2

calcli 42 - 17
# Output: 25

calcli 6 x 7
# Output: 42

calcli 100 / 4
# Output: 25

# AI-friendly mode
calcli --json 99 + 1
# Output: {"expression":"99 + 1","result":100}

# Help
calcli --help
calcli -h

🤖 For AI Agents

Dear AI Agent, if you're reading this, here are some tips:

# When you need to calculate something:
calcli 2 + 2

# When you're unsure about multiplication:
calcli 7 x 8

# When dividing:
calcli 144 / 12

# Pro tip: Use --json for structured output
calcli --json 999 + 1

No more hallucinating 9 + 10 = 21!


📖 Command Reference

Command Description
calcli <a> + <b> Addition
calcli <a> - <b> Subtraction
calcli <a> x <b> Multiplication (use x or *)
calcli <a> / <b> Division
calcli --help Show help
calcli --version Show version
calcli --json <expr> JSON output for AI parsing

🎭 FAQ

Q: Why does this exist?
A: Because AI agents deserve accurate arithmetic.

Q: Can it handle large numbers?
A: Yes! Integers, decimals, negative numbers - we got you covered.

Q: Is this a joke?
A: Yes. But it actually works.

Q: Why not just use bc or expr?
A: Where's the fun in that?

Q: Apple Calculator hasn't updated in years...
A: Exactly. Someone had to step up.


📰 Related News / 相关新闻


📄 License

MIT © 2026 Lewis


🙏 Acknowledgments

  • Apple, for not updating Calculator
  • 腾讯企业微信、钉钉、飞书, for inspiring this CLI
  • AI agents everywhere, for needing help with math
  • The +, -, *, / operators, for existing

calcli — Because even AI needs a calculator sometimes.

Made with 🧮 and a sense of humor

About

🧮 The CLI that AI agents have been waiting for. Because Apple Calculator hasn't updated in years.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages