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