Invoice Generator
Create professional PDF invoices from the command line.
Quick Start
CODEBLOCK0
Commands
| Command | Description |
|---|
| INLINECODE0 | Generate a new invoice PDF |
| INLINECODE1 |
Create a quote/estimate instead |
|
recurring | Set up a recurring invoice template |
|
list | List generated invoices |
|
remind | Generate a payment reminder |
Item Format
Items are specified as: INLINECODE5
Examples:
- -
"Web Development,40,85" — 40 hours at $85/hr - INLINECODE7 — flat rate $1500
- INLINECODE8 — 12 months at $29.99/mo
Options
| Flag | Default | Description |
|---|
| INLINECODE9 | (required) | Your business/personal name |
| INLINECODE10 |
| Your email |
|
--from-address | | Your address |
|
--to | (required) | Client name |
|
--to-email | | Client email |
|
--to-address | | Client address |
|
--item | (repeatable) | Line items |
|
--tax | 0 | Tax percentage |
|
--discount | 0 | Discount percentage or flat amount |
|
--due | 30 | Payment due in N days |
|
--currency | USD | Currency code |
|
--notes | | Additional notes |
|
--prefix | INV | Invoice number prefix |
|
--bank | | Bank details for payment |
|
--output | auto | Output filename |
Output
Generates a clean, professional PDF with:
- - Invoice number (auto-incremented)
- Issue date and due date
- Itemized line items with subtotals
- Tax, discount, and total calculations
- Payment terms and bank details
- Professional formatting
Templates
Invoices use a clean minimal template by default. To customize:
- 1. Edit INLINECODE24
- Add your logo to INLINECODE25
发票生成器
从命令行创建专业PDF发票。
快速开始
bash
python3 scripts/invoice.py create \
--from 您的企业名称 \
--to 客户名称 \
--item 咨询,8小时,75 \
--item 设计,3小时,100 \
--due 14
命令
| 命令 | 描述 |
|---|
| create | 生成新的PDF发票 |
| estimate |
创建报价单/估价单 |
| recurring | 设置定期发票模板 |
| list | 列出已生成的发票 |
| remind | 生成付款提醒 |
项目格式
项目格式为:描述,数量,单价
示例:
- - 网站开发,40,85 — 40小时,每小时85美元
- 标志设计,1,1500 — 固定费用1500美元
- 托管服务,12,29.99 — 12个月,每月29.99美元
选项
| 标志 | 默认值 | 描述 |
|---|
| --from | (必填) | 您的企业/个人名称 |
| --from-email |
| 您的邮箱 |
| --from-address | | 您的地址 |
| --to | (必填) | 客户名称 |
| --to-email | | 客户邮箱 |
| --to-address | | 客户地址 |
| --item | (可重复) | 行项目 |
| --tax | 0 | 税率百分比 |
| --discount | 0 | 折扣百分比或固定金额 |
| --due | 30 | N天内付款到期 |
| --currency | USD | 货币代码 |
| --notes | | 附加说明 |
| --prefix | INV | 发票编号前缀 |
| --bank | | 付款银行信息 |
| --output | 自动 | 输出文件名 |
输出
生成清晰专业的PDF,包含:
- - 发票编号(自动递增)
- 开具日期和到期日期
- 明细行项目及小计
- 税费、折扣和总额计算
- 付款条款和银行信息
- 专业格式排版
模板
发票默认使用简洁的极简模板。如需自定义:
- 1. 编辑 scripts/invoice_template.html
- 将您的标志添加到 assets/logo.png