envelope-cli 0.2.6

Terminal-based zero-based budgeting application
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
# EnvelopeCLI Command Reference

This document provides a complete reference for all CLI commands available in EnvelopeCLI.

## Global Options

| Option | Description |
|--------|-------------|
| `--help`, `-h` | Show help message |
| `--version`, `-V` | Show version information |

## Commands Overview

| Command | Description |
|---------|-------------|
| `tui` | Launch the interactive TUI |
| `init` | Initialize a new budget |
| `config` | Show current configuration |
| `account` | Account management |
| `category` | Category management |
| `budget` | Budget allocation |
| `transaction` | Transaction management |
| `transfer` | Account transfers |
| `payee` | Payee management |
| `reconcile` | Account reconciliation |
| `import` | Import transactions from CSV |
| `export` | Export data |
| `report` | Generate reports |
| `backup` | Backup management |
| `encrypt` | Encryption management |

---

## Account Commands

### `envelope account create`

Create a new account.

```bash
envelope account create <NAME> --type <TYPE> [OPTIONS]
```

**Arguments:**
- `<NAME>` - Account name (e.g., "Checking", "Savings")

**Options:**
- `--type`, `-t` - Account type: `checking`, `savings`, `credit`, `cash`, `investment`, `other`
- `--off-budget` - Mark as off-budget (doesn't affect Available to Budget)
- `--balance`, `-b` - Starting balance (e.g., "1000.00")

**Examples:**
```bash
# Create a checking account
envelope account create "Chase Checking" --type checking

# Create a savings account with starting balance
envelope account create "Emergency Fund" --type savings --balance 5000.00

# Create an off-budget investment account
envelope account create "401k" --type investment --off-budget
```

### `envelope account list`

List all accounts with balances.

```bash
envelope account list [OPTIONS]
```

**Options:**
- `--archived` - Include archived accounts
- `--format` - Output format: `table` (default), `json`

### `envelope account show`

Show details for a specific account.

```bash
envelope account show <NAME_OR_ID>
```

### `envelope account edit`

Edit an existing account.

```bash
envelope account edit <NAME_OR_ID> [OPTIONS]
```

**Options:**
- `--name`, `-n` - New name
- `--type`, `-t` - New type
- `--on-budget/--off-budget` - Change budget status

### `envelope account archive`

Archive (soft-delete) an account.

```bash
envelope account archive <NAME_OR_ID>
```

---

## Category Commands

### `envelope category create`

Create a new category.

```bash
envelope category create <NAME> --group <GROUP> [OPTIONS]
```

**Arguments:**
- `<NAME>` - Category name

**Options:**
- `--group`, `-g` - Category group (required)

**Examples:**
```bash
envelope category create "Coffee" --group "Wants"
envelope category create "Car Payment" --group "Bills"
```

### `envelope category list`

List all categories organized by group.

```bash
envelope category list [OPTIONS]
```

**Options:**
- `--format` - Output format: `tree` (default), `flat`, `json`

### `envelope category delete`

Delete a category.

```bash
envelope category delete <NAME_OR_ID>
```

### `envelope category move`

Move a category to a different group.

```bash
envelope category move <NAME_OR_ID> --to <GROUP>
```

---

## Budget Commands

### `envelope budget assign`

Assign funds to a category.

```bash
envelope budget assign <CATEGORY> <AMOUNT> [OPTIONS]
```

**Arguments:**
- `<CATEGORY>` - Category name or ID
- `<AMOUNT>` - Amount to assign (e.g., "500.00")

**Options:**
- `--period`, `-p` - Budget period (defaults to current month)

**Examples:**
```bash
# Assign $500 to Groceries for current month
envelope budget assign Groceries 500.00

# Assign for a specific month
envelope budget assign "Rent" 1500.00 --period 2025-02
```

### `envelope budget move`

Move funds between categories.

```bash
envelope budget move <FROM> <TO> <AMOUNT> [OPTIONS]
```

**Arguments:**
- `<FROM>` - Source category
- `<TO>` - Destination category
- `<AMOUNT>` - Amount to move

### `envelope budget status`

Show current budget status.

```bash
envelope budget status [OPTIONS]
```

**Options:**
- `--period`, `-p` - Budget period (defaults to current)

### `envelope budget overview`

Show full budget overview with all categories.

```bash
envelope budget overview [OPTIONS]
```

**Options:**
- `--period`, `-p` - Budget period

---

## Transaction Commands

### `envelope transaction add`

Add a new transaction.

```bash
envelope transaction add <ACCOUNT> <AMOUNT> [OPTIONS]
```

**Arguments:**
- `<ACCOUNT>` - Account name or ID
- `<AMOUNT>` - Amount (negative for outflow, positive for inflow)

**Options:**
- `--payee`, `-p` - Payee name
- `--category`, `-c` - Category name or ID
- `--date`, `-d` - Date (YYYY-MM-DD, defaults to today)
- `--memo`, `-m` - Memo/notes
- `--cleared` - Mark as cleared
- `--split` - Add split (can be repeated): `--split Category:Amount`

**Examples:**
```bash
# Simple expense
envelope transaction add Checking -50.00 --payee "Grocery Store" --category Groceries

# Income
envelope transaction add Checking 3000.00 --payee "Employer" --category "Income" --cleared

# Split transaction
envelope transaction add Checking -100.00 --payee "Target" \
  --split "Groceries:60.00" \
  --split "Household:40.00"
```

### `envelope transaction list`

List transactions for an account.

```bash
envelope transaction list <ACCOUNT> [OPTIONS]
```

**Options:**
- `--from` - Start date (YYYY-MM-DD)
- `--to` - End date (YYYY-MM-DD)
- `--limit`, `-n` - Number of transactions to show
- `--format` - Output format: `table` (default), `json`

### `envelope transaction edit`

Edit an existing transaction.

```bash
envelope transaction edit <ID> [OPTIONS]
```

**Options:**
- Same as `add` command

### `envelope transaction delete`

Delete a transaction.

```bash
envelope transaction delete <ID>
```

### `envelope transaction clear`

Mark a transaction as cleared.

```bash
envelope transaction clear <ID>
```

---

## Transfer Command

Transfer funds between accounts.

```bash
envelope transfer <FROM_ACCOUNT> <TO_ACCOUNT> <AMOUNT> [OPTIONS]
```

**Options:**
- `--date`, `-d` - Transfer date
- `--memo`, `-m` - Memo

**Example:**
```bash
envelope transfer Checking Savings 500.00 --memo "Monthly savings"
```

---

## Import Command

Import transactions from a CSV file.

```bash
envelope import <FILE> --account <ACCOUNT> [OPTIONS]
```

**Options:**
- `--account`, `-a` - Target account (required)
- `--preset` - Use a column mapping preset (chase, bofa, etc.)
- `--skip-duplicates` - Automatically skip duplicate transactions

**Example:**
```bash
envelope import bank_statement.csv --account Checking --preset chase
```

---

## Export Commands

### `envelope export csv`

Export transactions to CSV.

```bash
envelope export csv [OPTIONS]
```

**Options:**
- `--output`, `-o` - Output file path (default: stdout)
- `--account`, `-a` - Filter by account
- `--from` - Start date
- `--to` - End date

### `envelope export json`

Export all data to JSON.

```bash
envelope export json --output <FILE>
```

### `envelope export yaml`

Export all data to YAML.

```bash
envelope export yaml --output <FILE>
```

---

## Report Commands

### `envelope report budget`

Generate budget overview report.

```bash
envelope report budget [OPTIONS]
```

**Options:**
- `--period`, `-p` - Budget period
- `--csv` - Output as CSV

### `envelope report spending`

Generate spending by category report.

```bash
envelope report spending [OPTIONS]
```

**Options:**
- `--from` - Start date
- `--to` - End date
- `--csv` - Output as CSV

### `envelope report networth`

Show net worth (sum of all accounts).

```bash
envelope report networth [OPTIONS]
```

---

## Reconcile Commands

### `envelope reconcile start`

Start reconciliation for an account.

```bash
envelope reconcile start <ACCOUNT> --balance <BALANCE> [OPTIONS]
```

**Options:**
- `--balance`, `-b` - Statement ending balance (required)
- `--date`, `-d` - Statement date

### `envelope reconcile status`

Show current reconciliation status.

```bash
envelope reconcile status <ACCOUNT>
```

---

## Backup Commands

### `envelope backup create`

Create a backup of all data.

```bash
envelope backup create
```

### `envelope backup list`

List available backups.

```bash
envelope backup list
```

### `envelope backup restore`

Restore from a backup.

```bash
envelope backup restore <BACKUP_FILE>
```

---

## Encrypt Commands

### `envelope encrypt enable`

Enable encryption for your data.

```bash
envelope encrypt enable
```

You will be prompted to enter and confirm a passphrase.

### `envelope encrypt disable`

Disable encryption.

```bash
envelope encrypt disable
```

Requires current passphrase.

### `envelope encrypt change-passphrase`

Change encryption passphrase.

```bash
envelope encrypt change-passphrase
```

### `envelope encrypt status`

Show encryption status.

```bash
envelope encrypt status
```

---

## Exit Codes

| Code | Meaning |
|------|---------|
| 0 | Success |
| 1 | Configuration error |
| 2 | I/O error |
| 3 | Data file error |
| 4 | Validation error |
| 5 | Not found |
| 6 | Duplicate entry |
| 7 | Budget error |
| 8 | Reconciliation error |
| 9 | Import error |
| 10 | Export error |
| 11 | Encryption error |
| 12 | Locked transaction |
| 13 | Insufficient funds |
| 14 | Storage error |
| 15 | TUI error |