Alfred is a command-line utility designed to help you manage your personal finances efficiently. With Alfred, you can track your income, expenses, and view your current balance, all while persisting your data in JSON format for easy access and portability.
- Add Income: Record your income with an optional description.
- Add Expenses: Track expenses along with a description to categorize spending.
- View Balance: Check your current balance at any time.
- Persistent Storage: All data is saved in a JSON file using the
serde
crate, ensuring your financial records are always up-to-date. - Simple CLI Interface: Easy-to-use command-line interface for quick access to all features.
-
Clone the repository:
git clone https://github.com/rachit-patial/Alfred-finance-tracker.git cd alfred-expense-tracker
-
Build the project using Cargo:
cargo build --release
-
Run the binary:
./target/release/alfred
Alfred provides a simple CLI to interact with your financial data. Below are the available commands and options:
alfred --income <amount> --description "<description>"
<amount>
: The amount to be credited.--description
: (Optional) A brief description of the income source.
Example:
alfred --income 5000 --description "Salary for December"
alfred --expense <amount> --description "<description>"
<amount>
: The amount to be debited.--description
: (Optional) A brief description of the expense.
Example:
alfred --expense 1200 --description "Grocery shopping"
alfred --balance
Displays the current balance based on recorded income and expenses.
alfred --help
Displays a list of all available commands and options.
- Data Storage: Alfred uses a JSON file (default:
finance_data.json
) to store all income, expenses, and balance data. This ensures that your financial records persist across sessions. - Rust Libraries: The project leverages the following crates:
serde
andserde_json
for serializing and deserializing JSON data.clap
for command-line argument parsing.
-
Add an income entry:
alfred --income 2000 --description "Freelance project payment"
-
Add an expense entry:
alfred --expense 500 --description "Monthly subscription"
-
View your balance:
alfred --balance
- Built with ❤️ using Rust.
- Special thanks to the
serde
andclap
communities for their amazing libraries.
Stay financially smart with Alfred!