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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@ehdlg/expense-tracker

v1.0.5

Published

![Expense Tracker CLI](https://i.imgur.com/LEb3st7.png)

Downloads

328

Readme

Expense Tracker CLI

Expense Tracker CLI

This project is a simple CLI tool for managing your expenses, created as part of the roadmap.sh expense-tracker project. The goal of this project is to learn how to use commander to create CLI applications in TypeScript, while also refreshing concepts in Node.js such as file reading and writing. The application stores expense data in a JSON file and allows for various operations on these expenses.

Features

  • Add an Expense: Easily add a new expense with a description and amount.
  • Update an Expense: Modify the details of an existing expense.
  • Delete an Expense: Remove an expense by its ID.
  • List Expenses: View all the expenses that have been added.
  • Summary of Expenses: Get a summary of all expenses or filter by a specific month and/or year.
  • JSON Storage: Expenses are stored in a JSON file, allowing for simple data management.
  • Categories and Budgeting (Upcoming Features): Set budgets and filter expenses by category.
  • Export to CSV (Upcoming Feature): Export your expenses to a CSV file.

Installation

You can install the CLI tool globally using npm:

npm i -g @ehdlg/expense-tracker

Usage

Once installed, you can use the following commands:

Usage: expense-tracker [command] [options]

Commands:

  • add [options] Add a new expense
  • delete [options] Delete an existing expense
  • update [options] Update an existing expense
  • list List all the expenses
  • summary [options] Gives information about the global expenses or the expenses of a sepecific month and/or year
  • help [command] Display help for command

Examples

Add a new expense

expense-tracker add --description "Lunch" --amount 15

Update an expense

expense-tracker update --id 1 --description "Dinner" --amount 20

List all the expenses

expense-tracker list

View summary of expenses

expense-tracker summary

View summary of a specific month and year

expense-tracker summary -m 8 -y 2023

Learning objectives

  • Commander.js: Learn how to use commander to build powerful CLI tools.
  • TypeScript: Practice using TypeScript for Node.js applications.
  • File Operations: Refresh knowledge on file handling in Node.js by reading and writing JSON data.
  • NPM Publishing: Package and publish the CLI tool to npm.

Future enhancements

  • Expense Categories: Allow filtering expenses by category.
  • Budget Management: Set and track monthly budgets with warnings for overages.
  • CSV Export: Enable exporting expense data to CSV files.
  • SQLite as database: Using SQLite for more robust data storage.