hledger:tldr:a348d
The "hledger add" command is a subcommand used in the hledger command-line tool. hledger is a powerful and flexible accounting program that helps users keep track of their personal or business finances.
The purpose of the "hledger add" command is to add transactions to an existing hledger journal file. A journal file is a plain text file that contains all the financial transactions recorded by hledger.
When you run the "hledger add" command, you provide it with the necessary information to create a new transaction entry in the journal file. This information typically includes the date of the transaction, an optional description, the accounts affected by the transaction, and the corresponding monetary amounts.
For example, if you want to add a transaction for a purchase of groceries, you could use the "hledger add" command with the following syntax:
hledger add --date='2022-01-01' expenses:groceries $50
In this example, the --date flag specifies the date of the transaction (January 1, 2022), and the "expenses:groceries" argument identifies the account where the purchase amount will be recorded. The "$50" argument represents the monetary amount.
After running the command, hledger will add the provided transaction to the journal file, which allows you to keep a comprehensive record of your financial activities.
Overall, the "hledger add" command is a convenient way to add transactions to your hledger journal file, helping you maintain accurate and organized financial records.