aliasmate 1.5.1 → 1.6.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.
Files changed (62) hide show
  1. package/CHANGELOG.md +125 -0
  2. package/README.md +304 -3
  3. package/dist/cli.js +99 -13
  4. package/dist/cli.js.map +1 -1
  5. package/dist/commands/alias.d.ts +30 -0
  6. package/dist/commands/alias.d.ts.map +1 -0
  7. package/dist/commands/alias.js +213 -0
  8. package/dist/commands/alias.js.map +1 -0
  9. package/dist/commands/completion.d.ts +17 -0
  10. package/dist/commands/completion.d.ts.map +1 -0
  11. package/dist/commands/completion.js +363 -0
  12. package/dist/commands/completion.js.map +1 -0
  13. package/dist/commands/edit.d.ts +2 -1
  14. package/dist/commands/edit.d.ts.map +1 -1
  15. package/dist/commands/edit.js +44 -1
  16. package/dist/commands/edit.js.map +1 -1
  17. package/dist/commands/export.d.ts +7 -3
  18. package/dist/commands/export.d.ts.map +1 -1
  19. package/dist/commands/export.js +23 -10
  20. package/dist/commands/export.js.map +1 -1
  21. package/dist/commands/list.d.ts +4 -1
  22. package/dist/commands/list.d.ts.map +1 -1
  23. package/dist/commands/list.js +14 -71
  24. package/dist/commands/list.js.map +1 -1
  25. package/dist/commands/recent.d.ts +24 -0
  26. package/dist/commands/recent.d.ts.map +1 -0
  27. package/dist/commands/recent.js +132 -0
  28. package/dist/commands/recent.js.map +1 -0
  29. package/dist/commands/run.d.ts +6 -1
  30. package/dist/commands/run.d.ts.map +1 -1
  31. package/dist/commands/run.js +123 -11
  32. package/dist/commands/run.js.map +1 -1
  33. package/dist/commands/save.d.ts +2 -1
  34. package/dist/commands/save.d.ts.map +1 -1
  35. package/dist/commands/save.js +44 -1
  36. package/dist/commands/save.js.map +1 -1
  37. package/dist/commands/validate.d.ts +10 -0
  38. package/dist/commands/validate.d.ts.map +1 -0
  39. package/dist/commands/validate.js +162 -0
  40. package/dist/commands/validate.js.map +1 -0
  41. package/dist/utils/constants.d.ts +1 -1
  42. package/dist/utils/constants.js +1 -1
  43. package/dist/utils/formatters.d.ts +30 -0
  44. package/dist/utils/formatters.d.ts.map +1 -0
  45. package/dist/utils/formatters.js +188 -0
  46. package/dist/utils/formatters.js.map +1 -0
  47. package/dist/utils/llm-generator.d.ts.map +1 -1
  48. package/dist/utils/llm-generator.js +489 -27
  49. package/dist/utils/llm-generator.js.map +1 -1
  50. package/dist/utils/onboarding.d.ts.map +1 -1
  51. package/dist/utils/onboarding.js +57 -3
  52. package/dist/utils/onboarding.js.map +1 -1
  53. package/dist/utils/recent.d.ts +55 -0
  54. package/dist/utils/recent.d.ts.map +1 -0
  55. package/dist/utils/recent.js +102 -0
  56. package/dist/utils/recent.js.map +1 -0
  57. package/dist/utils/validator.d.ts +56 -0
  58. package/dist/utils/validator.d.ts.map +1 -0
  59. package/dist/utils/validator.js +413 -0
  60. package/dist/utils/validator.js.map +1 -0
  61. package/package.json +1 -1
  62. package/whats-new.json +48 -0
