pacioli 1.0.1 → 1.0.2

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.
@@ -0,0 +1,74 @@
1
+ ---
2
+ name: pacioli
3
+ description: Generates professional financial documents (invoices, quotations, receipts) for freelancers using HTML templates and Puppeteer. Handles tax calculations, auto-numbering, and PDF generation.
4
+ ---
5
+
6
+ # Pacioli
7
+
8
+ A CLI tool for generating financial documents. It uses JSON data files and HTML templates to produce PDFs.
9
+
10
+ ## Quick Reference
11
+
12
+ ### Run commands
13
+
14
+ ```bash
15
+ bunx pacioli <command> [args]
16
+ ```
17
+
18
+ | Command | Usage |
19
+ |---------|-------|
20
+ | `init` | Initialize a new project structure with config and templates |
21
+ | `generate <type> <path> --customer <path>` | Generate a PDF document (invoice, quotation, receipt) |
22
+ | `help` | Show help message |
23
+ | `version` | Show version |
24
+
25
+ ## Common Workflows
26
+
27
+ ### 1. Initialize a new project
28
+ Start here to create the necessary folder structure (`config`, `customers`, `templates`).
29
+
30
+ ```bash
31
+ mkdir my-financial-docs
32
+ cd my-financial-docs
33
+ bunx pacioli init
34
+ ```
35
+
36
+ ### 2. Configure Freelancer Profile
37
+ Edit `config/freelancer.json` to set your business details and bank information.
38
+ See [references/SCHEMAS.md](references/SCHEMAS.md) for the format.
39
+
40
+ ### 3. Generate an Invoice
41
+ Create a customer file (e.g., `customers/acme.json`) and an invoice file (e.g., `invoices/oct-service.json`).
42
+
43
+ ```bash
44
+ bunx pacioli generate invoice invoices/oct-service.json --customer customers/acme.json
45
+ ```
46
+
47
+ ### 4. Generate a Quotation
48
+ ```bash
49
+ bunx pacioli generate quotation quotations/web-design.json --customer customers/acme.json
50
+ ```
51
+
52
+ ### 5. Generate a Receipt
53
+ ```bash
54
+ bunx pacioli generate receipt receipts/payment-101.json --customer customers/acme.json
55
+ ```
56
+
57
+ ## Project Structure
58
+
59
+ When you run `init`, Pacioli creates:
60
+
61
+ - `config/`: Contains `freelancer.json` (your profile).
62
+ - `customers/`: Store reusable customer JSON profiles here.
63
+ - `templates/`: HTML templates for documents. You can customize these.
64
+ - `examples/`: Example JSON files for each document type.
65
+ - `.metadata.json`: Tracks auto-incrementing document numbers.
66
+
67
+ ## Data Formats
68
+
69
+ Data is provided via JSON files.
70
+ - **Dates**: Use `YYYY-MM-DD` format.
71
+ - **Auto-numbering**: Set `documentNumber` to `"auto"` to let Pacioli handle ID generation (e.g., `INV-202310-001`).
72
+ - **Tax**: Supports "withholding" (deducted) and "vat" (added).
73
+
74
+ For detailed JSON schemas and examples, see **[references/SCHEMAS.md](references/SCHEMAS.md)**.
@@ -0,0 +1,124 @@
1
+ # Data Schemas
2
+
3
+ This document defines the JSON structures required for Pacioli.
4
+
5
+ ## Freelancer Configuration
6
+ File: `config/freelancer.json`
7
+
8
+ ```json
9
+ {
10
+ "name": "Luca Pacioli",
11
+ "title": "Father of Accounting",
12
+ "email": "luca@venice.it",
13
+ "phone": "+39 123 456 7890",
14
+ "address": "San Sepolcro, Republic of Florence",
15
+ "taxId": "IT12345678901",
16
+ "signature": "signature.png",
17
+ "bankInfo": {
18
+ "bankName": "Bank of Venice",
19
+ "accountName": "Luca Pacioli",
20
+ "accountNumber": "123-456-7890",
21
+ "branch": "Main Branch",
22
+ "swift": "BOVUIT22"
23
+ }
24
+ }
25
+ ```
26
+
27
+ ## Customer Profile
28
+ File: `customers/<customer-slug>.json`
29
+
30
+ ```json
31
+ {
32
+ "name": "Ludovico Sforza",
33
+ "company": "Duke of Milan",
34
+ "address": "Castello Sforzesco, Milan",
35
+ "taxId": "MILAN9999",
36
+ "phone": "+39 987 654 3210"
37
+ }
38
+ ```
39
+
40
+ ## Document Types
41
+
42
+ All documents share these common fields:
43
+ - `documentNumber`: String. Use "auto" for auto-numbering (YYYYMM-001).
44
+ - `issueDate`: "YYYY-MM-DD"
45
+ - `taxRate`: Number (0-1). e.g., 0.03 for 3%.
46
+ - `taxType`: "withholding" (subtracts tax) or "vat" (adds tax).
47
+ - `taxLabel`: String (e.g., "Withholding Tax", "VAT").
48
+ - `items`: Array of line items.
49
+
50
+ ### Invoice
51
+ File: `invoices/<file>.json`
52
+
53
+ ```json
54
+ {
55
+ "documentNumber": "auto",
56
+ "issueDate": "2023-10-27",
57
+ "dueDate": "2023-11-26",
58
+ "taxRate": 0.03,
59
+ "taxType": "withholding",
60
+ "taxLabel": "Withholding Tax (3%)",
61
+ "items": [
62
+ {
63
+ "description": "Mathematics Tutoring",
64
+ "quantity": 10,
65
+ "unit": "hours",
66
+ "unitPrice": 150.00
67
+ }
68
+ ],
69
+ "paymentTerms": [
70
+ "Please pay within 30 days",
71
+ "Bank transfer only"
72
+ ]
73
+ }
74
+ ```
75
+
76
+ ### Quotation
77
+ File: `quotations/<file>.json`
78
+
79
+ ```json
80
+ {
81
+ "documentNumber": "auto",
82
+ "issueDate": "2023-10-27",
83
+ "validUntil": "2023-11-10",
84
+ "taxRate": 0.07,
85
+ "taxType": "vat",
86
+ "taxLabel": "VAT (7%)",
87
+ "items": [
88
+ {
89
+ "description": "Website Design",
90
+ "quantity": 1,
91
+ "unit": "project",
92
+ "unitPrice": 5000.00
93
+ }
94
+ ],
95
+ "paymentTerms": [
96
+ "50% deposit required"
97
+ ]
98
+ }
99
+ ```
100
+
101
+ ### Receipt
102
+ File: `receipts/<file>.json`
103
+
104
+ ```json
105
+ {
106
+ "documentNumber": "auto",
107
+ "issueDate": "2023-10-27",
108
+ "paymentDate": "2023-10-27",
109
+ "paymentMethod": "Bank Transfer",
110
+ "referenceNumber": "TXN-123456",
111
+ "paidAmount": 485.00,
112
+ "taxRate": 0.03,
113
+ "taxType": "withholding",
114
+ "taxLabel": "Withholding Tax (3%)",
115
+ "items": [
116
+ {
117
+ "description": "Consulting Services",
118
+ "quantity": 5,
119
+ "unit": "hours",
120
+ "unitPrice": 100.00
121
+ }
122
+ ]
123
+ }
124
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pacioli",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "CLI tool for generating professional financial documents (invoices, quotations, receipts) for freelancers. Named after Luca Pacioli, father of accounting.",
5
5
  "author": "Peerasak Unsakon <clonezer@gmail.com>",
6
6
  "license": "MIT",
@@ -32,6 +32,7 @@
32
32
  "examples",
33
33
  "customers",
34
34
  "config",
35
+ "agent-skills",
35
36
  "README.md",
36
37
  "LICENSE"
37
38
  ],