npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@talocode/calclane

v0.3.1

Published

Open-source calculator engine + SDK for agents — Standard/Scientific, CLI, MCP, hosted Talocode API

Readme

CalcLane

Open-source Standard and Scientific calculator — browser app, engine SDK, CLI, MCP, and hosted API for agents.

CalcLane is a Talocode product: self-hostable, local-first, and built for real use.

| Surface | Install / URL | |---------|----------------| | Browser | Open index.html or npm start | | npm | npm i @talocode/calclane | | CLI | npx @talocode/calclane eval "2+3*4" | | MCP | npx @talocode/calclane mcp | | PyPI | pip install talocode-calclane | | Hosted API | https://api.talocode.site/v1/calclane/* | | Auth | Authorization: Bearer $TALOCODE_API_KEY |

v0.3 — Engine SDK + CLI + MCP + Python client + hosted evaluate/dispatch (1 credit each).


Principles (Talocode)

  • Open-source first — MIT, run it yourself
  • Local free, cloud metered — offline eval costs nothing; hosted API uses wallet credits
  • Agents first — JSON in/out, MCP tools, same contract on npm and PyPI

Quick start

Browser UI

cd calclane
npm start          # http://localhost:4173
npm run test:engine

Node SDK (local, free)

npm i @talocode/calclane
import { evaluateExpression, createCalcLaneClient } from '@talocode/calclane'

console.log(evaluateExpression('2 + 3 * 4'))
// { ok: true, result: 14, display: '14', mode: 'scientific', ... }

const client = createCalcLaneClient()
console.log(client.evaluateLocal('sin(90)', { angle: 'deg' }))

CLI

npx @talocode/calclane eval "2^10"
npx @talocode/calclane eval "sin(90)" --angle deg
npx @talocode/calclane pricing
npx @talocode/calclane mcp          # stdio MCP server

Hosted API (credits)

export TALOCODE_API_KEY=your_key
export TALOCODE_BASE_URL=https://api.talocode.site   # default

# 1 credit
curl -sS -X POST "$TALOCODE_BASE_URL/v1/calclane/evaluate" \
  -H "Authorization: Bearer $TALOCODE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"expression":"2+3*4","mode":"scientific"}'
import { createCalcLaneClient } from '@talocode/calclane'

const cloud = createCalcLaneClient({ preferLocal: false })
const r = await cloud.evaluate('sqrt(144)')  // uses API when key set + preferLocal false
// or always:
await cloud.evaluateRemote('2^10')

Python

pip install talocode-calclane
from calclane import CalcLaneClient

client = CalcLaneClient()  # local free by default
print(client.evaluate("2 + 3 * 4"))

# Hosted (1 credit)
client = CalcLaneClient(prefer_local=False)  # needs TALOCODE_API_KEY
print(client.evaluate("sin(90)", angle="deg", remote=True))
calclane eval "5!"
calclane eval "2+3*4" --remote

Hosted API

Base: https://api.talocode.site

Auth (required for all /v1/calclane/* routes):

  • Authorization: Bearer $TALOCODE_API_KEY
  • or X-Api-Key: $TALOCODE_API_KEY

| Method | Path | Credits | Description | |--------|------|---------|-------------| | GET | /v1/calclane/health | free* | Service health | | GET | /v1/calclane/pricing | free* | Credit table | | GET | /v1/calclane/capabilities | free* | Modes & endpoints | | POST | /v1/calclane/evaluate | 1 | Evaluate expression | | POST | /v1/calclane/dispatch | 1 | Run engine commands |

*Still requires a valid API key; no credit charge.

POST /v1/calclane/evaluate

{
  "expression": "2 + 3 * 4",
  "mode": "scientific",
  "angle": "deg"
}

Response:

{
  "ok": true,
  "expression": "2 + 3 * 4",
  "result": 14,
  "display": "14",
  "mode": "scientific",
  "angle": "deg",
  "engine": "calclane",
  "version": "0.3.0",
  "usage": { "credits": 1, "action": "calclane.evaluate", "remaining": 99 }
}

Modes

| Mode | 2 + 3 * 4 | |------|-------------| | scientific (default) | 14 (precedence) | | standard | 20 (left-to-right) |

Functions: sin cos tan asin acos atan log ln sqrt cbrt abs floor ceil round exp fact, constants pi e, operators + - * / % ^ ** !, parentheses.


Architecture

lib/           # TypeScript package (engine, evaluate, client, CLI, MCP)
src/engine/    # Browser pure-JS engine (web UI)
src/ui/        # Browser UI
python/        # talocode-calclane PyPI package

| Layer | Role | |-------|------| | Engine | Commands in → state out (CalcEngine) | | Evaluate | Expression string → result (agents) | | Client | Local or api.talocode.site | | Hosted | Stacklane /v1/calclane/* + wallet credits |


MCP tools

| Tool | Description | |------|-------------| | calclane_evaluate | Evaluate expression (local or remote: true) | | calclane_dispatch | Engine command stream | | calclane_health | Health | | calclane_pricing | Credits | | calclane_capabilities | Feature list |

Stacklane Cloud MCP also exposes the same tools against the hosted routes.


Tests

npm run build
npm run test:pkg      # package evaluate/engine tests
npm run test:engine   # browser engine tests

Talocode ecosystem

| Project | What it is | |---------|------------| | Codra | Local-first agentic coding | | Tera | AI learning companion | | Stacklane | Cloud control plane | | SearchLane | Agent web search | | DocuLane | Office document CLI | | WorkLane | Workflow engine | | InvoiceLane | Invoice / receipt intelligence | | CalcLane (this repo) | Open calculator |

More: github.com/talocode · talocode.site · docs.talocode.site


Roadmap

  • Programmer mode (hex / bin / bit ops)
  • Unit converter
  • Session-based remote calculator state

License

MIT © Talocode

Support

Sponsor: https://github.com/sponsors/Abdulmuiz44