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

calccu

v0.1.0

Published

A live CLI/TUI calculator with variables, functions, units, ans, and equation solving.

Downloads

145

Readme

calccu

calccu is a small interactive terminal calculator. It updates the result while you type, and pressing Enter commits the current expression so the result becomes available as ans. Committed inputs and results stay visible as a short on-screen history above the prompt. Calculator answers are shown with a leading <.

Install

From this directory:

npm install -g .

Then run:

calccu

For local development:

npm start
npm test

You can also run one expression without opening the TUI:

calccu "2 + 2"
echo "2x = 3" | calccu
calccu --help
calccu --version

Keys

  • Enter commits the current input.
  • Ctrl+C quits.
  • Ctrl+L clears the terminal.
  • Left and right arrows move the cursor.
  • Up and down arrows recall previous commands.
  • PageUp/PageDown scroll visible-session results.
  • Home/End or Ctrl+A/Ctrl+E move to the start/end.
  • Ctrl+U/Ctrl+K delete before/after the cursor.
  • Ctrl+W deletes the previous word.

Commands

help
?
clear
clear history
quit
exit
vars
funcs
ls vars
ls funcs
history
units
precision
precision 8
del name
delete name
del var name
del fn name

clear and Ctrl+L clear the visible calculator history. Command recall is saved between sessions in ~/.calccu_history.

Examples

2 + 3 * 4
2m + 30cm
5km to m
32F to C
1MiB to B
x = 12
2x + 1
f(x) = x^2 + 1
f(3)
2x = 3
3(x - 1) = 9
x/2 = 3
1/3x = 2
x^2 - 4 = 0

Supported Math

  • Operators: +, -, *, /, ^
  • Parentheses
  • Implicit multiplication, such as 2x and 3(x + 1)
  • Variables
  • User-defined functions
  • Fraction-style input through division, such as 1/3x = 2
  • Unit categories: temperature, length, weight, area, volume, energy, speed, time, and data
  • Unit conversion with to, such as 5km to m
  • Configurable displayed significant digits with precision 8
  • Built-in constants: pi, e
  • Built-in functions: abs, acos, asin, atan, ceil, cos, exp, floor, ln, log, max, min, round, sin, sqrt, tan

Equation solving supports exact single-variable linear equations and quadratic equations up to degree two. Linear solutions are kept exact where possible, such as 2x = 3 producing x = 3/2.

Supported units:

  • Temperature: C, F, K, degC, degF
  • Length: mm, cm, m, km, in, ft, yd, mi
  • Weight: mg, g, kg, t, oz, lb, st
  • Area: m2, cm2, km2, ft2, in2, acre, ha
  • Volume: m3, cm3, mm3, L, l, mL, ml, gal, qt, pt, cup, fl_oz
  • Energy: J, kJ, cal, kcal, Wh, kWh, BTU, btu
  • Speed: mps, kmh, mph, knot, fps
  • Time: ms, s, min, h, day, week
  • Data: bit, b, B, KB, MB, GB, TB, KiB, MiB, GiB, TiB