ALU-CLI
Agent Logic Unit — a lightweight CLI tool for high-speed, deterministic math evaluation. Built so AI agents (Claude, Codex, and others) can offload arithmetic to a reliable evaluator instead of hallucinating results.
Why
LLMs are unreliable at precise arithmetic. ALU-CLI is designed to be invoked as a skill by AI agents — giving them a trustworthy math co-processor for real computations.
Install
# Add to PATH
Then register it as an agent skill:
This installs SKILL.md into ~/.claude/skills/alu/, ~/.codex/skills/alu/, and ~/.agents/skills/alu/, and adds Bash(alu *) to the agent permission allowlists in their respective settings.json files.
Usage
Evaluate an expression
Examples:
# 6471.111111111111
# 24.707106781186546
# 1024
# 53
# 2.302585092994046
# -0.00000000000000011102230246251565
Supported operations (Non Exhaustive List)
| Category | Functions / Operators |
|---|---|
| Arithmetic | +, -, *, /, ^ |
| Trigonometry | sin, cos, tan, asin, acos, atan |
| Exponential | exp, ln, sqrt |
| Rounding | ceil, floor, abs |
| Constants | pi, e |
Agent Integration
After running alu init, agents can discover and invoke ALU as a skill. Claude, for example, will find the skill definition at ~/.claude/skills/alu/SKILL.md and use alu eval for any arithmetic it would otherwise compute inline.
The init command also patches settings.json to pre-authorize Bash(alu *), so agents don't need to prompt for approval on each invocation.
Requirements
- Rust 1.94+
License
Apache 2.0