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:
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
37Generate new invoice:
38
39```bash
40invoice generate \
41 --item "Yellow Rubber Duck" --quantity 5 \
42 --item "Special Edition Plaid Rubber Duck" --quantity 1 \
43 --notes "For debugging purposes."
44 --output duck-invoice.pdf
45```
46
47## Installation
48
49<!--
50
51Use a package manager:
52
53```bash
54# macOS
55brew install invoice
56
57# Arch
58yay -S invoice
59
60# Nix
61nix-env -iA nixpkgs.invoice
62```
63
64-->
65
66Install with Go:
67
68```sh
69go install github.com/maaslalani/invoice@main
70```
71
72Or download a binary from the [releases](https://github.com/maaslalani/invoice/releases).
73
74## License
75
76[MIT](https://github.com/maaslalani/invoice/blob/master/LICENSE)
77
78## Feedback
79
80I'd love to hear your feedback on improving `invoice`.
81
82Feel free to reach out via:
83* [Email](mailto:maas@lalani.dev)
84* [Twitter](https://twitter.com/maaslalani)
85* [GitHub issues](https://github.com/maaslalani/invoice/issues/new)
86
87---
88
89<sub><sub>z</sub></sub><sub>z</sub>z