alu 0.2.2

Agent Logic Unit — deterministic math evaluation CLI for AI agents
alu-0.2.2 is not a library.

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.

Crates.io License CI

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.

Metric Agent + Python Agent + ALU-CLI
Startup Latency ~200–500ms < 5ms
User Friction Requires "Y/n" approval Zero-touch (pre-authorized)
Dependencies Python runtime + libraries Zero (standalone binary)
Determinism Potential syntax/env errors Deterministic every time

Install

Quickest — no installation required:

npx alu init

macOS (Homebrew):

brew install DakshBardoliwala/tap/alu
alu init

macOS / Linux (shell installer):

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/DakshBardoliwala/ALU-CLI/releases/latest/download/alu-installer.sh | sh
alu init

Windows (PowerShell):

powershell -ExecutionPolicy ByPass -c "irm https://github.com/DakshBardoliwala/ALU-CLI/releases/latest/download/alu-installer.ps1 | iex"
alu init

Rust developers:

cargo install alu
alu init

Agent Integration

Running alu init does two things automatically:

  1. Installs the skill — writes SKILL.md into .claude/skills/alu/, .codex/skills/alu/, and .agents/skills/alu/ so agents can discover ALU on startup
  2. Pre-authorizes the command — patches settings.json to add Bash(alu *) to the allow list, so agents invoke ALU without prompting you for approval on every call

By default, skills are installed globally into your home directory. To install into a specific project instead:

alu init ./my-project

The result: agents gain a zero-friction math co-processor with no manual configuration required.

Usage

Evaluate an expression

alu eval "<expression>"

Examples:

alu eval "(45.5 * 1024) / 7.2"
# 6471.111111111111

alu eval "sqrt(144) * 2 + sin(pi/4)"
# 24.707106781186546

alu eval "2^10"
# 1024

alu eval "abs(-42) + ceil(3.2) + floor(7.9)"
# 53

alu eval "ln(10)"
# 2.302585092994046

alu eval "cos(pi) + tan(pi/4)"
# -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

License

Apache 2.0