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
@@ -66,6 +66,9 @@ AliasMate is a powerful CLI utility that saves, manages, and re-runs shell comma
66
66
  - Option to override execution directory (use current or saved path)
67
67
  - Support for both absolute and relative path overrides
68
68
  - Environment variable capture and restoration
69
+ - Dry-run mode to preview commands before execution
70
+ - Recent command tracking with @N syntax (@0 = most recent)
71
+ - Alias resolution for keyboard-friendly shortcuts
69
72
 
70
73
  ### 3. Command Management
71
74
  - List all saved commands with full details
@@ -74,6 +77,10 @@ AliasMate is a powerful CLI utility that saves, manages, and re-runs shell comma
74
77
  - Delete unwanted commands
75
78
  - Export/import commands for backup and team sharing
76
79
  - View changelog and version history
80
+ - Create aliases for frequently used commands
81
+ - Track recent command executions
82
+ - Validate commands before saving
83
+ - Multiple output formats (JSON, YAML, table, compact)
77
84
 
78
85
  ## Available Commands
79
86
 
@@ -91,7 +98,16 @@ Execute a saved command.
91
98
  - Supports path mode (saved vs current directory)
92
99
  - Restores saved environment variables
93
100
  - Warns about environment variable differences
94
- - Example: \`aliasmate run build\` or \`aliasmate run build .\`
101
+ - Dry-run mode: \`--dry-run\` to preview without executing
102
+ - Verbose mode: \`--verbose\` for detailed dry-run output
103
+ - @N syntax: \`aliasmate run @0\` to run most recent command
104
+ - Alias support: Automatically resolves command aliases
105
+ - Examples:
106
+ - \`aliasmate run build\`
107
+ - \`aliasmate run build .\`
108
+ - \`aliasmate run build --dry-run\`
109
+ - \`aliasmate run @0\` (most recent command)
110
+ - \`aliasmate run @1\` (second most recent)
95
111
 
96
112
  ### aliasmate save
97
113
  Interactively create a new saved command.
@@ -100,14 +116,23 @@ Interactively create a new saved command.
100
116
  - Prompts for working directory
101
117
  - Prompts for path mode preference
102
118
  - Optionally capture environment variables
103
- - Example: \`aliasmate save\`
119
+ - Optional validation: \`--no-validate\` to skip validation
120
+ - Example: \`aliasmate save\` or \`aliasmate save --no-validate\`
104
121
 
105
122
  ### aliasmate list (alias: ls)
106
123
  Display all saved commands.
107
124
  - Shows command name, actual command, and directory
108
125
  - Displays path mode for each command
109
126
  - Color-coded output for readability
110
- - Example: \`aliasmate list\`
127
+ - Multiple format options: \`--format <type>\`
128
+ - \`table\` - Default human-readable table
129
+ - \`json\` - Machine-readable JSON
130
+ - \`yaml\` - YAML format
131
+ - \`compact\` - One-line per command
132
+ - Examples:
133
+ - \`aliasmate list\`
134
+ - \`aliasmate list --format json\`
135
+ - \`aliasmate list --format yaml\`
111
136
 
112
137
  ### aliasmate search <query> (alias: find)
113
138
  Search for commands by keyword.
@@ -115,8 +140,14 @@ Search for commands by keyword.
115
140
  - Case-insensitive matching
116
141
  - Example: \`aliasmate search deploy\`
117
142
 
118
- ##Manage environment variables
119
- - Example: \`aliasmate edit build\`
143
+ ### aliasmate edit <name>
144
+ Edit an existing saved command.
145
+ - Modify command, directory, or path mode
146
+ - Manage environment variables
147
+ - Optional validation bypass: \`--no-validate\`
148
+ - Examples:
149
+ - \`aliasmate edit build\`
150
+ - \`aliasmate edit build --no-validate\`
120
151
 
121
152
  ### aliasmate delete <name> (alias: rm)
122
153
  Remove a saved command.
@@ -124,11 +155,16 @@ Remove a saved command.
124
155
  - Example: \`aliasmate delete old-build\`
125
156
 
126
157
  ### aliasmate export <file>
127
- Export all commands to a JSON file.
158
+ Export all commands to a file.
128
159
  - Backup your commands
129
160
  - Share with team members
130
161
  - Includes environment variables (sensitive ones are masked)
131
- - Example: \`aliasmate export my-commands.json\`
162
+ - Multiple format options: \`--format <type>\`
163
+ - \`json\` - JSON format (default)
164
+ - \`yaml\` - YAML format
165
+ - Examples:
166
+ - \`aliasmate export my-commands.json\`
167
+ - \`aliasmate export my-commands.yaml --format yaml\`
132
168
 
133
169
  ### aliasmate import <file>
134
170
  Import commands from a JSON file.
@@ -152,11 +188,56 @@ View version changelog and release notes.
152
188
  Show configuration details.
153
189
  - Display config directory and file path
154
190
  - Show number of saved commands
155
- - Example: \`aliasmate config
156
- - Restore from backup
157
- - Load teammate's commands
158
- - Prompts before overwriting existing commands
159
- - Example: \`aliasmate import my-commands.json\`
191
+ - Example: \`aliasmate config\`
192
+
193
+ ### aliasmate alias <shortname> <commandname>
194
+ Create or update command aliases.
195
+ - Create keyboard-friendly shortcuts
196
+ - Validates against reserved command names
197
+ - Automatic target command validation
198
+ - Examples:
199
+ - \`aliasmate alias b build\` - Create alias
200
+ - \`aliasmate alias --list\` - List all aliases
201
+ - \`aliasmate alias --remove b\` - Remove alias
202
+
203
+ ### aliasmate recent
204
+ View and manage recently executed commands.
205
+ - Shows command execution history with timestamps
206
+ - Displays execution count for each command
207
+ - Time-ago formatting (e.g., "2 minutes ago")
208
+ - Limit results: \`--limit <N>\`
209
+ - Clear history: \`--clear\`
210
+ - Examples:
211
+ - \`aliasmate recent\` - Show recent commands
212
+ - \`aliasmate recent --limit 10\` - Show last 10
213
+ - \`aliasmate recent --clear\` - Clear history
214
+
215
+ ### aliasmate validate <name>
216
+ Validate commands and their context.
217
+ - Checks command existence in PATH
218
+ - Verifies directory exists and is accessible
219
+ - Validates shell syntax (quotes, brackets, pipes)
220
+ - Validates environment variable patterns
221
+ - Batch validation: \`--all\` flag
222
+ - Examples:
223
+ - \`aliasmate validate build\` - Validate one command
224
+ - \`aliasmate validate --all\` - Validate all commands
225
+
226
+ ### aliasmate completion <shell>
227
+ Generate shell completion scripts.
228
+ - Supports bash, zsh, and fish shells
229
+ - Dynamic completion for command names
230
+ - Completes flags and options
231
+ - File path completion for import/export
232
+ - Examples:
233
+ - \`aliasmate completion bash\` - Generate bash completion
234
+ - \`aliasmate completion zsh\` - Generate zsh completion
235
+ - \`aliasmate completion fish\` - Generate fish completion
236
+
237
+ Installation:
238
+ - Bash: \`source <(aliasmate completion bash)\`
239
+ - Zsh: \`source <(aliasmate completion zsh)\`
240
+ - Fish: \`aliasmate completion fish > ~/.config/fish/completions/aliasmate.fish\`
160
241
 
161
242
  ### aliasmate llm
162
243
  Generate this llm.txt file (default command).
@@ -235,20 +316,241 @@ Each saved command can have a path mode that determines where it executes:
235
316
 
236
317
  You can choose the path mode when saving or editing a command.
237
318
 
238
- ## Configuration
319
+ ## Command Aliases Feature
239
320
 
240
- ### Storage Location
241
- 6. **Environment Variables**: Capture when needed
242
- - Use for commands that need specific env vars
243
- - Review sensitive variables before saving
244
- - Keep environment variables updated with \`edit\` command
321
+ Create short aliases for frequently used commands to speed up your workflow:
322
+
323
+ ### Creating Aliases
324
+ - \`aliasmate alias <short> <command>\` - Create an alias
325
+ - Example: \`aliasmate alias b build\` creates shortcut "b" for "build"
326
+
327
+ ### Using Aliases
328
+ - Run aliased commands: \`aliasmate run b\` (runs the "build" command)
329
+ - Aliases are resolved automatically before execution
330
+ - Shows both alias and original command name when running
331
+
332
+ ### Managing Aliases
333
+ - List all: \`aliasmate alias --list\`
334
+ - Remove: \`aliasmate alias --remove <alias>\`
335
+ - Update: Create alias with same name (overwrites with warning)
336
+
337
+ ### Validation
338
+ - Prevents conflicts with reserved names (save, run, list, etc.)
339
+ - Only alphanumeric, dash, and underscore allowed
340
+ - Verifies target command exists
341
+
342
+ ## Recent Commands Feature
343
+
344
+ Track command execution history and quickly re-run recent commands:
345
+
346
+ ### Viewing Recent Commands
347
+ - \`aliasmate recent\` - Show recent executions
348
+ - \`--limit <N>\` - Limit results (e.g., \`aliasmate recent --limit 10\`)
349
+ - Shows: command name, last run time, execution count
350
+ - Time-ago formatting: "2 minutes ago", "3 hours ago", etc.
351
+
352
+ ### Quick Re-execution with @N Syntax
353
+ - \`@0\` - Most recent command
354
+ - \`@1\` - Second most recent
355
+ - \`@2\` - Third most recent
356
+ - Example: \`aliasmate run @0\` (re-run last command)
357
+
358
+ ### Execution Tracking
359
+ - Automatic tracking on every command execution
360
+ - Records both successful and failed executions
361
+ - Configurable history size (default: 50 entries)
362
+ - NOT recorded in dry-run mode
363
+
364
+ ### Managing History
365
+ - Clear history: \`aliasmate recent --clear\`
366
+ - Deduplicated display (unique commands only)
367
+ - Stored in metadata.json separately from commands
368
+
369
+ ## Dry-Run Mode Feature
245
370
 
246
- 7. **Stay Updated**: Check changelog regularly
247
- - Run \`aliasmate changelog\` to see new features
248
- - Update to latest version for bug fixes and improvements
371
+ Preview commands before execution to verify what will run:
372
+
373
+ ### Basic Dry-Run
374
+ \`\`\`bash
375
+ aliasmate run build --dry-run
376
+ \`\`\`
377
+
378
+ Displays:
379
+ - Full command to be executed
380
+ - Working directory
381
+ - Path mode (saved/current/overridden)
382
+ - Environment variable count
383
+
384
+ ### Verbose Dry-Run
385
+ \`\`\`bash
386
+ aliasmate run build --dry-run --verbose
387
+ \`\`\`
388
+
389
+ Shows detailed information:
390
+ - All environment variables (with values)
391
+ - Sensitive variables are masked (e.g., API_KEY=abc***xyz)
392
+ - Complete execution context
393
+
394
+ ### Safety Features
395
+ - Dangerous command detection (rm -rf, dd, mkfs, format, etc.)
396
+ - Color-coded warnings (red for dangers, yellow for cautions)
397
+ - No side effects (execution history not recorded)
398
+ - Perfect for verifying destructive or long-running commands
399
+
400
+ ## Command Validation Feature
401
+
402
+ Validate commands when saving to catch errors early:
403
+
404
+ ### Automatic Validation
405
+ - Enabled by default when using \`save\` or \`edit\` commands
406
+ - Can be bypassed with \`--no-validate\` flag
407
+
408
+ ### What Gets Validated
409
+
410
+ **Command Existence:**
411
+ - Checks if command exists in system PATH
412
+ - Recognizes shell builtins (cd, echo, export, etc.)
413
+ - Validates executable file paths
414
+
415
+ **Directory Validation:**
416
+ - Verifies directory exists
417
+ - Checks read/execute permissions
418
+ - Warns if directory not writable
419
+
420
+ **Shell Syntax:**
421
+ - Unmatched quotes (single, double, backtick)
422
+ - Unmatched brackets, braces, parentheses
423
+ - Invalid pipe usage
424
+ - Invalid operators
425
+
426
+ **Environment Variables:**
427
+ - Valid variable name patterns
428
+ - Undefined variable warnings
429
+ - Special character detection
430
+
431
+ ### Validation Reports
432
+ - **Errors** (red) - Block execution:
433
+ - Command not found
434
+ - Directory doesn't exist
435
+ - Invalid syntax
436
+
437
+ - **Warnings** (yellow) - Allow with notice:
438
+ - Undefined environment variables
439
+ - Shell operators detected
440
+ - Non-executable paths
441
+
442
+ ### Manual Validation
443
+ \`\`\`bash
444
+ # Validate single command
445
+ aliasmate validate build
446
+
447
+ # Batch validate all commands
448
+ aliasmate validate --all
449
+ \`\`\`
450
+
451
+ Shows summary:
452
+ - ✓ Commands passed validation
453
+ - ⚠ Commands with warnings
454
+ - ✗ Commands with errors
455
+ - Detailed issue listing
456
+
457
+ ## Output Formatting Feature
458
+
459
+ Export and display commands in multiple formats for different use cases:
460
+
461
+ ### Available Formats
462
+
463
+ **Table (default)** - Human-readable display
464
+ \`\`\`bash
465
+ aliasmate list --format table
466
+ \`\`\`
467
+ Perfect for terminal viewing, color-coded output
468
+
469
+ **JSON** - Machine-readable, CI/CD integration
470
+ \`\`\`bash
471
+ aliasmate list --format json
472
+ aliasmate export commands.json --format json
473
+ \`\`\`
474
+ Ideal for scripting, automation, parsing
475
+
476
+ **YAML** - Human and machine-readable
477
+ \`\`\`bash
478
+ aliasmate list --format yaml
479
+ aliasmate export commands.yaml --format yaml
480
+ \`\`\`
481
+ Great for configuration management
482
+
483
+ **Compact** - One-line per command
484
+ \`\`\`bash
485
+ aliasmate list --format compact
486
+ \`\`\`
487
+ Quick scanning, minimal output
488
+
489
+ ### What's Included
490
+ All formats include:
491
+ - Command name and string
492
+ - Directory path
493
+ - Path mode (saved/current)
494
+ - Environment variables
495
+ - Timestamps (createdAt, updatedAt)
496
+
497
+ ### Use Cases
498
+ - **JSON/YAML**: CI/CD pipelines, automation scripts
499
+ - **Table**: Daily development workflow
500
+ - **Compact**: Quick reference, scripts with limited space
501
+ - **Export**: Team sharing (sensitive values masked)
249
502
 
503
+ ## Shell Completion Feature
504
+
505
+ Auto-completion support for enhanced productivity:
506
+
507
+ ### Supported Shells
508
+ - **Bash** - Most Linux distributions
509
+ - **Zsh** - macOS default, modern Linux
510
+ - **Fish** - Modern shell with enhanced features
511
+
512
+ ### What Gets Completed
513
+ - Main commands (run, list, save, edit, etc.)
514
+ - Your saved command names (dynamic)
515
+ - Command flags (--dry-run, --verbose, --format, etc.)
516
+ - Format options (json, yaml, table, compact)
517
+ - File paths (for import/export)
518
+
519
+ ### Installation
520
+
521
+ **Bash:**
522
+ \`\`\`bash
523
+ # Add to ~/.bashrc
524
+ source <(aliasmate completion bash)
525
+ # Then reload: source ~/.bashrc
526
+ \`\`\`
527
+
528
+ **Zsh:**
529
+ \`\`\`bash
530
+ # Add to ~/.zshrc
531
+ source <(aliasmate completion zsh)
532
+ # Then reload: source ~/.zshrc
533
+ \`\`\`
534
+
535
+ **Fish:**
536
+ \`\`\`bash
537
+ aliasmate completion fish > ~/.config/fish/completions/aliasmate.fish
538
+ # Fish auto-loads on next shell start
539
+ \`\`\`
540
+
541
+ ### Usage Examples
542
+ - \`aliasmate ru<TAB>\` → completes to "run"
543
+ - \`aliasmate run bu<TAB>\` → completes to your "build" command
544
+ - \`aliasmate list --fo<TAB>\` → completes to "--format"
545
+ - \`aliasmate list --format <TAB>\` → shows json, yaml, table, compact
546
+
547
+ ## Configuration
548
+
549
+ ### Storage Location
250
550
  - Config file: \`~/.config/aliasmate/config.json\`
251
- - Contains all saved commands and their metadata
551
+ - Metadata file: \`~/.config/aliasmate/metadata.json\`
552
+ - Config contains all saved commands
553
+ - Metadata contains aliases, execution history, and app state
252
554
  - JSON format for easy editing if needed
253
555
 
254
556
  ### Command Alias Structure
@@ -256,9 +558,17 @@ Each command contains:
256
558
  - \`command\`: The shell command to execute
257
559
  - \`directory\`: The saved working directory path
258
560
  - \`pathMode\`: Either "saved" or "current"
561
+ - \`env\`: Optional object containing environment variables
259
562
  - \`createdAt\`: ISO 8601 timestamp
260
563
  - \`updatedAt\`: ISO 8601 timestamp
261
564
 
565
+ ### Metadata Structure
566
+ Contains:
567
+ - \`command_aliases\`: Map of alias shortcuts to command names
568
+ - \`execution_history\`: Array of recent command executions
569
+ - \`recent_config\`: Configuration for recent commands (maxSize, etc.)
570
+ - \`onboarding\`: Onboarding state and version tracking
571
+
262
572
  ## Use Cases
263
573
 
264
574
  ### Development Workflows
@@ -298,21 +608,52 @@ Each command contains:
298
608
  - Good: \`deploy-prod\`, \`test-unit\`, \`start-server\`
299
609
  - Avoid: \`cmd1\`, \`x\`, \`temp\`
300
610
 
301
- 2. **Path Mode Selection**: Choose the right mode for each command
611
+ 2. **Use Aliases for Frequently Used Commands**
612
+ - Create short aliases: \`aliasmate alias b build\`
613
+ - Keyboard-friendly shortcuts speed up workflow
614
+ - Use for commands you run multiple times daily
615
+
616
+ 3. **Path Mode Selection**: Choose the right mode for each command
302
617
  - Use "saved" for project-specific commands
303
618
  - Use "current" for general utilities
304
619
 
305
- 3. **Regular Backups**: Export commands periodically
620
+ 4. **Preview with Dry-Run**: Verify before executing
621
+ - Use \`--dry-run\` for destructive commands
622
+ - Check environment variables with \`--verbose\`
623
+ - Catch errors before they happen
624
+
625
+ 5. **Validate Commands**: Let validation catch errors early
626
+ - Default validation when saving prevents issues
627
+ - Use \`--no-validate\` only when necessary
628
+ - Run \`aliasmate validate --all\` periodically
629
+
630
+ 6. **Regular Backups**: Export commands periodically
306
631
  - \`aliasmate export ~/backups/aliases-$(date +%Y%m%d).json\`
632
+ - Use version control for team command exports
307
633
 
308
- 4. **Team Sharing**: Maintain a shared command repository
309
- - Version control your command exports
634
+ 7. **Team Sharing**: Maintain a shared command repository
635
+ - Export with masked sensitive values
310
636
  - Document complex commands
637
+ - Use consistent naming conventions
311
638
 
312
- 5. **Command Organization**: Use prefixes for grouping
639
+ 8. **Command Organization**: Use prefixes for grouping
313
640
  - \`test-unit\`, \`test-integration\`, \`test-e2e\`
314
641
  - \`deploy-dev\`, \`deploy-staging\`, \`deploy-prod\`
315
642
 
643
+ 9. **Environment Variables**: Capture when needed
644
+ - Use for commands that need specific env vars
645
+ - Review sensitive variables before saving
646
+ - Keep environment variables updated with \`edit\` command
647
+
648
+ 10. **Use Recent Commands**: Quick access to command history
649
+ - \`aliasmate run @0\` for most recent
650
+ - Review history with \`aliasmate recent\`
651
+ - Clear old history periodically
652
+
653
+ 11. **Stay Updated**: Check changelog regularly
654
+ - Run \`aliasmate changelog\` to see new features
655
+ - Update to latest version for bug fixes and improvements
656
+
316
657
  ## Integration with AI Assistants
317
658
 
318
659
  This llm.txt file is designed to help AI assistants understand AliasMate's full capabilities. When asking an AI for help with AliasMate:
@@ -326,18 +667,66 @@ This llm.txt file is designed to help AI assistants understand AliasMate's full
326
667
 
327
668
  ### Command Not Found
328
669
  - Run \`aliasmate list\` to see available commands
670
+ - Check if it's an alias: \`aliasmate alias --list\`
329
671
  - Check spelling of command name
330
672
  - Verify command was saved successfully
331
673
 
674
+ ### Alias Not Working
675
+ - Verify alias exists: \`aliasmate alias --list\`
676
+ - Check if target command exists
677
+ - Ensure alias name doesn't conflict with reserved names
678
+ - Try running the target command directly first
679
+
680
+ ### Recent Commands Not Showing
681
+ - Check execution history: \`aliasmate recent\`
682
+ - Verify commands were run (not in dry-run mode)
683
+ - History might be full (default: 50 entries)
684
+ - Clear old history: \`aliasmate recent --clear\`
685
+
686
+ ### Validation Errors
687
+ - Read the specific error message carefully
688
+ - Check if command exists in PATH: \`which <command>\`
689
+ - Verify directory exists and is accessible
690
+ - Review shell syntax for quotes, brackets, pipes
691
+ - Use \`--no-validate\` to bypass if error is false positive
692
+
332
693
  ### Directory Not Found
333
694
  - Ensure the saved directory still exists
334
695
  - Use path override to run in different location
335
696
  - Edit command to update directory: \`aliasmate edit <name>\`
697
+ - Check directory permissions
336
698
 
337
699
  ### Command Execution Fails
700
+ - Preview first: \`aliasmate run <name> --dry-run\`
338
701
  - Verify command syntax is correct
339
702
  - Check if required tools/dependencies are installed
340
703
  - Ensure directory permissions are correct
704
+ - Review environment variables: use \`--dry-run --verbose\`
705
+
706
+ ### Completion Not Working
707
+ - Verify completion script is sourced correctly
708
+ - Check shell type: \`echo $SHELL\`
709
+ - Reload shell config: \`source ~/.bashrc\` or \`source ~/.zshrc\`
710
+ - For fish, ensure file is in \`~/.config/fish/completions/\`
711
+
712
+ ### Dry-Run Shows Incorrect Information
713
+ - Verify saved command: \`aliasmate list\`
714
+ - Check if command was updated recently
715
+ - Review environment variables: use \`--verbose\` flag
716
+ - Edit command if needed: \`aliasmate edit <name>\`
717
+
718
+ ### Environment Variable Issues
719
+ - Check if saved variables are still valid
720
+ - Verify environment variable names and values
721
+ - Use \`aliasmate edit <name>\` to update env vars
722
+ - Clear environment variables if no longer needed
723
+ - Preview with dry-run: \`aliasmate run <name> --dry-run --verbose\`
724
+
725
+ ### Export/Import Format Issues
726
+ - Verify format flag: \`--format json\` or \`--format yaml\`
727
+ - Check file extension matches format
728
+ - Validate JSON/YAML syntax if manually edited
729
+ - Use \`--format json\` for most compatible exports
341
730
 
342
731
  ## Technical Details
343
732
 
@@ -412,6 +801,9 @@ aliasmate prev seed
412
801
  ./scripts/deploy.sh production
413
802
  aliasmate prev deploy-prod
414
803
 
804
+ # Preview before deploying (dry-run)
805
+ aliasmate run deploy-prod --dry-run --verbose
806
+
415
807
  # Save log viewing
416
808
  tail -f /var/log/app.log
417
809
  aliasmate prev logs
@@ -421,6 +813,76 @@ curl http://localhost:3000/health
421
813
  aliasmate prev health-check
422
814
  \`\`\`
423
815
 
816
+ ### Using Aliases for Speed
817
+ \`\`\`bash
818
+ # Create aliases for frequently used commands
819
+ aliasmate alias b build
820
+ aliasmate alias t test
821
+ aliasmate alias d deploy-prod
822
+ aliasmate alias ds deploy-staging
823
+
824
+ # Use aliases for quick execution
825
+ aliasmate run b # Runs build
826
+ aliasmate run t # Runs test
827
+ aliasmate run d # Runs deploy-prod
828
+
829
+ # List all aliases
830
+ aliasmate alias --list
831
+ \`\`\`
832
+
833
+ ### Recent Commands Workflow
834
+ \`\`\`bash
835
+ # Run several commands
836
+ aliasmate run build
837
+ aliasmate run test
838
+ aliasmate run deploy-staging
839
+
840
+ # View recent commands
841
+ aliasmate recent
842
+
843
+ # Quickly re-run the last command
844
+ aliasmate run @0
845
+
846
+ # Re-run the build (if it was 2nd most recent)
847
+ aliasmate run @1
848
+ \`\`\`
849
+
850
+ ### Validation and Safety
851
+ \`\`\`bash
852
+ # Validate a command before saving
853
+ aliasmate save
854
+ # (validation runs automatically)
855
+
856
+ # Save without validation (advanced)
857
+ aliasmate save --no-validate
858
+
859
+ # Validate existing command
860
+ aliasmate validate deploy-prod
861
+
862
+ # Validate all commands
863
+ aliasmate validate --all
864
+
865
+ # Preview with dry-run before execution
866
+ aliasmate run deploy-prod --dry-run --verbose
867
+ \`\`\`
868
+
869
+ ### Export and Sharing
870
+ \`\`\`bash
871
+ # Export in different formats
872
+ aliasmate export team-commands.json --format json
873
+ aliasmate export team-commands.yaml --format yaml
874
+
875
+ # View commands in different formats
876
+ aliasmate list --format json
877
+ aliasmate list --format compact
878
+ aliasmate list --format yaml
879
+
880
+ # Share with team (sensitive values are masked)
881
+ git add team-commands.yaml
882
+ git commit -m "Update team commands"
883
+ git push
884
+ \`\`\`
885
+
424
886
  ---
425
887
 
426
888
  Generated by AliasMate v${constants_1.APP_VERSION}
@@ -1 +1 @@
1
- {"version":3,"file":"llm-generator.js","sourceRoot":"","sources":["../../src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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAu0BC,uBAAW;;CAEpC,CAAC;AACF,CAAC;AAED;;;;GAIG;AACH,SAAgB,aAAa,CAAC,SAAiB;IAC7C,MAAM,OAAO,GAAG,kBAAkB,EAAE,CAAC;IACrC,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IAEjD,EAAE,CAAC,aAAa,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IAE5C,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED;;;GAGG;AACH,SAAgB,oBAAoB;IAMlC,OAAO;QACL,IAAI,EAAE,KAAK;QACX,OAAO,EAAE,yCAAyC,kBAAkB,EAAE,yDAAyD;QAC/H,SAAS,EAAE,OAAO,CAAC,GAAG,EAAE;QACxB,QAAQ,EAAE,SAAS,EAAE,gEAAgE;KACtF,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"onboarding.d.ts","sourceRoot":"","sources":["../../src/utils/onboarding.ts"],"names":[],"mappings":"AAsNA;;;GAGG;AACH,wBAAgB,sBAAsB,IAAI,OAAO,CAqChD;AAED;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,OAAO,CAGhD"}
1
+ {"version":3,"file":"onboarding.d.ts","sourceRoot":"","sources":["../../src/utils/onboarding.ts"],"names":[],"mappings":"AAwQA;;;GAGG;AACH,wBAAgB,sBAAsB,IAAI,OAAO,CA8ChD;AAED;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,OAAO,CAGhD"}