@slothmoney/agent-cli 0.14.0 → 0.14.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.14.1 - 2026-08-21
4
+
5
+ - Make every parent help page list its nested commands, and give
6
+ `line-items --help` its own group page instead of generic top-level usage.
7
+
3
8
  ## 0.14.0 - 2026-08-20
4
9
 
5
10
  - Add `transactions --account-ref REF` using the opaque reference returned by
package/README.md CHANGED
@@ -15,7 +15,7 @@ sloth-agent --version
15
15
  For a one-off pinned run:
16
16
 
17
17
  ```bash
18
- npm exec --yes --package=@slothmoney/agent-cli@0.14.0 -- sloth-agent --help
18
+ npm exec --yes --package=@slothmoney/agent-cli@0.14.1 -- sloth-agent --help
19
19
  ```
20
20
 
21
21
  ## Authenticate
@@ -98,7 +98,7 @@ An assignment can change an owned transaction's sharing, categorisation, or
98
98
  both.
99
99
 
100
100
  Every command has built-in reference documentation covering its inputs,
101
- options, output, and examples:
101
+ options, output, and examples. For example:
102
102
 
103
103
  ```bash
104
104
  sloth-agent auth login --help
@@ -109,6 +109,7 @@ sloth-agent budget update --help
109
109
  sloth-agent budget move --help
110
110
  sloth-agent categories --help
111
111
  sloth-agent categories create --help
112
+ sloth-agent line-items --help
112
113
  sloth-agent line-items create --help
113
114
  sloth-agent transactions --help
114
115
  sloth-agent assign --help
package/dist/args.js CHANGED
@@ -803,7 +803,7 @@ function helpTopic(argv) {
803
803
  return 'line-items-create';
804
804
  if (subcommand === 'rename')
805
805
  return 'line-items-rename';
806
- return undefined;
806
+ return 'line-items';
807
807
  }
808
808
  if (command === 'budget') {
809
809
  if (subcommand === 'status')
package/dist/cli.js CHANGED
@@ -4,7 +4,7 @@ import { ICON_KEYS } from './category-metadata.js';
4
4
  import { parseApiResponse, validateAssignmentPayload, validateBudgetMovementResponse, validateBudgetUpdatePayload, } from './contracts.js';
5
5
  import { createSystemCredentialStore, secureStorageUnavailableError, } from './credential-store.js';
6
6
  import { ApiError, CliError, ConfigError, UsageError, } from './errors.js';
7
- export const CLI_VERSION = '0.14.0';
7
+ export const CLI_VERSION = '0.14.1';
8
8
  const REQUEST_TIMEOUT_MS = 60_000;
9
9
  const API_ORIGIN_HELP_LINES = [
10
10
  '',
@@ -56,7 +56,7 @@ export function usageText() {
56
56
  '',
57
57
  'Help:',
58
58
  ' Run sloth-agent <command> --help for options, inputs, output, and examples.',
59
- ' Auth and goal subcommands also have help, for example:',
59
+ ' Every nested subcommand has its own help, for example:',
60
60
  ' sloth-agent auth login --help',
61
61
  ' sloth-agent goals update --help',
62
62
  '',
@@ -176,6 +176,14 @@ export function categoriesHelpText() {
176
176
  '',
177
177
  'Read categories and the personal and joint line items within them.',
178
178
  '',
179
+ 'Commands:',
180
+ ' sloth-agent categories list List categories; "sloth-agent categories" is equivalent.',
181
+ ' sloth-agent categories create Preview or create a custom category.',
182
+ ' sloth-agent categories rename Preview or rename a custom category.',
183
+ '',
184
+ 'Help:',
185
+ ' Run sloth-agent categories <command> --help for command-specific details.',
186
+ '',
179
187
  'Usage:',
180
188
  ' sloth-agent categories [list] [--base-url URL]',
181
189
  '',
@@ -286,12 +294,35 @@ export function lineItemsCreateHelpText() {
286
294
  export function lineItemsRenameHelpText() {
287
295
  return lineItemsMutationHelpText('rename');
288
296
  }
297
+ export function lineItemsHelpText() {
298
+ return [
299
+ 'Sloth Agent CLI — line-items',
300
+ '',
301
+ 'Create or rename personal or joint budget line items.',
302
+ '',
303
+ 'Commands:',
304
+ ' sloth-agent line-items create Preview or create a scoped line item.',
305
+ ' sloth-agent line-items rename Preview or rename a scoped line item.',
306
+ '',
307
+ 'Help:',
308
+ ' Run sloth-agent line-items <command> --help for command-specific details.',
309
+ ...API_ORIGIN_HELP_LINES,
310
+ ].join('\n');
311
+ }
289
312
  export function accountsHelpText() {
290
313
  return [
291
314
  'Sloth Agent CLI — accounts',
292
315
  '',
293
316
  'Read the existing Sloth account inventory known to the authenticated user.',
294
317
  '',
318
+ 'Commands:',
319
+ ' sloth-agent accounts list List accounts; "sloth-agent accounts" is equivalent.',
320
+ ' sloth-agent accounts update Preview or update an owned account.',
321
+ ' sloth-agent accounts remove Preview or archive an owned manual account.',
322
+ '',
323
+ 'Help:',
324
+ ' Run sloth-agent accounts <command> --help for command-specific details.',
325
+ '',
295
326
  'Usage:',
296
327
  ' sloth-agent accounts [list] [--base-url URL]',
297
328
  '',
@@ -402,6 +433,15 @@ export function budgetHelpText() {
402
433
  '',
403
434
  'Read one personal or joint budget period.',
404
435
  '',
436
+ 'Commands:',
437
+ ' sloth-agent budget Read one budget period.',
438
+ ' sloth-agent budget status Read assigned, spent, and available money.',
439
+ ' sloth-agent budget update Preview or update planned line-item amounts.',
440
+ ' sloth-agent budget move Preview or move assigned money.',
441
+ '',
442
+ 'Help:',
443
+ ' Run sloth-agent budget <command> --help for command-specific details.',
444
+ '',
405
445
  'Usage:',
406
446
  ' sloth-agent budget --scope personal|joint [--period YYYY-MM] [--base-url URL]',
407
447
  '',
@@ -913,6 +953,7 @@ export function commandHelpText(topic) {
913
953
  categories: categoriesHelpText,
914
954
  'categories-create': categoriesCreateHelpText,
915
955
  'categories-rename': categoriesRenameHelpText,
956
+ 'line-items': lineItemsHelpText,
916
957
  'line-items-create': lineItemsCreateHelpText,
917
958
  'line-items-rename': lineItemsRenameHelpText,
918
959
  transactions: transactionsHelpText,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slothmoney/agent-cli",
3
- "version": "0.14.0",
3
+ "version": "0.14.1",
4
4
  "description": "Command-line access to the Sloth Money Agent API.",
5
5
  "type": "module",
6
6
  "bin": {