bonbox 0.3.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -4
- package/dist/cli.js +557 -51
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,6 +4,16 @@ The bonbox command line interface. It talks to the public bonbox REST API
|
|
|
4
4
|
(`https://app.bonbox.io/api/v1`) with your normal bonbox account — no direct
|
|
5
5
|
database access, no separate credentials.
|
|
6
6
|
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm i -g bonbox
|
|
11
|
+
# or
|
|
12
|
+
brew install yannickpulver/tap/bonbox
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
For local development instead:
|
|
16
|
+
|
|
7
17
|
```bash
|
|
8
18
|
pnpm -C packages/cli build
|
|
9
19
|
node packages/cli/dist/cli.js --help
|
|
@@ -19,15 +29,19 @@ node packages/cli/dist/cli.js --help
|
|
|
19
29
|
| `bonbox customers ls [--archived]` | List customers |
|
|
20
30
|
| `bonbox customers create --name <name> --address <street> --postal-code <zip> --city <city> […]` | Create a customer |
|
|
21
31
|
| `bonbox customers update <name-or-id> [--name] [--address] [--postal-code] [--city] [--country] [--department]` | Update a customer (only given fields change) |
|
|
32
|
+
| `bonbox customers archive <name-or-id>` / `unarchive <name-or-id>` | Hide a customer from lists, or bring it back; it stays on its invoices and receipts |
|
|
33
|
+
| `bonbox customers delete <name-or-id>` | Delete a customer that no invoice, receipt or project uses (else archive it) |
|
|
22
34
|
| `bonbox invoices ls [--status created\|paid] [--quotes]` | List invoices or quotes |
|
|
23
|
-
| `bonbox invoices create --customer <name-or-id> --item "…"` | Create an invoice or quote |
|
|
24
|
-
| `bonbox invoices update <number-or-id> [--customer] [--item "…"] [--date] [--payment-days] [--currency] [--language] [--subtitle] [--reference] [--vat-rate] [--custom-notes]` | Update an invoice or quote (only given fields change) |
|
|
35
|
+
| `bonbox invoices create --customer <name-or-id> --item "…" [--receipt <id>] [--combine] [--attach-receipts]` | Create an invoice or quote |
|
|
36
|
+
| `bonbox invoices update <number-or-id> [--customer] [--item "…"] [--receipt <id>] [--combine] [--[no-]attach-receipts] [--date] [--payment-days] [--currency] [--language] [--subtitle] [--reference] [--vat-rate] [--custom-notes]` | Update an invoice or quote (only given fields change) |
|
|
25
37
|
| `bonbox invoices pdf <number-or-id> [-o file]` | Download the PDF |
|
|
26
38
|
| `bonbox invoices paid <number-or-id> [--date] [--no-receipt]` | Mark an invoice as paid |
|
|
27
39
|
| `bonbox invoices unpaid <number-or-id>` | Undo a payment |
|
|
28
|
-
| `bonbox receipts ls [--month YYYY-MM] [--from] [--to] [--project]` | List receipts |
|
|
29
|
-
| `bonbox receipts add --seller <s> --price <n> […]` | Add a receipt by hand |
|
|
40
|
+
| `bonbox receipts ls [--month YYYY-MM] [--from] [--to] [--project]` | List receipts (VAT column only while VAT is on) |
|
|
41
|
+
| `bonbox receipts add --seller <s> --price <n> [--vat-rate 8.1] […]` | Add a receipt by hand (`--vat-rate`: Swiss VAT in the amount, 0 = none) |
|
|
42
|
+
| `bonbox receipts edit <id> [--seller] [--price] [--date] [--vat-rate] [--booking-text] [--exchange-rate] [--project] [--customer]` | Change a receipt; an empty flag clears the field |
|
|
30
43
|
| `bonbox receipts scan <file…> [--project]` | Upload a receipt and have it read out |
|
|
44
|
+
| `bonbox vat` | Show the VAT (MWST) setting and the filed returns (VAT is switched on in the app) |
|
|
31
45
|
|
|
32
46
|
Every command takes `--json` (raw API response, no decoration) and `--lang`.
|
|
33
47
|
|
|
@@ -43,6 +57,20 @@ bonbox invoices create \
|
|
|
43
57
|
--pdf invoice.pdf
|
|
44
58
|
```
|
|
45
59
|
|
|
60
|
+
### Billing expenses (Spesen)
|
|
61
|
+
|
|
62
|
+
`--receipt <id>` (repeatable) bills an expense receipt to the customer: one
|
|
63
|
+
position per receipt, or one combined position with `--combine` ("Spesen" in
|
|
64
|
+
the invoice language). The API fills in description and amount — the
|
|
65
|
+
receipt's amount, converted when the invoice is in your default currency.
|
|
66
|
+
`--attach-receipts` appends the receipts' files to the PDF. On `update`,
|
|
67
|
+
`--receipt` without `--item` adds to the existing positions.
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
bonbox invoices create --customer "Velo GmbH" --item "Design work:8:145" \
|
|
71
|
+
--receipt 3f0c… --receipt 9a1e… --combine --attach-receipts
|
|
72
|
+
```
|
|
73
|
+
|
|
46
74
|
`--customer` accepts an ID, an exact name, or a unique name prefix. If a prefix
|
|
47
75
|
matches several customers the CLI lists them and stops.
|
|
48
76
|
|