package/CHANGELOG.md CHANGED
@@ -5,6 +5,131 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+
9
+ ## [1.6.1] - 2026-01-24
10
+
11
+ ### Fixed
12
+ - **Onboarding Version Detection**
13
+ - Fixed bug where downgrade scenarios incorrectly showed "upgraded" message
14
+ - Added version comparison to distinguish upgrades from downgrades
15
+ - Now shows helpful "outdated version" message when running older version
16
+ - Encourages users to upgrade to latest version with feature highlights
17
+ - Properly handles version transitions in both directions
18
+
19
+ ### Changed
20
+ - **User Experience**
21
+ - Outdated version message now displays available features from newer versions
22
+ - Clear upgrade instructions with npm command
23
+ - Motivational messaging to encourage staying on latest version
24
+
25
+ ## [1.6.0] - 2026-01-22
26
+
27
+ ### Added
28
+
29
+ #### Command Aliases (f1)
30
+ - **New `alias` command** - Create short aliases for frequently used saved commands
31
+ - `aliasmate alias <shortname> <commandname>` - Create/update alias
32
+ - `aliasmate alias --list` - Display all aliases with target commands
33
+ - `aliasmate alias --remove <alias>` - Delete an alias
34
+ - **Alias resolution in run command** - Automatically resolves aliases before execution
35
+ - **Comprehensive validation**:
36
+ - Prevents conflicts with reserved command names (save, run, list, etc.)
37
+ - Validates alias name format (alphanumeric, dash, underscore only)
38
+ - Checks if target command exists
39
+ - **Metadata storage** - Aliases stored separately from commands in metadata.json
40
+ - **21 comprehensive tests** covering all alias functionality
41
+
42
+ #### Recent Commands (f2)
43
+ - **New `recent` command** - Track and display recently executed commands
44
+ - `aliasmate recent` - Show recent commands with timestamps
45
+ - `aliasmate recent --limit <N>` - Limit displayed commands
46
+ - `aliasmate recent --clear` - Clear execution history
47
+ - **@N syntax for quick re-execution** - Run recent commands by index
48
+ - `aliasmate run @0` - Run most recent command
49
+ - `aliasmate run @1` - Run second most recent
50
+ - Works seamlessly with existing run command
51
+ - **Execution tracking** - Automatic recording of all command executions
52
+ - **Smart display features**:
53
+ - Deduplicated command list (shows unique commands only)
54
+ - Time-ago formatting (e.g., "2 minutes ago", "3 hours ago")
55
+ - Execution count for frequently used commands
56
+ - Configurable history size (default: 50 entries)
57
+ - **33 comprehensive tests** covering all recent command functionality
58
+
59
+ #### Auto-completion Support (f3)
60
+ - **New `completion` command** - Generate shell completion scripts
61
+ - `aliasmate completion bash` - Bash completion
62
+ - `aliasmate completion zsh` - Zsh completion
63
+ - `aliasmate completion fish` - Fish completion
64
+ - **Dynamic completion** for saved command names
65
+ - **Complete flag and option support**:
66
+ - All command flags (--dry-run, --verbose, --format, etc.)
67
+ - Format options (json, yaml, table, compact)
68
+ - File path completion for import/export
69
+ - **Installation instructions** added to README
70
+ - **22 comprehensive tests** for all three shell types
71
+
72
+ #### Dry Run Mode (f4)
73
+ - **`--dry-run` flag for run command** - Preview without execution
74
+ - **`--verbose` flag** - Detailed preview with full environment variable listing
75
+ - **Preview information displayed**:
76
+ - Full command to be executed
77
+ - Working directory and path mode
78
+ - Environment variables (count and details)
79
+ - Dangerous command detection and warnings
80
+ - **Security features**:
81
+ - Sensitive environment variable masking
82
+ - Color-coded warnings for dangerous commands (rm -rf, dd, mkfs, etc.)
83
+ - **No side effects** - Execution history not recorded in dry-run mode
84
+ - **15+ comprehensive tests** integrated with run command tests
85
+
86
+ #### Command Validation (f5)
87
+ - **New `validate` command** - Verify commands and their context
88
+ - `aliasmate validate <name>` - Validate single command
89
+ - `aliasmate validate --all` - Batch validate all commands
90
+ - **Validation integration in save/edit**:
91
+ - `aliasmate save --no-validate` - Skip validation when saving
92
+ - `aliasmate edit <name> --no-validate` - Skip validation when editing
93
+ - **Comprehensive validation checks**:
94
+ - Command existence (PATH lookup, builtin detection)
95
+ - Directory existence and permissions
96
+ - Basic shell syntax validation (quotes, brackets, pipes, operators)
97
+ - Environment variable name validation
98
+ - **Detailed validation reports**:
99
+ - Errors (block execution): command not found, invalid syntax, directory issues
100
+ - Warnings (allow with notice): undefined env vars, shell operators
101
+ - Separate reporting for errors vs warnings
102
+ - **73 comprehensive tests** covering all validation scenarios
103
+
104
+ #### Output Formatting Options (f6)
105
+ - **`--format` flag for list command** - Multiple output formats
106
+ - `--format table` - Default human-readable table (default)
107
+ - `--format json` - Machine-readable JSON
108
+ - `--format yaml` - YAML format
109
+ - `--format compact` - One-line-per-command format
110
+ - **`--format` flag for export command** - Export in JSON or YAML
111
+ - **All formats include complete data**:
112
+ - Command details, directory, path mode
113
+ - Environment variables
114
+ - Timestamps (createdAt, updatedAt)
115
+ - **Use cases**: CI/CD integration, scripting, automation, team sharing
116
+ - **20+ comprehensive tests** for all format types
117
+
118
+ ### Changed
119
+ - **Run command enhanced** with alias resolution and @N syntax support
120
+ - **Save/Edit commands** now support optional validation bypass
121
+ - **List/Export commands** now support multiple output formats
122
+ - **Execution tracking** automatically records all successful and failed executions
123
+ - **Documentation updated** with comprehensive Phase 1 feature details
124
+
125
+ ### Developer Notes
126
+ - **Total new code**: 1,673 lines of implementation
127
+ - **Total new tests**: 2,180 lines across 7 test files
128
+ - **Test coverage**: 159+ tests, 436 passing
129
+ - **Zero breaking changes** - All features are backward compatible
130
+ - **Metadata separation** - New metadata.json file for aliases and execution history
131
+ - **Feature completion**: 100% of Phase 1 deliverables (52/52 completed)
132
+
8
133
  ## [1.5.1] - 2026-01-14
