@hasna/invoices 0.1.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 ADDED
@@ -0,0 +1,99 @@
1
+ # @hasna/invoices
2
+
3
+ Invoice management for AI agents — CLI + MCP server with SQLite storage.
4
+
5
+ Supports multi-country tax rules, EU reverse charge, business profiles, client management, line items, and payment tracking.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ bun install -g @hasna/invoices
11
+ # or
12
+ npm install -g @hasna/invoices
13
+ ```
14
+
15
+ Data is stored at `~/.hasna/invoices/invoices.db`.
16
+
17
+ Override with `HASNA_INVOICES_DIR` or `INVOICES_DIR` env variables.
18
+
19
+ ## CLI
20
+
21
+ ```bash
22
+ # Create an invoice
23
+ invoices create --client <id> --due 2026-04-30 --currency EUR
24
+
25
+ # Add line items
26
+ invoices add-item --invoice <id> --description "Consulting" --price 150 --quantity 8
27
+
28
+ # Mark as sent / paid
29
+ invoices mark <id> sent
30
+ invoices mark <id> paid
31
+
32
+ # Record a payment
33
+ invoices pay --invoice <id> --amount 1200 --method bank_transfer
34
+
35
+ # Summary
36
+ invoices summary
37
+
38
+ # Clients
39
+ invoices client add --name "Acme Corp" --email billing@acme.com --country US
40
+ invoices client list
41
+
42
+ # Business profiles
43
+ invoices business add --name "My Company SRL" --country RO --vat RO12345678 --default
44
+ invoices business list
45
+
46
+ # Tax rules
47
+ invoices tax list --country RO
48
+ invoices tax determine --issuer RO --client DE --vat DE123456789
49
+ ```
50
+
51
+ ## MCP Server
52
+
53
+ Add to your MCP config:
54
+
55
+ ```json
56
+ {
57
+ "mcpServers": {
58
+ "invoices": {
59
+ "command": "invoices-mcp"
60
+ }
61
+ }
62
+ }
63
+ ```
64
+
65
+ ### MCP Tools
66
+
67
+ **Invoices:** `create_invoice`, `get_invoice`, `list_invoices`, `update_invoice_status`, `delete_invoice`
68
+
69
+ **Line Items:** `add_line_item`, `remove_line_item`
70
+
71
+ **Payments:** `record_payment`, `invoice_summary`
72
+
73
+ **Clients:** `create_client`, `list_clients`, `update_client`, `delete_client`
74
+
75
+ **Business Profiles:** `create_business_profile`, `get_business_profile`, `get_default_business_profile`, `list_business_profiles`, `update_business_profile`, `delete_business_profile`
76
+
77
+ **Tax:** `list_tax_rules`, `get_default_tax_rule`, `create_tax_rule`, `delete_tax_rule`, `determine_tax`
78
+
79
+ ## Features
80
+
81
+ - Auto-incrementing invoice numbers (`INV-00001`, `INV-00002`, ...)
82
+ - Automatic total recalculation when line items change
83
+ - Auto-marks invoice as paid when payments cover the total
84
+ - 27 pre-seeded tax rules for EU, US, UK
85
+ - EU B2B reverse charge detection
86
+ - Business profiles with bank details (IBAN, SWIFT)
87
+ - SQLite in WAL mode for concurrent access
88
+ - No server required — embedded database
89
+
90
+ ## Storage
91
+
92
+ ```
93
+ ~/.hasna/invoices/
94
+ └── invoices.db # SQLite database (WAL mode)
95
+ ```
96
+
97
+ ## License
98
+
99
+ Apache-2.0
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env bun
2
+ export {};
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":""}