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

@gabrielerandelli/minus-tracker

v0.13.1

Published

Italian capital-gains/loss calculator (LIFO/FIFO) with CLI and MCP server for AI agents — Regime Dichiarativo

Readme

minus-tracker

License: MIT npm version npm downloads Node MCP

⚠️ Ausilio al calcolo, non consulenza fiscale — vedi il Disclaimer. ⚠️ Calculation aid only, not tax advice — see the Disclaimer.

🤖 Novità: server MCP — qualsiasi agente AI può calcolare plusvalenze/minusvalenze italiane direttamente, senza passare dalla CLI. 🤖 New: MCP server — any AI agent can compute Italian capital gains/losses directly, no CLI required.

✅ Validato su tutti i 12 scenari FAQ dell'Agenzia delle Entrate · 628 test automatici · zero dipendenze runtime nella libreria core. ✅ Validated against all 12 Agenzia delle Entrate FAQ scenarios · 628 automated tests · zero runtime dependencies in the core library.

L'unico tool open-source che trasforma un export DEGIRO grezzo direttamente in plusvalenze/minusvalenze corrette secondo l'Agenzia delle Entrate — come CLI, libreria, o strumento MCP richiamabile dal tuo agente AI. The only open-source tool that turns a raw DEGIRO export directly into Agenzia-Entrate-correct capital gains/losses — as a CLI, a library, or an MCP tool your AI agent can call.


Italiano

minus-tracker è un progetto open-source sviluppato principalmente in TypeScript per il calcolo automatico di plusvalenze e minusvalenze in Regime Dichiarativo. Gestisce la sincronizzazione dei lotti tramite logica LIFO/FIFO e la normalizzazione multivaluta utilizzando i tassi storici della BCE.

Il tool elabora i dati partendo direttamente dal formato CSV esportato da DEGIRO.

Funzionalità

  • Calcolo di plusvalenze e minusvalenze con gestione dei lotti via LIFO o FIFO (configurabile)
  • Parser integrato per i file CSV di DEGIRO
  • Gestione multivaluta con tassi storici BCE (EUR, USD, GBP, CHF)
  • Classificazione fiscale degli strumenti finanziari in due categorie (Bucket A/B) — azioni, ETF, titoli di stato, derivati — con classificazione automatica tramite OpenFIGI e sidecar JSON persistente
  • Modello Redditi PF: genera Quadro RT (redditi diversi) e Quadro RM (redditi di capitale) a partire dai lotti calcolati, con riporto delle minusvalenze pregresse (regola dei 4 anni)
  • Suite di test allineata alle FAQ dell'Agenzia delle Entrate
  • Output disponibile in italiano (default) o inglese (--lang en)
  • Disponibile come pacchetto NPM con supporto CLI

📋 Cronologia completa delle versioni: CHANGELOG.md.

English

minus-tracker is an open-source project developed primarily in TypeScript for the automatic calculation of capital gains and losses in the Regime Dichiarativo — LIFO/FIFO lot matching, multi-currency normalisation with historical ECB rates.

It loads data following the CSV format used by DEGIRO.

What it does

  • Capital-gains/loss calculation with configurable LIFO and FIFO lot matching
  • DEGIRO CSV parser
  • Multi-currency handling with historical ECB rates (EUR, USD, GBP, CHF)
  • Two-bucket classification (Bucket A/B) of financial instruments — stocks, ETFs, government bonds, derivatives — with automatic OpenFIGI-backed classification and a persistent JSON sidecar
  • Modello Redditi PF generation: Quadro RT (capital gains) and Quadro RM (capital income) built from the calculated lots, with prior-year loss carryforward (4-year rule)
  • Test suite based on Agenzia Entrate FAQ
  • Output in Italian (default) or English (--lang en)
  • minus-tracker is an NPM package with CLI support

📋 Full version history: CHANGELOG.md.


Documentation

Le guide seguenti sono in inglese / The following guides are in English:

  • Quick Start — try it on the bundled sample file and see example output
  • CSV Formats — preparing a DEGIRO or Interactive Brokers (beta) export
  • CLI Usage — installing and running the minus-tracker command, including the built-in stress test
  • Library Usage — using minus-tracker as a TypeScript/JavaScript library
  • MCP Server — running minus-tracker-mcp for AI agents
  • FAQ / Troubleshooting — common errors and known limitations
  • Architecture — internal design reference for contributors

See also: CHANGELOG.md, CONTRIBUTING.md, SECURITY.md, agent/README.md (example MCP agent).


Disclaimer

Italiano: minus-tracker è un progetto personale sviluppato a titolo privato e non è in alcun modo affiliato, sponsorizzato o rappresentativo del datore di lavoro dell'autore o di qualsiasi altra organizzazione. Il tool è fornito esclusivamente come ausilio al calcolo e non costituisce consulenza fiscale, legale o finanziaria. L'autore declina ogni responsabilità per eventuali errori nei calcoli, per un utilizzo improprio dello strumento o per le decisioni prese dall'utente finale sulla base dei report generati. Si raccomanda sempre di verificare i risultati con un commercialista o professionista fiscale qualificato prima di presentare qualsiasi dichiarazione.

English: minus-tracker is a personal project developed in a private capacity and is not affiliated with, endorsed by, or representative of the author's employer or any other organisation. This tool is provided solely as a calculation aid and does not constitute tax, legal, or financial advice. The author accepts no liability for errors in the output, misuse of the tool, or any decisions made by end users based on the generated reports. You are always encouraged to review results with a qualified tax advisor before filing any return.


License

MIT © 2026 Gabriele Randelli