9
134
 
10
135
  ### Fixed
package/README.md CHANGED
@@ -27,9 +27,15 @@ Whether you're a solo developer or part of a team, AliasMate helps you streamlin
27
27
  - 🌍 **Environment variable capture** - Save and restore environment variables with commands
28
28
  - 🔒 **Security-focused** - Automatic masking of sensitive variables (API keys, tokens)
29
29
  - ⚡ **Quick execution** of saved commands with optional path override
30
+ - 🏷️ **Command aliases** - Create short aliases for frequently used commands
31
+ - 📜 **Recent commands** - Track and quickly re-run recent commands with @N syntax
32
+ - ⚙️ **Auto-completion** - Shell completion for bash, zsh, and fish
33
+ - 🔍 **Dry-run mode** - Preview commands before execution with --dry-run flag
34
+ - ✅ **Command validation** - Verify commands and directories when saving
35
+ - 📊 **Output formatting** - Multiple formats (JSON, YAML, table, compact)
30
36
  - 📝 **Interactive save** with prompts for command and path
31
37
  - 📋 **List all saved commands** with their details
32
- - 🔍 **Search commands** by name, text, or directory
38
+ - 🔎 **Search commands** by name, text, or directory
33
39
  - ✏️ **Edit commands** interactively with environment variable management
34
40
  - 🗑️ **Delete unwanted commands**
35
41
  - 📤 **Export/Import** commands for backup or sharing
@@ -47,6 +53,58 @@ Install globally via npm:
47
53
  npm i -g aliasmate
