The Expensify CLI is a powerful command-line tool that helps you manage your expenses, create reports, and keep track of your finances. With this tool, you can add, edit, delete transactions, and generate reports on the percentage distribution of expenses by category.
Make sure Node.js is installed on your system.
-
Install the package globally:
npm install -g expensify-cli pnpm add -g expensify-cli
-
After installation, you can use the
exp
command.
To view help for all available commands:
exp --help
Add a new transaction:
exp add <category> <description> <amount> <date>
Parameters:
<category>
: The category of the expense.<description>
: A description of the transaction.<amount>
: The amount spent (accepts decimals with either,
or.
).[date]
: The date of the transaction in the formatDD.MM.YYYY
(optional, defaults to today).
Example:
exp add "Household & Living" "Monthly household budget" 800.00 18.12.2024
List all stored transactions:
exp list
Optional Filters:
--category
or-c
: Filter transactions by category.--date
or-d
: Filter transactions by a specific date.--show-ids
or-id
: Display the IDs of the transactions.--descending
or-desc
: Change the sort order (descending by date).
Example:
exp list --category "Leisure"
exp list --date 18.12.2024
exp list --show-ids
exp list --descending
Edit a transaction by its ID:
exp edit <id> [options]
Options:
-d, --date <date>
: Change the date.-c, --category <category>
: Change the category.-a, --amount <amount>
: Change the amount.-desc, --description <description>
: Change the description.
Example:
exp edit 1 --date 19.12.2024 --amount 750.00
Delete a transaction by its ID:
exp remove <id>
Example:
exp remove 2
Generate a report showing the percentage distribution of transactions by category:
exp report
Optional Filters:
--month
or-m
: Generate a report for a specific month (formatYYYY-MM
).
Example:
exp report
exp report --month 2024-12
List all available categories:
exp categories
Example:
exp categories
Update CLI settings, such as the active currency or language:
Set Active Currency:
exp config --set-currency <currency>
<currency>
: Specify the currency code (e.g., USD, EUR).
Set Language:
exp config --set-language <language>
<language>
: Specify the language code (e.g., en_001, de).
View Configuration:
exp config --view
Example:
exp config --set-currency USD
exp config --set-language en_001
exp config --view
-
Add Transactions:
exp add "Leisure" "Theatre visit" 35.90 15.12.2024 exp add "Household & Living" "Monthly household budget" 800.00 18.12.2024
-
List All Transactions:
exp list
-
Edit a Transaction:
exp edit 1 --amount 750.00
-
Delete a Transaction:
exp remove 2
-
Generate a Report:
exp report --month 2024-12
-
View All Categories:
exp categories
-
Update Configuration:
exp config --set-currency EUR exp config --set-language de exp config --view
-
Invalid Date Format:
- Dates must be entered in the format
DD.MM.YYYY
for transactions orYYYY-MM
for reports.
- Dates must be entered in the format
-
Invalid Amount:
- Amounts must be valid numbers (e.g.,
800.00
or800,00
).
- Amounts must be valid numbers (e.g.,
-
ID Not Found:
- Ensure the transaction ID is correct when using
edit
orremove
.
- Ensure the transaction ID is correct when using
-
Unsupported Language or Currency:
- Check the supported language or currency codes when updating the configuration.
This project is licensed under the MIT License. For more details, refer to the LICENSE file.
Enjoy managing your expenses! 😊
If you have any questions or issues, please create an issue on GitHub.