This is a simple command-line invoice generator that creates PDF invoices. The invoice includes client information, invoice details, and company information.
- Python 3.x
reportlablibrary
- Clone the repository or download the script.
- Install the required library:
pip install reportlab
-
Copy the
config.json.templatefile toconfig.json:cp config.json.template config.json
-
Update the
config.jsonfile with your company details:{ "company_name": "My Company", "company_address": "My Company Address", "bank_details": "Bank Details", "client_name": "Client Name", "client_address": [ "Line 1 of Client Address", "Line 2 of Client Address", "Line 3 of Client Address" ] }
Run the script with the following command:
python3 invoice_generator.py -c <config_file> -n <invoice_number> -d <date> -hr <hours> -r <rate>-cor--config: The configuration file to use. (JSON)-nor--number: The invoice number.-dor--date: The invoice date.-uor--units: The number of units (hours/days/weeks) worked.
This will generate a PDF invoice with the specified details.
Most of the initial code in this repo was generated by OpenDevin. I have made some manual (heavily assisted by Claude) changes recently.
This project is licensed under the MIT License. See the LICENSE file for details.