48
54
  ```
49
55
 
56
+ ## Shell Completion (Optional)
57
+
58
+ AliasMate supports auto-completion for bash, zsh, and fish shells. This provides tab completion for commands, saved command names, and flags.
59
+
60
+ ### Bash
61
+
62
+ Add to your `~/.bashrc`:
63
+ ```bash
64
+ source <(aliasmate completion bash)
65
+ ```
66
+
67
+ Then reload:
68
+ ```bash
69
+ source ~/.bashrc
70
+ ```
71
+
72
+ ### Zsh
73
+
74
+ Add to your `~/.zshrc`:
75
+ ```bash
76
+ source <(aliasmate completion zsh)
77
+ ```
78
+
79
+ Then reload:
80
+ ```bash
81
+ source ~/.zshrc
82
+ ```
83
+
84
+ ### Fish
85
+
86
+ Generate the completion file:
87
+ ```bash
88
+ aliasmate completion fish > ~/.config/fish/completions/aliasmate.fish
89
+ ```
90
+
91
+ Fish will automatically load it on next shell start.
92
+
93
+ ### What Gets Completed
94
+
95
+ - Main commands (run, list, save, etc.)
96
+ - Your saved command names
97
+ - Command flags and options
98
+ - File paths for import/export
99
+ - Format options (json, yaml, table, compact)
100
+
101
+ **Example:**
102
+ ```bash
103
+ aliasmate ru<TAB> # Completes to "run"
104
+ aliasmate run bu<TAB> # Completes to your saved "build" command
105
+ aliasmate list --fo<TAB> # Completes to "--format"
106
+ ```
107
+
50
108
  ## Shell Configuration (Recommended)
51
109
 
52
110
  For `aliasmate prev` to work reliably and capture commands immediately, configure your shell to write history in real-time:
@@ -142,6 +200,18 @@ aliasmate run <name> .
142
200
  aliasmate run <name> /path/to/another/project
143
201
  ```
144
202
 
203
+ **Dry-run mode** (preview without executing):
204
+ ```bash
205
+ aliasmate run <name> --dry-run
206
+ aliasmate run <name> --dry-run --verbose
207
+ ```
208
+
209
+ **Run recent commands** by index:
210
+ ```bash
211
+ aliasmate run @0 # Run most recent command
212
+ aliasmate run @1 # Run second most recent
213
+ ```
214
+
145
215
  **Example:**
