https://github.com/krisnaajiep/php-expense-tracker-cli
A simple expense tracker command line interface (CLI) App built with PHP that used to to manage your finances.
https://github.com/krisnaajiep/php-expense-tracker-cli
cli cli-app cli-application command-line command-line-app command-line-interface csv csv-files expense-tracker filesystem json-files php
Last synced: 21 days ago
JSON representation
A simple expense tracker command line interface (CLI) App built with PHP that used to to manage your finances.
- Host: GitHub
- URL: https://github.com/krisnaajiep/php-expense-tracker-cli
- Owner: krisnaajiep
- Created: 2024-12-28T07:10:15.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-03-12T07:21:17.000Z (about 2 months ago)
- Last Synced: 2025-03-12T08:26:07.233Z (about 2 months ago)
- Topics: cli, cli-app, cli-application, command-line, command-line-app, command-line-interface, csv, csv-files, expense-tracker, filesystem, json-files, php
- Language: PHP
- Homepage:
- Size: 23.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PHP Expense Tracker
> Simple expense tracker CLI (Command Line Interface) App built with PHP.
## Table of Contents
* [General Info](#general-information)
* [Technologies Used](#technologies-used)
* [Features](#features)
* [Setup](#setup)
* [Usage](#usage)
* [Project Status](#project-status)
* [Acknowledgements](#acknowledgements)## General Information
PHP Expense Tracker is a simple CLI (Command Line Interface) application that allows users to manage their finances. This project is designed to explore and practice logic building, working with the Command Line Interface (CLI), and filesystem operations in PHP.
## Technologies Used
* PHP - version 8.3.6
## Features
* **Set Budget**: Set montly budget for expenses.
* **Add a New Expense**: Create a new expense with a category, description, and amount.
* **List All Expense**: Display a list of all expense with their details.
* **List Tasks By Category**: Display a list of all tasks by Category.
* **Update an Expense**: Modify the category, description, or amount of an existing task.
* **Update Budget**: Modify montly budget for expenses.
* **Delete an Expense**: Remove an expense from the list.
* **View a Summary**: View a summary of all expenses or for a specific month (of current year).
* **Export Into CSV**: Export expenses data into a csv file.## Setup
To run this CLI tool, you’ll need:
* **PHP**: Version 8.3 or newer
How to install:
1. Clone the repository
```bash
git clone https://github.com/krisnaajiep/php-expense-tracker-cli.git
```2. Change the current working directory
```bash
cd path/php-expense-tracker-cli
```3. Run the task tracker
```bash
php expense-tracker.php
```## Usage
`php expense-tracker.php [options] `
Available commands, options, and arguments:
| Commands | Options | Description |
| --------- | ------------------------------------- | ------------------------------------------------------------------ |
| `set` | `--budget` | Set monthly budget |
| `show` | `--budget` | Show montly budget |
| `add` | `--category, --description, --amount` | Add new expense |
| `update` | `--id, --category` | Update expense category |
| `update` | `--id, --description` | Update expense description |
| `update` | `--id, --amount` | Update expense amount |
| `delete` | `--id` | Deleting an expense |
| `list` | | List all expenses |
| `list` | `--category` | Listing all expense by category |
| `summary` | | View a summary of all expenses |
| `export` | | Export expenses data into csv file |
| `export` | | Export expenses data into csv file |Example:
* Set montly budget
```bash
php expense-tracker.php set --budget 2000
```* Adding a new expense
```bash
php expense-tracker.php add --description "Lunch" --amount 20 --category "Food"
```* Updating an expense
```bash
php expense-tracker.php update --id 1 --category "Electronic"
``````bash
php expense-tracker.php update --id 1 --description "Radio"
``````bash
php expense-tracker.php update --id 1 --amount 60
```* Deleting an expense
```bash
php expense-tracker.php delete --id 1
```* Listing all expenses
```bash
php expense-tracker.php list
```* Listing all expenses by specific category
```bash
php expense-tracker.php list --category "Electronic"
```* View a summary of all expenses
```bash
php expense-tracker.php summary
```* Listing all expenses by specific month
```bash
php expense-tracker.php summary --month 6
```* Export data into csv file
```bash
php expense-tracker.php export
```## Project Status
Project is: _complete_.
## Acknowledgements
This project was inspired by [roadmap.sh](https://roadmap.sh/projects/expense-tracker).