1<img width="1200" alt="Invoice" src="https://github.com/maaslalani/nap/assets/42545625/16dae9d9-390c-49b6-aedd-3f882b17f57b">
2
3# Invoice
4
5Generate invoices from the command line.
6
7## Command Line Interface
8
9```bash
10invoice generate --from "Dream, Inc." --to "Imagine, Inc." \
11 --item "Rubber Duck" --quantity 2 --rate 25 \
12 --tax 0.13 --discount 0.15 \
13 --note "For debugging purposes."
14```
15
16<img src="https://vhs.charm.sh/vhs-66CMd4UQuXkuxX9djHUnGX.gif" width="600" />
17
18View the generated PDF at `invoice.pdf`, you can customize the output location
19with `--output`.
20
21```bash
22open invoice.pdf
23```
24
25<img width="574" alt="Example invoice" src="https://github.com/maaslalani/nap/assets/42545625/13153de2-dfa1-41e6-a18e-4d3a5cea5b74">
26
27Save repeated information with environment variables or in an overridable JSON file:
28
29```bash
30export INVOICE_LOGO=/path/to/image.png
31export INVOICE_FROM="Dream, Inc."
32export INVOICE_TO="Imagine, Inc."
33export INVOICE_TAX=0.13
34export INVOICE_RATE=25
35```
36
37```json
38{
39 "logo": "/path/to/image.png",
40 "from": "Dream, Inc.",
41 "to": "Imagine, Inc.",
42 "tax": 0.13,
43 "rates": 25
44}
45```
46
47Generate new invoice:
48
49```bash
50invoice generate \
51 --item "Yellow Rubber Duck" --quantity 5 \
52 --item "Special Edition Plaid Rubber Duck" --quantity 1 \
53 --note "For debugging purposes." \
54 --output duck-invoice.pdf
55```
56```bash
57invoice generate --import path/to/data.json --output duck-invoice.pdf
58```
59
60### Custom Templates
61
62If you would like a custom invoice template for your business or company, please
63reach out via:
64
65* [Email](mailto:maas@lalani.dev)
66* [Twitter](https://twitter.com/maaslalani)
67
68## Installation
69
70<!--
71
72Use a package manager:
73
74```bash
75# macOS
76brew install invoice
77
78# Arch
79yay -S invoice
80
81# Nix
82nix-env -iA nixpkgs.invoice
83```
84
85-->
86
87Install with Go:
88
89```sh
90go install github.com/maaslalani/invoice@main
91```
92
93Or download a binary from the [releases](https://github.com/maaslalani/invoice/releases).
94
95## License
96
97[MIT](https://github.com/maaslalani/invoice/blob/master/LICENSE)
98
99## Feedback
100
101I'd love to hear your feedback on improving `invoice`.
102
103Feel free to reach out via:
104* [Email](mailto:maas@lalani.dev)
105* [Twitter](https://twitter.com/maaslalani)
106* [GitHub issues](https://github.com/maaslalani/invoice/issues/new)
107
108---
109
110<sub><sub>z</sub></sub><sub>z</sub>z