146
216
  ```bash
147
217
  aliasmate run build
@@ -374,6 +444,222 @@ When you upgrade AliasMate, you'll automatically see:
374
444
 
375
445
  This ensures you never miss important features or fixes when upgrading!
376
446
 
447
+ ### Command Aliases
448
+
449
+ Create short aliases for frequently used saved commands:
450
+
451
+ ```bash
452
+ # Create an alias
453
+ aliasmate alias b build
454
+ aliasmate alias d deploy-prod
455
+
456
+ # List all aliases
457
+ aliasmate alias --list
458
+
459
+ # Remove an alias
460
+ aliasmate alias --remove b
461
+ ```
462
+
463
+ **Features:**
464
+ - Keyboard-friendly shortcuts for long command names
465
+ - Validates against reserved command names
466
+ - Shows both alias and original command when executing
467
+ - Stored separately from commands in metadata
468
+
469
+ **Example:**
470
+ ```bash
471
+ # Create aliases for common commands
472
+ aliasmate alias b build
473
+ aliasmate alias t test
474
+ aliasmate alias dp deploy-prod
475
+
476
+ # Use the aliases
477
+ aliasmate run b # Runs 'build' command
478
+ aliasmate run @0 # Runs most recent command
479
+ ```
480
+
481
+ ### Recent Commands
482
+
483
+ Track and quickly re-run recently executed commands:
484
+
485
+ ```bash
486
+ # View recent commands
487
+ aliasmate recent
488
+
489
+ # Limit the list
490
+ aliasmate recent --limit 10
491
+
492
+ # Clear history
493
+ aliasmate recent --clear
494
+ ```
495
+
496
+ **Quick re-execution with @N syntax:**
497
+ ```bash
498
+ aliasmate run @0 # Run most recent command
499
+ aliasmate run @1 # Run second most recent
500
+ aliasmate run @2 # Run third most recent
501
+ ```
502
+
503
+ **Features:**
504
+ - Automatic execution tracking
505
+ - Deduplicated display (shows unique commands)
506
+ - Shows last run time and execution count
507
+ - Configurable history size (default: 50)
508
+ - Time-ago formatting (e.g., "2 minutes ago")
509
+
510
+ ### Dry-Run Mode
511
+
512
+ Preview what will execute before running a command:
513
+
514
+ ```bash
515
+ # Basic preview
516
+ aliasmate run build --dry-run
517
+
518
+ # Detailed preview with env vars
519
+ aliasmate run build --dry-run --verbose
520
+ ```
521
+
522
+ **What you'll see:**
523
+ - Full command to be executed
524
+ - Working directory
525
+ - Path mode (saved/current/overridden)
526
+ - Environment variables (with sensitive values masked)
527
+ - Dangerous command warnings (rm -rf, dd, etc.)
528
+
529
+ **Example output:**
530
+ ```
531
+ 🔍 DRY RUN MODE - Command will NOT be executed
532
+
533
+ Command:
534
+ npm run build --production
535
+
536
+ Working Directory:
537
+ /path/to/project
538
+
539
+ Path Mode:
540
+ saved
541
+
542
+ Environment Variables:
543
+ 3 variable(s) will be loaded
544
+
545
+ NODE_ENV=production
546
+ API_URL=https://api.example.com
547
+ API_KEY=abc***xyz (masked)
548
+
549
+ ⚠️ WARNING: This command may be dangerous
550
+
551
+ To execute, run without --dry-run flag
552
+ ```
553
+
554
+ ### Command Validation
555
+
556
+ Validate commands when saving to catch errors early:
557
+
558
+ ```bash
559
+ # Validate a single command
560
+ aliasmate validate build
561
+
562
+ # Validate all commands
563
+ aliasmate validate --all
564
+
565
+ # Skip validation when saving (bypass checks)
566
+ aliasmate save --no-validate
567
+ aliasmate edit <name> --no-validate
568
+ ```
569
+
570
+ **What gets validated:**
571
+ - **Command existence:** Checks if command is in PATH or is a shell builtin
572
+ - **Directory existence:** Verifies directory exists and is accessible
573
+ - **Shell syntax:** Basic syntax validation (quotes, brackets, pipes)
574
+ - **Environment variables:** Validates variable name patterns
575
+
576
+ **Validation types:**
577
+ - **Errors:** Block command execution (red)
578
+ - Command not found
579
+ - Directory doesn't exist
580
+ - Invalid syntax
581
+
582
+ - **Warnings:** Allow execution with notice (yellow)
583
+ - Undefined environment variables
584
+ - Non-executable file paths
585
+
586
+ **Example:**
587
+ ```bash
588
+ $ aliasmate validate build
589
+
590
+ Validating command: build
591
+
592
+ ✓ No issues found
593
+ Command: npm run build
594
+ Directory: /path/to/project
595
+ Environment Variables: 2
596
+
597
+ $ aliasmate validate --all
598
+
599
+ Validating 15 saved commands...
600
+
601
+ ✓ 13 commands passed validation
602
+ ⚠ 2 commands have warnings
603
+
604
+ Commands with issues:
605
+ deploy: Warning - Command 'deploy.sh' not found in PATH
606
+ ```
607
+
608
+ ### Output Formatting
609
+
610
+ Export or view commands in multiple formats:
611
+
612
+ ```bash
613
+ # List in different formats
614
+ aliasmate list --format table # Default human-readable
615
+ aliasmate list --format json # Machine-readable JSON
616
+ aliasmate list --format yaml # YAML format
617
+ aliasmate list --format compact # One-line per command
618
+
619
+ # Export with format
620
+ aliasmate export commands.json --format json
621
+ aliasmate export commands.yaml --format yaml
622
+ ```
623
+
624
+ **Format examples:**
625
+
626
+ **JSON:**
627
+ ```json
628
+ {
629
+ "build": {
630
+ "command": "npm run build",
631
+ "directory": "/path/to/project",
632
+ "pathMode": "saved",
633
+ "env": { "NODE_ENV": "production" },
634
+ "createdAt": "2026-01-22T10:00:00Z"
635
+ }
636
+ }
637
+ ```
638
+
639
+ **YAML:**
640
+ ```yaml
641
+ build:
642
+ command: "npm run build"
643
+ directory: "/path/to/project"
644
+ pathMode: saved
645
+ env:
646
+ NODE_ENV: "production"
647
+ createdAt: "2026-01-22T10:00:00Z"
648
+ ```
649
+
650
+ **Compact:**
651
+ ```
652
+ build: npm run build (/path/to/project)
653
+ test: npm test (/path/to/project)
654
+ deploy: ./deploy.sh (/path/to/scripts)
655
+ ```
656
+
657
+ **Use cases:**
658
+ - CI/CD integration (JSON/YAML)
659
+ - Scripting and automation
660
+ - Quick scanning (compact)
661
+ - Team sharing with sensitive data masked
662
+
377
663
  ## Configuration
378
664
 
379
665
  Commands are stored in:
@@ -386,13 +672,28 @@ Commands are stored in:
386
672
  |---------|---------|-------------|
387
673
  | `aliasmate prev <name>` | - | Save the previous command from shell history (with optional env vars) |
388
674
  | `aliasmate run <name> [path]` | - | Run a saved command (restores env vars, optionally override directory) |
675
+ | `aliasmate run @N` | - | Run Nth recent command (e.g., @0 = most recent) |
676
+ | `aliasmate run <name> --dry-run` | - | Preview command without executing |
389
677
  | `aliasmate save` | - | Interactively save a new command (with optional env vars) |
678
+ | `aliasmate save --no-validate` | - | Save command without validation |
390
679
  | `aliasmate list` | `ls` | List all saved commands (shows env var indicators) |
680
+ | `aliasmate list --format <type>` | - | List in different formats (table/json/yaml/compact) |
391
681
  | `aliasmate search <query>` | `find` | Search for commands by name, text, or directory |
392
682
  | `aliasmate edit <name>` | - | Edit a saved command (manage env vars, path mode, etc.) |
683
+ | `aliasmate edit <name> --no-validate` | - | Edit command without validation |
393
684
  | `aliasmate delete <name>` | `rm` | Delete a saved command |
394
- | `aliasmate export <file>` | - | Export commands to a JSON file (sensitive vars masked) |
395
- | `aliasmate import <file>` | - | Import commands from a JSON file (auto backup) |
685
+ | `aliasmate export <file>` | - | Export commands to a file (sensitive vars masked) |
686
+ | `aliasmate export <file> --format <type>` | - | Export in JSON or YAML format |
687
+ | `aliasmate import <file>` | - | Import commands from a file (auto backup) |
688
+ | `aliasmate alias <short> <command>` | - | Create alias for a command |
689
+ | `aliasmate alias --list` | - | List all aliases |
690
+ | `aliasmate alias --remove <alias>` | - | Remove an alias |
691
+ | `aliasmate recent` | - | Show recently executed commands |
692
+ | `aliasmate recent --limit <N>` | - | Limit recent commands displayed |
693
+ | `aliasmate recent --clear` | - | Clear execution history |
694
+ | `aliasmate validate <name>` | - | Validate a single command |
695
+ | `aliasmate validate --all` | - | Validate all saved commands |
696
+ | `aliasmate completion <shell>` | - | Generate shell completion script (bash, zsh, fish) |
396
697
  | `aliasmate changelog` | `changes` | View version changelog and release notes |
397
698
  | `aliasmate config` | - | Show config file location and command count |
398
699
 
package/dist/cli.js CHANGED
@@ -16,6 +16,10 @@ const export_1 = require("./commands/export");
16
16
  const import_1 = require("./commands/import");
17
17
  const search_1 = require("./commands/search");
18
18
  const changelog_1 = require("./commands/changelog");
19
+ const alias_1 = require("./commands/alias");
20
+ const validate_1 = require("./commands/validate");
21
+ const recent_1 = require("./commands/recent");
22
+ const completion_1 = require("./commands/completion");
19
23
  const storage_1 = require("./storage");
20
24
  const constants_1 = require("./utils/constants");
21
25
  const onboarding_1 = require("./utils/onboarding");
@@ -37,13 +41,16 @@ program
37
41
  program
38
42
  .command('run <name> [path]')
39
43
  .description('Run a saved command (optionally override the working directory)')
40
- .action((name, path) => {
41
- void (0, run_1.runCommand)(name, path);
44
+ .option('--dry-run', 'Preview what will execute without actually running the command')
45
+ .option('--verbose', 'Show detailed information (use with --dry-run)')
46
+ .action((name, path, options) => {
47
+ void (0, run_1.runCommand)(name, path, options.dryRun, options.verbose);
42
48
  });
43
49
  // save command - interactively save a new command
44
50
  program
45
51
  .command('save')
46
52
  .description('Interactively save a new command')
53
+ .option('--no-validate', 'Skip validation checks')
47
54
  .action(() => {
48
55
  void (0, save_1.saveCommand)(process.cwd());
49
56
  });
@@ -52,8 +59,14 @@ program
52
59
  .command('list')
53
60
  .alias('ls')
54
61
  .description('List all saved commands')
55
- .action(() => {
56
- (0, list_1.listCommand)();
62
+ .option('--format <type>', 'Output format: table, json, yaml, compact', 'table')
63
+ .action((options) => {
64
+ const format = options.format || 'table';
65
+ if (!['table', 'json', 'yaml', 'compact'].includes(format)) {
66
+ console.error(chalk_1.default.red(`Error: Invalid format "${format}". Must be: table, json, yaml, or compact`));
67
+ process.exit(1);
68
+ }
69
+ (0, list_1.listCommand)(format);
57
70
  });
58
71
  // search commands
59
72
  program
@@ -63,6 +76,15 @@ program
63
76
  .action((query) => {
64
77
  (0, search_1.searchCommand)(query);
65
78
  });
79
+ // recent commands
80
+ program
81
+ .command('recent')
82
+ .description('Show recently executed commands')
83
+ .option('--limit <number>', 'Maximum number of commands to display', parseInt)
84
+ .option('--clear', 'Clear execution history')
85
+ .action((options) => {
86
+ (0, recent_1.recentCommand)(options);
87
+ });
66
88
  // delete command
67
89
  program
68
90
  .command('delete <name>')
@@ -75,15 +97,22 @@ program
75
97
  program
76
98
  .command('edit <name>')
77
99
  .description('Edit a saved command')
78
- .action((name) => {
79
- void (0, edit_1.editCommand)(name);
100
+ .option('--no-validate', 'Skip validation checks')
101
+ .action((name, options) => {
102
+ void (0, edit_1.editCommand)(name, options.validate !== false);
80
103
  });
81
104
  // export commands
82
105
  program
83
106
  .command('export <file>')
84
- .description('Export all saved commands to a JSON file')
85
- .action((file) => {
86
- (0, export_1.exportCommand)(file);
107
+ .description('Export all saved commands to a file')
108
+ .option('--format <type>', 'Output format: json, yaml', 'json')
109
+ .action((file, options) => {
110
+ const format = options.format || 'json';
111
+ if (!['json', 'yaml'].includes(format)) {
112
+ console.error(chalk_1.default.red(`Error: Invalid format "${format}". Must be: json or yaml`));
113
+ process.exit(1);
114
+ }
115
+ (0, export_1.exportCommand)(file, format);
87
116
  });
88
117
  // import commands
89
118
  program
@@ -94,6 +123,52 @@ program
94
123
  });
95
124
  // Add changelog command
96
125
  program.addCommand((0, changelog_1.createChangelogCommand)());
126
+ // alias command - create, list, and remove command aliases
127
+ program
128
+ .command('alias [shortAlias] [commandName]')
129
+ .description('Create, list, or remove command aliases')
130
+ .option('--list', 'List all aliases')
131
+ .option('--remove <alias>', 'Remove an alias')
132
+ .action((shortAlias, commandName, options) => {
133
+ if (options.list) {
134
+ (0, alias_1.listAliasesCommand)();
135
+ }
136
+ else if (options.remove) {
137
+ (0, alias_1.removeAliasCommand)(options.remove);
138
+ }
139
+ else if (shortAlias && commandName) {
140
+ (0, alias_1.createAliasCommand)(shortAlias, commandName);
141
+ }
142
+ else if (!shortAlias && !commandName) {
143
+ // No arguments provided, show list by default
144
+ (0, alias_1.listAliasesCommand)();
145
+ }
146
+ else {
147
+ console.error(chalk_1.default.red('Error: Invalid arguments'));
148
+ console.log(chalk_1.default.yellow('Usage:'));
149
+ console.log(chalk_1.default.gray(' aliasmate alias <alias-name> <command-name> - Create an alias'));
150
+ console.log(chalk_1.default.gray(' aliasmate alias --list - List all aliases'));
151
+ console.log(chalk_1.default.gray(' aliasmate alias --remove <alias-name> - Remove an alias'));
152
+ process.exit(1);
153
+ }
154
+ });
155
+ // validate command - validate commands
156
+ program
157
+ .command('validate [name]')
158
+ .description('Validate a command or all commands')
159
+ .option('--all', 'Validate all saved commands')
160
+ .action((name, options) => {
161
+ if (options.all) {
162
+ (0, validate_1.validateAllCommands)();
163
+ }
164
+ else if (name) {
165
+ (0, validate_1.validateCommand)(name);
166
+ }
167
+ else {
168
+ // No arguments, validate all by default
169
+ (0, validate_1.validateAllCommands)();
170
+ }
171
+ });
97
172
  // config command - show config location
98
173
  program
99
174
  .command('config')
@@ -106,6 +181,13 @@ program
106
181
  console.log(chalk_1.default.gray(` Config file: ${(0, storage_1.getConfigPath)()}`));
107
182
  console.log(chalk_1.default.gray(` Saved commands: ${commandCount}`));
108
183
  });
184
+ // completion command - generate shell completion scripts
185
+ program
186
+ .command('completion [shell]')
187
+ .description('Generate shell completion script (bash, zsh, or fish)')
188
+ .action((shell) => {
189
+ (0, completion_1.completionCommand)(shell);
190
+ });
109
191
  // Handle unknown commands
110
192
  program.on('command:*', () => {
111
193
  console.error(chalk_1.default.red('Error: Unknown command "%s"'), program.args.join(' '));
@@ -115,12 +197,16 @@ program.on('command:*', () => {
115
197
  console.log(chalk_1.default.gray(' save - Interactively save a command'));
116
198
  console.log(chalk_1.default.gray(' list (ls) - List all saved commands'));
117
199
  console.log(chalk_1.default.gray(' search <query> - Search for commands'));
200
+ console.log(chalk_1.default.gray(' recent - Show recently executed commands'));
118
201
  console.log(chalk_1.default.gray(' edit <name> - Edit a saved command'));
119
- console.log(chalk_1.default.gray(' dhangelog - View version changelog'));
120
- console.log(chalk_1.default.gray(' celete <name> - Delete a saved command'));
121
- console.log(chalk_1.default.gray(' export <file> - Export commands to JSON'));
122
- console.log(chalk_1.default.gray(' import <file> - Import commands from JSON'));
202
+ console.log(chalk_1.default.gray(' delete <name> - Delete a saved command'));
203
+ console.log(chalk_1.default.gray(' export <file> - Export commands to file'));
204
+ console.log(chalk_1.default.gray(' import <file> - Import commands from file'));
205
+ console.log(chalk_1.default.gray(' alias [...] - Create, list, or remove aliases'));
206
+ console.log(chalk_1.default.gray(' validate [name] - Validate command(s)'));
207
+ console.log(chalk_1.default.gray(' changelog - View version changelog'));
123
208
  console.log(chalk_1.default.gray(' config - Show config file location'));
209
+ console.log(chalk_1.default.gray(' completion [shell]- Generate shell completion script'));
124
210
  console.log(chalk_1.default.yellow('\nUse --help for more information.'));
125
211
  process.exit(1);
126
212
  });
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;;;;;AAEA,yCAAoC;AACpC,kDAA0B;AAC1B,0CAA8C;AAC9C,wCAA4C;AAC5C,0CAA8C;AAC9C,0CAA8C;AAC9C,8CAAkD;AAClD,0CAA8C;AAC9C,8CAAkD;AAClD,8CAAkD;AAClD,8CAAkD;AAClD,oDAA8D;AAC9D,uCAA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