@seethruhead/wish-farm-planner 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 +119 -0
- package/dist/wish-farm-planner.js +221 -0
- package/package.json +45 -0
package/README.md
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
# @seethruhead/wish-farm-planner
|
|
2
|
+
|
|
3
|
+
Plan your discretionary spending with a YNAB-style wish farm. Uses [`@seethruhead/cra-payroll`](https://www.npmjs.com/package/@seethruhead/cra-payroll) to determine your real take-home pay, subtracts your monthly expenses, and shows you exactly which YNAB categories to fund each paycheck.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g @seethruhead/wish-farm-planner
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Requires `cra-payroll` in your PATH:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install -g @seethruhead/cra-payroll
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Config
|
|
18
|
+
|
|
19
|
+
Create `wish-farm.json` (or `~/.config/wish-farm.json` or `~/.wish-farm.json`):
|
|
20
|
+
|
|
21
|
+
```json
|
|
22
|
+
{
|
|
23
|
+
"monthlyExpenses": 5000,
|
|
24
|
+
"wishes": [
|
|
25
|
+
{ "name": "Mac Studio", "cost": 2999, "priority": 1 },
|
|
26
|
+
{ "name": "DAC/Amp", "cost": 899, "priority": 2 },
|
|
27
|
+
{ "name": "Headphones", "cost": 1599, "priority": 3 },
|
|
28
|
+
{ "name": "Motorcycle", "cost": 12000, "priority": 4 }
|
|
29
|
+
],
|
|
30
|
+
"craPayrollArgs": {
|
|
31
|
+
"salary": 263000,
|
|
32
|
+
"province": "Ontario",
|
|
33
|
+
"rrspMatch": 4,
|
|
34
|
+
"rrspUnmatched": 0
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
**`monthlyExpenses`** — everything you spend in a month: rent, food, bills, subscriptions, investment transfers. The money left after this is truly discretionary.
|
|
40
|
+
|
|
41
|
+
**`wishes`** — your wish farm items, prioritized (1 = buy first).
|
|
42
|
+
|
|
43
|
+
**`craPayrollArgs`** — passed to `cra-payroll` to compute your take-home.
|
|
44
|
+
|
|
45
|
+
## Usage
|
|
46
|
+
|
|
47
|
+
### Per-paycheck allocation table
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
wish-farm-planner paychecks
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Shows which YNAB categories to fund each paycheck, with rollover when items are funded mid-paycheck:
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
Paycheck Allocation (Sequential)
|
|
57
|
+
══════════════════════════════════════════════════════════════════════════════════
|
|
58
|
+
# Take Home Expenses Discretion. │ YNAB Categories
|
|
59
|
+
──────────────────────────────────────────────────────────────────────────────────
|
|
60
|
+
1 $6,008.01 $2,500.00 $3,508.01 │ $2,999.00 → Mac Studio ✓ │ $509.01 → DAC/Amp
|
|
61
|
+
2 $6,008.01 $2,500.00 $3,508.01 │ $389.99 → DAC/Amp ✓ │ $1,599.00 → Headphones ✓ │ $1,519.02 → Motorcycle
|
|
62
|
+
3 $6,008.01 $2,500.00 $3,508.01 │ $3,508.01 → Motorcycle
|
|
63
|
+
...
|
|
64
|
+
|
|
65
|
+
Funding Timeline
|
|
66
|
+
──────────────────────────────────────────────────────────────────────────
|
|
67
|
+
✓ Mac Studio funded by paycheck #1
|
|
68
|
+
✓ DAC/Amp funded by paycheck #2
|
|
69
|
+
✓ Headphones funded by paycheck #2
|
|
70
|
+
✓ Motorcycle funded by paycheck #5
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Monthly summary
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
wish-farm-planner plan
|
|
77
|
+
wish-farm-planner plan -s proportional
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### JSON output
|
|
81
|
+
|
|
82
|
+
Every command supports `--json` for integration with other tools:
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
wish-farm-planner paychecks --json
|
|
86
|
+
wish-farm-planner plan --json
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Options
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
wish-farm-planner paychecks [options]
|
|
93
|
+
-c, --config <path> Path to config file
|
|
94
|
+
--json Output as JSON
|
|
95
|
+
|
|
96
|
+
wish-farm-planner plan [options]
|
|
97
|
+
-c, --config <path> Path to config file
|
|
98
|
+
-s, --strategy sequential (default) or proportional
|
|
99
|
+
--json Output as JSON
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## How it works
|
|
103
|
+
|
|
104
|
+
1. Calls `cra-payroll --table --json` to get per-paycheck take-home pay (accounts for CPP/EI maxing out later in the year)
|
|
105
|
+
2. Subtracts your per-paycheck share of monthly expenses
|
|
106
|
+
3. Allocates the discretionary remainder to wish items in priority order
|
|
107
|
+
4. When an item is fully funded mid-paycheck, leftover rolls to the next item
|
|
108
|
+
|
|
109
|
+
## Development
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
bun install
|
|
113
|
+
bun test
|
|
114
|
+
bun run dev -- paychecks -c test-config.json
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## License
|
|
118
|
+
|
|
119
|
+
MIT
|