From 3560a94418828c815ff886c371a136687aa9276f Mon Sep 17 00:00:00 2001 From: "Aaron D. Lee" Date: Mon, 15 Dec 2025 21:39:56 -0500 Subject: [PATCH] Auto-sync from catchthesethighs --- bin/dotfiles-doctor.sh | 8 ++++++-- bin/{dotfile-stats.sh => dotfiles-stats.sh} | 7 ++++++- bin/dotfiles-sync.sh | 19 +++++++++++++------ bin/dotfiles-vault.sh | 12 ++++++++++-- bin/dotfiles-version.sh | 10 ++++++---- bin/dotfiles.update.sh | 16 +++++++++++----- setup/setup-wizard.sh | 18 +++++++++++++++--- 7 files changed, 67 insertions(+), 23 deletions(-) rename bin/{dotfile-stats.sh => dotfiles-stats.sh} (98%) mode change 100755 => 100644 diff --git a/bin/dotfiles-doctor.sh b/bin/dotfiles-doctor.sh index 1023752..24d5764 100755 --- a/bin/dotfiles-doctor.sh +++ b/bin/dotfiles-doctor.sh @@ -28,13 +28,17 @@ for arg in "$@"; do QUIET_MODE=true ;; --help|-h) - echo "Usage: $0 [OPTIONS]" + echo "Usage: dotfiles-doctor.sh [OPTIONS]" echo echo "Options:" echo " --fix Attempt to automatically fix issues" echo " --quiet Only show errors and warnings" echo " --help Show this help message" echo + echo "Aliases:" + echo " dfd, doctor Run diagnostics" + echo " dffix Run with --fix" + echo exit 0 ;; esac @@ -448,7 +452,7 @@ print_summary() { else echo -e "${RED}✗ Some issues found.${NC}" if [[ "$FIX_MODE" != true ]]; then - echo -e " Run with ${CYAN}--fix${NC} to attempt automatic fixes." + echo -e " Run ${CYAN}dffix${NC} or ${CYAN}dotfiles-doctor.sh --fix${NC} to attempt automatic fixes." fi fi echo diff --git a/bin/dotfile-stats.sh b/bin/dotfiles-stats.sh old mode 100755 new mode 100644 similarity index 98% rename from bin/dotfile-stats.sh rename to bin/dotfiles-stats.sh index cc7314b..b63ef4f --- a/bin/dotfile-stats.sh +++ b/bin/dotfiles-stats.sh @@ -419,7 +419,7 @@ show_heatmap() { # ============================================================================ show_help() { - echo "Usage: $0 [COMMAND] [OPTIONS]" + echo "Usage: dotfiles-stats.sh [COMMAND] [OPTIONS]" echo echo "Commands:" echo " (none) Show dashboard" @@ -434,6 +434,11 @@ show_help() { echo " --export Export stats as JSON" echo " --help Show this help" echo + echo "Aliases:" + echo " dfstats, stats Show dashboard" + echo " tophist Top commands" + echo " suggest Suggest aliases" + echo } main() { diff --git a/bin/dotfiles-sync.sh b/bin/dotfiles-sync.sh index c9e722b..0d27c6c 100755 --- a/bin/dotfiles-sync.sh +++ b/bin/dotfiles-sync.sh @@ -319,13 +319,13 @@ do_auto() { if [[ $behind -gt 0 ]]; then echo -e "${YELLOW}⚠ Dotfiles: $behind update(s) available${NC}" - echo -e " Run: ${CYAN}dotfiles-sync.sh --pull${NC}" + echo -e " Run: ${CYAN}dfpull${NC} or ${CYAN}dotfiles-sync.sh --pull${NC}" fi if has_local_changes; then local changed=$(git status --short 2>/dev/null | wc -l | tr -d ' ') echo -e "${YELLOW}⚠ Dotfiles: $changed local change(s) not pushed${NC}" - echo -e " Run: ${CYAN}dotfiles-sync.sh --push${NC}" + echo -e " Run: ${CYAN}dfpush${NC} or ${CYAN}dotfiles-sync.sh --push${NC}" fi } @@ -382,7 +382,7 @@ show_conflicts() { # ============================================================================ show_help() { - echo "Usage: $0 [COMMAND] [OPTIONS]" + echo "Usage: dotfiles-sync.sh [COMMAND] [OPTIONS]" echo echo "Commands:" echo " (none) Interactive sync" @@ -396,10 +396,17 @@ show_help() { echo " --conflicts Show merge conflicts" echo " --help Show this help" echo + echo "Aliases:" + echo " dfs, dfsync Interactive sync" + echo " dfpush Push local changes" + echo " dfpull Pull remote changes" + echo " dfstatus Show sync status" + echo echo "Examples:" - echo " $0 # Interactive sync" - echo " $0 --push 'Added aliases' # Push with message" - echo " $0 --watch 60 # Sync every 60 seconds" + echo " dfs # Interactive sync" + echo " dfpush # Push changes" + echo " dotfiles-sync.sh --push 'Added aliases'" + echo " dotfiles-sync.sh --watch 60 # Sync every 60 seconds" echo } diff --git a/bin/dotfiles-vault.sh b/bin/dotfiles-vault.sh index 66891fe..fd1b8fe 100755 --- a/bin/dotfiles-vault.sh +++ b/bin/dotfiles-vault.sh @@ -434,7 +434,8 @@ vault_status() { # ============================================================================ show_help() { - echo "Usage: vault [args]" + echo "Usage: dotfiles-vault.sh [args]" + echo " vault [args]" echo echo "Commands:" echo " set [value] Store a secret (prompts for value if not given)" @@ -448,10 +449,17 @@ show_help() { echo " init Initialize vault" echo " help Show this help" echo + echo "Aliases:" + echo " vault Main command (alias for dotfiles-vault.sh)" + echo " vls List secrets" + echo " vget Get secret" + echo " vset Set secret" + echo echo "Examples:" echo " vault set GITHUB_TOKEN ghp_xxxxxxxxxxxx" echo " vault set AWS_SECRET_KEY # Will prompt for value" - echo " vault get GITHUB_TOKEN" + echo " vget GITHUB_TOKEN" + echo " vls" echo " eval \$(vault shell) # Export all to current shell" echo echo "The vault uses ${CYAN}age${NC} or ${CYAN}gpg${NC} for encryption." diff --git a/bin/dotfiles-version.sh b/bin/dotfiles-version.sh index 2c05123..e3eb33a 100755 --- a/bin/dotfiles-version.sh +++ b/bin/dotfiles-version.sh @@ -50,12 +50,15 @@ for arg in "$@"; do CHECK_ONLY=true ;; --help|-h) - echo "Usage: $0 [OPTIONS]" + echo "Usage: dotfiles-version.sh [OPTIONS]" echo echo "Options:" echo " --check Only check for updates (exit 1 if behind)" echo " --help Show this help message" echo + echo "Aliases:" + echo " dfv, dfversion Show version info" + echo exit 0 ;; esac @@ -214,9 +217,8 @@ main() { echo -e " Commits: ${YELLOW}⚠ ${commits_behind} commit(s) behind${NC}" echo echo -e "${YELLOW}To update:${NC}" - echo " cd ~/.dotfiles && git pull && ./install.sh" - echo " # or" - echo " update-dotfiles.sh" + echo " dfu # Alias" + echo " dotfiles-update.sh # Full command" elif [[ "$commits_behind" == "0" ]]; then echo -e " Commits: ${GREEN}✓ Up to date${NC}" fi diff --git a/bin/dotfiles.update.sh b/bin/dotfiles.update.sh index 5365152..c756442 100755 --- a/bin/dotfiles.update.sh +++ b/bin/dotfiles.update.sh @@ -5,9 +5,11 @@ # Updates dotfiles from the git repository and relinks files # # Usage: -# update-dotfiles.sh # Pull and re-run install -# update-dotfiles.sh --skip-deps # Pull and re-run install without deps -# update-dotfiles.sh --pull-only # Only git pull, don't re-run install +# dotfiles-update.sh # Pull and re-run install +# dotfiles-update.sh --skip-deps # Pull and re-run install without deps +# dotfiles-update.sh --pull-only # Only git pull, don't re-run install +# +# Aliases: dfu, dfupdate # ============================================================================ set -e @@ -31,7 +33,7 @@ for arg in "$@"; do PULL_ONLY=true ;; --help|-h) - echo "Usage: $0 [OPTIONS]" + echo "Usage: dotfiles-update.sh [OPTIONS]" echo echo "Options:" echo " --skip-deps Skip dependency check (default for updates)" @@ -39,6 +41,9 @@ for arg in "$@"; do echo " --pull-only Only git pull, don't re-run install script" echo " --help Show this help message" echo + echo "Aliases:" + echo " dfu, dfupdate Update dotfiles" + echo exit 0 ;; esac @@ -71,6 +76,7 @@ GREEN='\033[0;32m' YELLOW='\033[1;33m' RED='\033[0;31m' BLUE='\033[0;34m' +CYAN='\033[0;36m' NC='\033[0m' print_success() { @@ -131,7 +137,7 @@ if [ $? -eq 0 ]; then echo print_success "Update complete!" - echo "Reload your shell with: source ~/.zshrc" + echo -e "Reload your shell: ${CYAN}reload${NC} or ${CYAN}source ~/.zshrc${NC}" else print_error "Failed to update dotfiles" exit 1 diff --git a/setup/setup-wizard.sh b/setup/setup-wizard.sh index 0c8785d..5a82d07 100755 --- a/setup/setup-wizard.sh +++ b/setup/setup-wizard.sh @@ -559,15 +559,27 @@ step_complete() { "" \ "Next steps:" \ " 1. Restart your terminal or run: exec zsh" \ - " 2. Run 'dotfiles-doctor.sh' to verify installation" \ - " 3. Customize settings in ~/.dotfiles/dotfiles.conf" + " 2. Run 'dfd' or 'doctor' to verify installation" \ + " 3. Customize settings in ~/.dotfiles/dotfiles.conf" \ + "" \ + "Useful commands:" \ + " dfd / doctor - Health check" \ + " dfs / dfsync - Sync dotfiles" \ + " dfstats / stats - Shell analytics" \ + " vault - Secrets manager" else echo -e "${GREEN}Your dotfiles have been installed successfully!${NC}" echo echo "Next steps:" echo " 1. Restart your terminal or run: exec zsh" - echo " 2. Run 'dotfiles-doctor.sh' to verify installation" + echo " 2. Run 'dfd' or 'doctor' to verify installation" echo " 3. Customize settings in ~/.dotfiles/dotfiles.conf" + echo + echo "Useful commands:" + echo " dfd / doctor - Health check" + echo " dfs / dfsync - Sync dotfiles" + echo " dfstats / stats - Shell analytics" + echo " vault - Secrets manager" fi echo