@sebastienrousseau/dotfiles 0.2.468 → 0.2.481
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 +285 -0
- package/README.md +236 -319
- package/docs/ALIASES.md +128 -0
- package/docs/ARCHITECTURE.md +229 -0
- package/docs/COMPLIANCE.md +47 -0
- package/docs/COPYRIGHT +7 -0
- package/docs/FEATURES.md +166 -0
- package/docs/FONTS.md +147 -0
- package/docs/INSTALL.md +119 -0
- package/docs/KEYS.md +40 -0
- package/docs/KEY_ROTATION.md +219 -0
- package/docs/LEGACY_ROADMAP.md +142 -0
- package/docs/NEOVIM_IDE_GUIDE.md +52 -0
- package/docs/OPERATIONS.md +130 -0
- package/docs/PLAN.md +161 -0
- package/docs/PR_DESCRIPTION.md +149 -0
- package/docs/README.md +269 -0
- package/docs/REPO_AUDIT.md +23 -0
- package/docs/ROADMAP.md +148 -0
- package/docs/SCREENSHOTS.md +116 -0
- package/docs/SECRETS.md +76 -0
- package/docs/SECURITY.md +30 -0
- package/docs/SECURITY_CHECKLIST.md +25 -0
- package/docs/TASK.md +99 -0
- package/docs/TESTING.md +190 -0
- package/docs/TOOLS.md +146 -0
- package/docs/TROUBLESHOOTING.md +112 -0
- package/docs/UTILS.md +105 -0
- package/docs/WALKTHROUGH.md +165 -0
- package/docs/WSL2_NIX_TROUBLESHOOTING.md +723 -0
- package/docs/adr/ADR-001-ci-cd-pipeline.md +101 -0
- package/docs/adr/ADR-002-shell-performance.md +121 -0
- package/docs/adr/ADR-003-security-first.md +140 -0
- package/docs/adr/ADR-004-cli-architecture.md +157 -0
- package/docs/adr/ADR-005-chezmoi-choice.md +89 -0
- package/docs/adr/ADR-006-shell-selection.md +115 -0
- package/docs/adr/README.md +33 -0
- package/docs/themes/README.md +20 -0
- package/dot_config/aider/aider.conf.yml +32 -0
- package/dot_config/alacritty/alacritty.toml.tmpl +483 -0
- package/dot_config/ansible/ansible.cfg.tmpl +11 -0
- package/dot_config/atuin/config.toml +23 -0
- package/dot_config/bat/config +8 -0
- package/dot_config/brave-flags.conf.tmpl +7 -0
- package/dot_config/btop/btop.conf +16 -0
- package/dot_config/btop/themes/tokyonight.theme +34 -0
- package/dot_config/bun/bunfig.toml.tmpl +33 -0
- package/dot_config/claude/mcp_servers.json +49 -0
- package/dot_config/clippy.toml +55 -0
- package/dot_config/containers/containers.conf +14 -0
- package/dot_config/curl/dot_curlrc +18 -0
- package/dot_config/dlv/config.yml +39 -0
- package/dot_config/docker/config.json.tmpl +15 -0
- package/dot_config/dotfiles/boot/README.md +11 -0
- package/dot_config/dotfiles/grub/README.md +11 -0
- package/dot_config/dotfiles/lock/README.md +11 -0
- package/dot_config/dotfiles/versions.env.tmpl +19 -0
- package/dot_config/duf/duf.conf +6 -0
- package/dot_config/duti/defaults.duti +5 -0
- package/dot_config/emoji/emoji.txt +34 -0
- package/dot_config/fastfetch/config.jsonc +28 -0
- package/dot_config/firefox/user.js +8 -0
- package/dot_config/flatpak/flatpak.list +4 -0
- package/dot_config/fontconfig/fonts.conf.tmpl +44 -0
- package/dot_config/gh/config.yml +12 -0
- package/dot_config/ghostty/config.tmpl +661 -0
- package/dot_config/git/attributes +12 -0
- package/dot_config/git/config.tmpl +77 -0
- package/dot_config/git/ignore +27 -0
- package/dot_config/gnupg/gpg-agent.conf.tmpl +11 -0
- package/dot_config/go/aliases.sh +61 -0
- package/dot_config/go/env.sh +24 -0
- package/dot_config/go/golangci.yml +118 -0
- package/dot_config/go/gopls.json +30 -0
- package/dot_config/goose/config.yaml +29 -0
- package/dot_config/gtk-3.0/gtk.css.tmpl +305 -0
- package/dot_config/gtk-3.0/settings.ini.tmpl +66 -0
- package/dot_config/gtk-4.0/gtk.css.tmpl +309 -0
- package/dot_config/gtk-4.0/settings.ini.tmpl +21 -0
- package/dot_config/htop/htoprc +20 -0
- package/dot_config/ice/README.md +13 -0
- package/dot_config/inputrc +2 -0
- package/dot_config/ipython/profile_default/ipython_config.py.tmpl +5 -0
- package/dot_config/just/justfile +104 -0
- package/dot_config/k9s/config.yaml.tmpl +65 -0
- package/dot_config/k9s/skins/catppuccin-mocha.yaml +116 -0
- package/dot_config/karabiner/karabiner.json +14 -0
- package/dot_config/kitty/kitty.conf.tmpl +517 -0
- package/dot_config/lazydocker/config.yml +186 -0
- package/dot_config/lazygit/config.yml +23 -0
- package/dot_config/lsd/config.yaml +19 -0
- package/dot_config/mas/masapps.txt +5 -0
- package/dot_config/minikube/config.json +13 -0
- package/dot_config/mise/config.toml +41 -0
- package/dot_config/mongosh/mongoshrc.js +67 -0
- package/dot_config/mycli/myclirc +67 -0
- package/dot_config/nano/nanorc +28 -0
- package/dot_config/ncdu/config +12 -0
- package/dot_config/nvim/init.lua +4 -0
- package/dot_config/nvim/lazy-lock.json +27 -0
- package/dot_config/nvim/lua/config/autocmds.lua +63 -0
- package/dot_config/nvim/lua/config/keymaps.lua +87 -0
- package/dot_config/nvim/lua/config/lazy.lua +34 -0
- package/dot_config/nvim/lua/config/options.lua +48 -0
- package/dot_config/nvim/lua/plugins/coding.lua +234 -0
- package/dot_config/nvim/lua/plugins/dap.lua +201 -0
- package/dot_config/nvim/lua/plugins/editor.lua +59 -0
- package/dot_config/nvim/lua/plugins/git.lua +9 -0
- package/dot_config/nvim/lua/plugins/lsp.lua +221 -0
- package/dot_config/nvim/lua/plugins/markdown.lua +17 -0
- package/dot_config/nvim/lua/plugins/rust.lua +33 -0
- package/dot_config/nvim/lua/plugins/sessions.lua +32 -0
- package/dot_config/nvim/lua/plugins/ui.lua +537 -0
- package/dot_config/nvim/snippets/all.lua +9 -0
- package/dot_config/nvim/snippets/python.lua +16 -0
- package/dot_config/pip/pip.conf.tmpl +32 -0
- package/dot_config/pypoetry/config.toml.tmpl +6 -0
- package/dot_config/pyrightconfig.json.tmpl +5 -0
- package/dot_config/raycast/README.md +13 -0
- package/dot_config/redis/redisclirc +41 -0
- package/dot_config/shell/00-container-detect.sh +53 -0
- package/dot_config/shell/00-core-paths.sh.tmpl +95 -0
- package/dot_config/shell/05-core-safety.sh.tmpl +13 -0
- package/dot_config/shell/40-ls-colors.sh.tmpl +31 -0
- package/dot_config/shell/50-logic-functions.sh.tmpl +10 -0
- package/dot_config/shell/90-theme-switch.sh +70 -0
- package/dot_config/shell/90-ux-aliases.sh.tmpl +35 -0
- package/dot_config/shell/91-ux-aliases-lazy.sh.tmpl +23 -0
- package/dot_config/shell/Brewfile +207 -0
- package/dot_config/shell/Brewfile.cask +92 -0
- package/dot_config/shell/Brewfile.cli +119 -0
- package/dot_config/shell/README.md +267 -0
- package/dot_config/shell/custom/context_suggest.zsh +68 -0
- package/dot_config/shell/custom/error_analysis.zsh +45 -0
- package/dot_config/sops/dot_sops.yaml +23 -0
- package/dot_config/starship.toml.tmpl +124 -0
- package/dot_config/task/Taskfile.yml +86 -0
- package/dot_config/tflint/tflint.hcl.tmpl +9 -0
- package/dot_config/tmux/tmux.conf.tmpl +181 -0
- package/dot_config/topgrade/topgrade.toml.tmpl +42 -0
- package/dot_config/vscode/extensions.txt +11 -0
- package/dot_config/vscode/settings.json.tmpl +123 -0
- package/dot_config/waybar/style.css +8 -0
- package/dot_config/wezterm/wezterm.lua.tmpl +236 -0
- package/dot_config/wget/wgetrc +12 -0
- package/dot_config/yarn/yarnrc.yml.tmpl +36 -0
- package/dot_config/yazi/yazi.toml +40 -0
- package/dot_config/zellij/config.kdl +79 -0
- package/dot_config/zsh/dot_zprofile +13 -0
- package/dot_config/zsh/dot_zshenv +6 -0
- package/dot_config/zsh/dot_zshrc.tmpl +199 -0
- package/dot_config/zsh/rc.d/05-ssh-agent.zsh +5 -0
- package/dot_config/zsh/rc.d/10-env.zsh.tmpl +28 -0
- package/dot_config/zsh/rc.d/20-zinit.zsh.tmpl +22 -0
- package/dot_config/zsh/rc.d/30-options.zsh.tmpl +123 -0
- package/dot_config/zsh/rc.d/40-bell.zsh.tmpl +20 -0
- package/dot_config/zsh/rc.d/50-login-fortune.zsh.tmpl +9 -0
- package/dot_local/bin/executable_ai_core +130 -0
- package/dot_local/bin/executable_b64 +59 -0
- package/dot_local/bin/executable_dot +178 -0
- package/dot_local/bin/executable_dot_completion +55 -0
- package/dot_local/bin/executable_epoch +62 -0
- package/dot_local/bin/executable_extract +108 -0
- package/dot_local/bin/executable_git-ai-commit +160 -0
- package/dot_local/bin/executable_git-ai-diff +154 -0
- package/dot_local/bin/executable_hash +123 -0
- package/dot_local/bin/executable_hex +79 -0
- package/dot_local/bin/executable_ip +37 -0
- package/dot_local/bin/executable_jsonv +54 -0
- package/dot_local/bin/executable_jwt +78 -0
- package/dot_local/bin/executable_kill-port +59 -0
- package/dot_local/bin/executable_lorem +103 -0
- package/dot_local/bin/executable_regex +96 -0
- package/dot_local/bin/executable_tmux-sessionizer +187 -0
- package/dot_local/bin/executable_tour +137 -0
- package/dot_local/bin/executable_update +108 -0
- package/dot_local/bin/executable_uuid +57 -0
- package/dot_local/bin/executable_yamlv +39 -0
- package/dot_local/bin/executable_zig-install +89 -0
- package/dot_local/bin/voice_ops +7 -0
- package/dot_local/share/bash-completion/completions/dot +54 -0
- package/dot_local/share/zsh/completions/.keep +0 -0
- package/install.sh +255 -0
- package/package.json +52 -76
- package/scripts/ci/validate-ci-config.sh +222 -0
- package/scripts/demo/record.sh +41 -0
- package/scripts/diagnostics/benchmark.sh +201 -0
- package/scripts/diagnostics/doctor.sh +115 -0
- package/scripts/diagnostics/drift-dashboard.sh +26 -0
- package/scripts/diagnostics/health.sh +356 -0
- package/scripts/diagnostics/history-analysis.sh +77 -0
- package/scripts/diagnostics/security-score.sh +392 -0
- package/scripts/diagnostics/verify_state.sh +60 -0
- package/scripts/dot/commands/appearance.sh +63 -0
- package/scripts/dot/commands/core.sh +130 -0
- package/scripts/dot/commands/diagnostics.sh +100 -0
- package/scripts/dot/commands/meta.sh +117 -0
- package/scripts/dot/commands/restore.sh +209 -0
- package/scripts/dot/commands/secrets.sh +81 -0
- package/scripts/dot/commands/security.sh +73 -0
- package/scripts/dot/commands/tools.sh +228 -0
- package/scripts/dot/lib/utils.sh +72 -0
- package/scripts/fonts/install-nerd-fonts.sh +59 -0
- package/scripts/fonts/patch-fonts.sh +34 -0
- package/scripts/ops/chezmoi-apply.sh +42 -0
- package/scripts/ops/chezmoi-diff.sh +14 -0
- package/scripts/ops/chezmoi-remove.sh +43 -0
- package/scripts/ops/chezmoi-update.sh +16 -0
- package/scripts/ops/heal.sh +466 -0
- package/scripts/ops/health-check.sh +380 -0
- package/scripts/ops/rollback.sh +531 -0
- package/scripts/ops/teleport.sh +32 -0
- package/scripts/secrets/age-init.sh +69 -0
- package/scripts/secrets/create-secrets-file.sh +44 -0
- package/scripts/secrets/encrypt-ssh-key.sh +42 -0
- package/scripts/security/backup.sh +17 -0
- package/scripts/security/dns-doh.sh +29 -0
- package/scripts/security/encryption-check.sh +39 -0
- package/scripts/security/enforce-policies.sh +339 -0
- package/scripts/security/firewall.sh +34 -0
- package/scripts/security/lock-configs.sh +57 -0
- package/scripts/security/lock-screen.sh +33 -0
- package/scripts/security/manage-secrets.sh +415 -0
- package/scripts/security/telemetry-kill.sh +28 -0
- package/scripts/security/usb-safety.sh +29 -0
- package/scripts/tests/README.md +241 -0
- package/scripts/tests/benchmark.sh +91 -0
- package/scripts/tests/framework/assertions.sh +283 -0
- package/scripts/tests/framework/mocks.sh +201 -0
- package/scripts/tests/framework/test_runner.sh +189 -0
- package/scripts/tests/integration/test_install.sh +237 -0
- package/scripts/tests/performance/benchmark_runner.sh +156 -0
- package/scripts/tests/performance/regression_check.sh +73 -0
- package/scripts/tests/performance/stress_test.sh +65 -0
- package/scripts/tests/test-aliases.sh +25 -0
- package/scripts/tests/test-docker.sh +48 -0
- package/scripts/tests/unit/test_ai_aliases.sh +158 -0
- package/scripts/tests/unit/test_ai_cli_checks.sh +47 -0
- package/scripts/tests/unit/test_backup.sh +227 -0
- package/scripts/tests/unit/test_case_functions.sh +238 -0
- package/scripts/tests/unit/test_cd_aliases.sh +367 -0
- package/scripts/tests/unit/test_dot_cli.sh +217 -0
- package/scripts/tests/unit/test_encode64.sh +67 -0
- package/scripts/tests/unit/test_environment.sh +78 -0
- package/scripts/tests/unit/test_extract.sh +163 -0
- package/scripts/tests/unit/test_framework_edge_cases.sh +113 -0
- package/scripts/tests/unit/test_genpass.sh +298 -0
- package/scripts/tests/unit/test_install_edge_cases.sh +167 -0
- package/scripts/tests/unit/test_installers.sh +172 -0
- package/scripts/tests/unit/test_keygen.sh +68 -0
- package/scripts/tests/unit/test_logging.sh +96 -0
- package/scripts/tests/unit/test_os_detection_comprehensive.sh +388 -0
- package/scripts/tests/unit/test_package_managers_comprehensive.sh +321 -0
- package/scripts/tests/unit/test_prependpath.sh +66 -0
- package/scripts/tests/unit/test_prependpath_refactored.sh +89 -0
- package/scripts/tests/unit/test_rd.sh +230 -0
- package/scripts/tests/unit/test_security_fixes.sh +130 -0
- package/scripts/tests/unit/test_security_scripts.sh +87 -0
- package/scripts/tests/unit/test_template_validation.sh +238 -0
- package/scripts/tests/unit/test_utility_functions.sh +144 -0
- package/scripts/tests/unit/test_wave1_alias_split.sh +132 -0
- package/scripts/tests/unit/test_wave1_ci_pinning.sh +61 -0
- package/scripts/tests/unit/test_wave1_gitleaks_config.sh +52 -0
- package/scripts/tests/unit/test_wave1_heal_fixes.sh +97 -0
- package/scripts/tests/unit/test_wave1_install_gpg.sh +35 -0
- package/scripts/tests/unit/test_wave1_zshenv_path.sh +89 -0
- package/scripts/tests/unit/test_wave1_zshrc_lazy_hook.sh +115 -0
- package/scripts/tests/unit/test_wave2_dot_new_guard.sh +75 -0
- package/scripts/tests/unit/test_zipf.sh +76 -0
- package/scripts/theme/apply-gnome-theme.sh +297 -0
- package/scripts/theme/install-boot-logo.sh +61 -0
- package/scripts/theme/install-catppuccin-themes.sh +346 -0
- package/scripts/theme/install-cursors.sh +24 -0
- package/scripts/theme/install-file-icons.sh +25 -0
- package/scripts/theme/install-grub-theme.sh +51 -0
- package/scripts/theme/install-lock-icon.sh +29 -0
- package/scripts/theme/switch.sh +250 -0
- package/scripts/theme/wallpaper-rotate.sh +82 -0
- package/scripts/theme/wallpaper-sync.sh +42 -0
- package/scripts/tools/cmatrix.sh +20 -0
- package/scripts/tools/detect-collisions.py +84 -0
- package/scripts/tools/emoji-picker.sh +45 -0
- package/scripts/tools/figlet-banner.sh +17 -0
- package/scripts/tools/log-rotate.sh +29 -0
- package/scripts/tools/lolcat-wrap.sh +18 -0
- package/scripts/tools/pipes.sh +47 -0
- package/scripts/tuning/linux.sh +175 -0
- package/scripts/tuning/macos.sh +46 -0
- package/templates/projects/go/README.md +7 -0
- package/templates/projects/go/cmd/__PROJECT_NAME__/main.go +7 -0
- package/templates/projects/go/go.mod +3 -0
- package/templates/projects/molecule/README.md +7 -0
- package/templates/projects/molecule/converge.yml +7 -0
- package/templates/projects/molecule/molecule.yml +16 -0
- package/templates/projects/node/README.md +7 -0
- package/templates/projects/node/package.json +10 -0
- package/templates/projects/node/src/index.js +2 -0
- package/templates/projects/packer/README.md +15 -0
- package/templates/projects/packer/main.pkr.hcl +15 -0
- package/templates/projects/python/README.md +7 -0
- package/templates/projects/python/pyproject.toml +25 -0
- package/templates/projects/python/src/__PROJECT_NAME__/__init__.py +1 -0
- package/templates/projects/python/tests/test_basic.py +2 -0
- package/dist/Makefile +0 -57
- package/dist/bin/backup.d.ts +0 -3
- package/dist/bin/backup.d.ts.map +0 -1
- package/dist/bin/backup.js +0 -4
- package/dist/bin/backup.js.map +0 -1
- package/dist/bin/constants.d.ts +0 -7
- package/dist/bin/constants.d.ts.map +0 -1
- package/dist/bin/constants.js +0 -2
- package/dist/bin/constants.js.map +0 -1
- package/dist/bin/copy.d.ts +0 -3
- package/dist/bin/copy.d.ts.map +0 -1
- package/dist/bin/copy.js +0 -3
- package/dist/bin/copy.js.map +0 -1
- package/dist/bin/dotfiles.d.ts +0 -3
- package/dist/bin/dotfiles.d.ts.map +0 -1
- package/dist/bin/dotfiles.js +0 -2
- package/dist/bin/dotfiles.js.map +0 -1
- package/dist/bin/download.d.ts +0 -3
- package/dist/bin/download.d.ts.map +0 -1
- package/dist/bin/download.js +0 -2
- package/dist/bin/download.js.map +0 -1
- package/dist/bin/index.d.ts +0 -2
- package/dist/bin/index.d.ts.map +0 -1
- package/dist/bin/index.js +0 -1
- package/dist/bin/index.js.map +0 -1
- package/dist/bin/transfer.d.ts +0 -3
- package/dist/bin/transfer.d.ts.map +0 -1
- package/dist/bin/transfer.js +0 -4
- package/dist/bin/transfer.js.map +0 -1
- package/dist/bin/unpack.d.ts +0 -3
- package/dist/bin/unpack.d.ts.map +0 -1
- package/dist/bin/unpack.js +0 -3
- package/dist/bin/unpack.js.map +0 -1
- package/dist/filesizes.txt +0 -380
- package/dist/lib/README.md +0 -12
- package/dist/lib/aliases/README.md +0 -55
- package/dist/lib/aliases/archives/README.md +0 -59
- package/dist/lib/aliases/archives/archives.aliases.sh +0 -157
- package/dist/lib/aliases/cd/README.md +0 -65
- package/dist/lib/aliases/cd/cd.aliases.sh +0 -73
- package/dist/lib/aliases/chmod/README.md +0 -109
- package/dist/lib/aliases/chmod/chmod.aliases.sh +0 -91
- package/dist/lib/aliases/clear/README.md +0 -37
- package/dist/lib/aliases/clear/clear.aliases.sh +0 -71
- package/dist/lib/aliases/configuration/README.md +0 -39
- package/dist/lib/aliases/configuration/configuration.aliases.sh +0 -73
- package/dist/lib/aliases/default/README.md +0 -40
- package/dist/lib/aliases/default/default.aliases.sh +0 -139
- package/dist/lib/aliases/dig/README.md +0 -37
- package/dist/lib/aliases/dig/dig.aliases.sh +0 -43
- package/dist/lib/aliases/disk-usage/README.md +0 -36
- package/dist/lib/aliases/disk-usage/du.aliases.sh +0 -84
- package/dist/lib/aliases/editor/README.md +0 -53
- package/dist/lib/aliases/editor/editor.aliases.sh +0 -26
- package/dist/lib/aliases/find/README.md +0 -46
- package/dist/lib/aliases/find/find.aliases.sh +0 -60
- package/dist/lib/aliases/gcloud/README.md +0 -63
- package/dist/lib/aliases/gcloud/gcloud.aliases.sh +0 -335
- package/dist/lib/aliases/git/README.md +0 -153
- package/dist/lib/aliases/git/git.aliases.sh +0 -544
- package/dist/lib/aliases/gnu/README.md +0 -89
- package/dist/lib/aliases/gnu/gnucoreutils-aliases.sh +0 -150
- package/dist/lib/aliases/heroku/README.md +0 -430
- package/dist/lib/aliases/heroku/heroku.aliases.sh +0 -1053
- package/dist/lib/aliases/interactive/README.md +0 -55
- package/dist/lib/aliases/interactive/interactive.aliases.sh +0 -50
- package/dist/lib/aliases/jekyll/README.md +0 -41
- package/dist/lib/aliases/jekyll/jekyll.aliases.sh +0 -54
- package/dist/lib/aliases/list/README.md +0 -42
- package/dist/lib/aliases/list/list.aliases.sh +0 -86
- package/dist/lib/aliases/macOS/README.md +0 -42
- package/dist/lib/aliases/macOS/macos.aliases.sh +0 -65
- package/dist/lib/aliases/make/README.md +0 -32
- package/dist/lib/aliases/make/make.aliases.sh +0 -35
- package/dist/lib/aliases/mkdir/README.md +0 -30
- package/dist/lib/aliases/mkdir/mkdir.aliases.sh +0 -29
- package/dist/lib/aliases/npm/README.md +0 -41
- package/dist/lib/aliases/npm/npm.aliases.sh +0 -61
- package/dist/lib/aliases/permission/README.md +0 -47
- package/dist/lib/aliases/permission/permission.aliases.sh +0 -73
- package/dist/lib/aliases/pnpm/README.md +0 -53
- package/dist/lib/aliases/pnpm/pnpm.aliases.sh +0 -76
- package/dist/lib/aliases/ps/README.md +0 -29
- package/dist/lib/aliases/ps/ps.aliases.sh +0 -20
- package/dist/lib/aliases/rsync/README.md +0 -25
- package/dist/lib/aliases/rsync/rsync.aliases.sh +0 -17
- package/dist/lib/aliases/rust/README.md +0 -61
- package/dist/lib/aliases/rust/rust.aliases.sh +0 -127
- package/dist/lib/aliases/subversion/README.md +0 -66
- package/dist/lib/aliases/subversion/subversion.aliases.sh +0 -47
- package/dist/lib/aliases/sudo/README.md +0 -27
- package/dist/lib/aliases/sudo/sudo.aliases.sh +0 -20
- package/dist/lib/aliases/tmux/README.md +0 -31
- package/dist/lib/aliases/tmux/tmux.aliases.sh +0 -36
- package/dist/lib/aliases/update/README.md +0 -38
- package/dist/lib/aliases/update/update.aliases.sh +0 -69
- package/dist/lib/aliases/uuid/README.md +0 -24
- package/dist/lib/aliases/uuid/uuid.aliases.sh +0 -19
- package/dist/lib/aliases/wget/README.md +0 -27
- package/dist/lib/aliases/wget/wget.aliases.sh +0 -22
- package/dist/lib/aliases.sh +0 -50
- package/dist/lib/configurations/README.md +0 -18
- package/dist/lib/configurations/bash/bashrc +0 -39
- package/dist/lib/configurations/curl/cacert.pem +0 -3460
- package/dist/lib/configurations/curl/curlrc +0 -56
- package/dist/lib/configurations/default/color.sh +0 -24
- package/dist/lib/configurations/default/constants.sh +0 -43
- package/dist/lib/configurations/default/editor.sh +0 -18
- package/dist/lib/configurations/default/prompt.sh +0 -39
- package/dist/lib/configurations/input/inputrc +0 -23
- package/dist/lib/configurations/jshint/jshintrc +0 -37
- package/dist/lib/configurations/nano/nanorc +0 -35
- package/dist/lib/configurations/profile/profile +0 -37
- package/dist/lib/configurations/tmux/default +0 -18
- package/dist/lib/configurations/tmux/display +0 -30
- package/dist/lib/configurations/tmux/linux +0 -18
- package/dist/lib/configurations/tmux/navigation +0 -30
- package/dist/lib/configurations/tmux/panes +0 -10
- package/dist/lib/configurations/tmux/theme +0 -29
- package/dist/lib/configurations/tmux/tmux +0 -21
- package/dist/lib/configurations/vim/vimrc +0 -73
- package/dist/lib/configurations/wget/wgetrc +0 -40
- package/dist/lib/configurations/zsh/zshrc +0 -51
- package/dist/lib/configurations.sh +0 -33
- package/dist/lib/functions/README.md +0 -78
- package/dist/lib/functions/cdls.sh +0 -14
- package/dist/lib/functions/curlheader.sh +0 -22
- package/dist/lib/functions/curlstatus.sh +0 -17
- package/dist/lib/functions/curltime.sh +0 -33
- package/dist/lib/functions/encode64.sh +0 -27
- package/dist/lib/functions/environment.sh +0 -38
- package/dist/lib/functions/extract.sh +0 -34
- package/dist/lib/functions/filehead.sh +0 -4
- package/dist/lib/functions/freespace.sh +0 -21
- package/dist/lib/functions/genpwd.sh +0 -41
- package/dist/lib/functions/goto.sh +0 -16
- package/dist/lib/functions/hidehiddenfiles.sh +0 -14
- package/dist/lib/functions/hostinfo.sh +0 -27
- package/dist/lib/functions/hstats.sh +0 -11
- package/dist/lib/functions/httpdebug.sh +0 -9
- package/dist/lib/functions/keygen.sh +0 -31
- package/dist/lib/functions/last.sh +0 -11
- package/dist/lib/functions/logout.sh +0 -12
- package/dist/lib/functions/lowercase.sh +0 -29
- package/dist/lib/functions/matrix.sh +0 -41
- package/dist/lib/functions/mount_read_only.sh +0 -11
- package/dist/lib/functions/myproc.sh +0 -9
- package/dist/lib/functions/prependpath.sh +0 -21
- package/dist/lib/functions/ql.sh +0 -9
- package/dist/lib/functions/rd.sh +0 -17
- package/dist/lib/functions/remove_disk.sh +0 -11
- package/dist/lib/functions/ren.sh +0 -13
- package/dist/lib/functions/showhiddenfiles.sh +0 -14
- package/dist/lib/functions/size.sh +0 -15
- package/dist/lib/functions/stopwatch.sh +0 -15
- package/dist/lib/functions/uppercase.sh +0 -29
- package/dist/lib/functions/view-source.sh +0 -9
- package/dist/lib/functions/vscode.sh +0 -32
- package/dist/lib/functions/whoisport.sh +0 -14
- package/dist/lib/functions/zipf.sh +0 -16
- package/dist/lib/functions.sh +0 -32
- package/dist/lib/history.sh +0 -142
- package/dist/lib/paths/ant/ant.paths.sh +0 -15
- package/dist/lib/paths/default/default.paths.sh +0 -19
- package/dist/lib/paths/homebrew/homebrew.paths.sh +0 -27
- package/dist/lib/paths/java/java.paths.sh +0 -19
- package/dist/lib/paths/maven/maven.paths.sh +0 -18
- package/dist/lib/paths/node/node.paths.sh +0 -15
- package/dist/lib/paths/nvm/nvm.paths.sh +0 -23
- package/dist/lib/paths/pnpm/pnpm.paths.sh +0 -15
- package/dist/lib/paths/python/python.paths.sh +0 -36
- package/dist/lib/paths/ruby/ruby.paths.sh +0 -25
- package/dist/lib/paths/tmux/tmux.paths.sh +0 -12
- package/dist/lib/paths.sh +0 -33
- package/dist/scripts/backup.sh +0 -95
- package/dist/scripts/banner.sh +0 -20
- package/dist/scripts/build.sh +0 -41
- package/dist/scripts/clean.sh +0 -31
- package/dist/scripts/compile.sh +0 -54
- package/dist/scripts/copy.sh +0 -108
- package/dist/scripts/dotfiles.sh +0 -63
- package/dist/scripts/download.sh +0 -35
- package/dist/scripts/help.sh +0 -57
- package/dist/scripts/ssh.sh +0 -55
- package/dist/scripts/unpack.sh +0 -28
- /package/{dist/lib/configurations → dot_config}/gem/gemrc +0 -0
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Enhanced Shell Benchmark with Per-Component Profiling
|
|
3
|
+
# Usage: dot benchmark [--detailed|--profile|--compare]
|
|
4
|
+
|
|
5
|
+
set -euo pipefail
|
|
6
|
+
|
|
7
|
+
# Colors
|
|
8
|
+
RED='\033[0;31m'
|
|
9
|
+
GREEN='\033[0;32m'
|
|
10
|
+
YELLOW='\033[1;33m'
|
|
11
|
+
BLUE='\033[0;34m'
|
|
12
|
+
CYAN='\033[0;36m'
|
|
13
|
+
NC='\033[0m'
|
|
14
|
+
|
|
15
|
+
BENCHMARK_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/dotfiles/benchmarks"
|
|
16
|
+
mkdir -p "$BENCHMARK_DIR"
|
|
17
|
+
|
|
18
|
+
# Parse arguments
|
|
19
|
+
DETAILED=false
|
|
20
|
+
PROFILE=false
|
|
21
|
+
COMPARE=false
|
|
22
|
+
while [[ $# -gt 0 ]]; do
|
|
23
|
+
case "$1" in
|
|
24
|
+
--detailed | -d)
|
|
25
|
+
DETAILED=true
|
|
26
|
+
shift
|
|
27
|
+
;;
|
|
28
|
+
--profile | -p)
|
|
29
|
+
PROFILE=true
|
|
30
|
+
shift
|
|
31
|
+
;;
|
|
32
|
+
--compare | -c)
|
|
33
|
+
COMPARE=true
|
|
34
|
+
shift
|
|
35
|
+
;;
|
|
36
|
+
*) shift ;;
|
|
37
|
+
esac
|
|
38
|
+
done
|
|
39
|
+
|
|
40
|
+
print_header() {
|
|
41
|
+
echo -e "\n${CYAN}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"
|
|
42
|
+
echo -e "${CYAN} Shell Performance Benchmark${NC}"
|
|
43
|
+
echo -e "${CYAN}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}\n"
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
# Basic timing function
|
|
47
|
+
time_command() {
|
|
48
|
+
local start end
|
|
49
|
+
start=$(python3 -c 'import time; print(int(time.time() * 1000))')
|
|
50
|
+
eval "$1" >/dev/null 2>&1
|
|
51
|
+
end=$(python3 -c 'import time; print(int(time.time() * 1000))')
|
|
52
|
+
echo $((end - start))
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
# Per-component profiling using zprof
|
|
56
|
+
run_zsh_profile() {
|
|
57
|
+
echo -e "${BLUE}Running Zsh profiler (zprof)...${NC}\n"
|
|
58
|
+
|
|
59
|
+
zsh -c '
|
|
60
|
+
zmodload zsh/zprof
|
|
61
|
+
source ~/.zshenv 2>/dev/null
|
|
62
|
+
source ~/.config/zsh/.zshrc 2>/dev/null
|
|
63
|
+
zprof
|
|
64
|
+
' 2>/dev/null | head -30
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
# Benchmark individual components
|
|
68
|
+
benchmark_components() {
|
|
69
|
+
echo -e "${BLUE}Per-Component Timing:${NC}\n"
|
|
70
|
+
printf "%-35s %8s\n" "Component" "Time (ms)"
|
|
71
|
+
echo "───────────────────────────────────────────────"
|
|
72
|
+
|
|
73
|
+
# zshenv (bootloader)
|
|
74
|
+
local zshenv_time
|
|
75
|
+
zshenv_time=$(time_command "zsh -c 'source ~/.zshenv 2>/dev/null; exit'")
|
|
76
|
+
printf "%-35s %8s\n" "zshenv (bootloader)" "${zshenv_time}ms"
|
|
77
|
+
|
|
78
|
+
# Core shell options
|
|
79
|
+
local options_time
|
|
80
|
+
options_time=$(time_command "zsh -c 'source ~/.config/zsh/rc.d/30-options.zsh 2>/dev/null; exit'" 2>/dev/null || echo "N/A")
|
|
81
|
+
printf "%-35s %8s\n" "rc.d/30-options.zsh" "${options_time}ms"
|
|
82
|
+
|
|
83
|
+
# Zinit plugins
|
|
84
|
+
local zinit_time
|
|
85
|
+
zinit_time=$(time_command "zsh -c 'source ~/.config/zsh/rc.d/20-zinit.zsh 2>/dev/null; exit'" 2>/dev/null || echo "N/A")
|
|
86
|
+
printf "%-35s %8s\n" "rc.d/20-zinit.zsh (plugins)" "${zinit_time}ms"
|
|
87
|
+
|
|
88
|
+
# Tool initializations
|
|
89
|
+
for tool in starship atuin zoxide fzf direnv; do
|
|
90
|
+
if command -v "$tool" >/dev/null 2>&1; then
|
|
91
|
+
local tool_time
|
|
92
|
+
case "$tool" in
|
|
93
|
+
starship) tool_time=$(time_command "starship init zsh >/dev/null") ;;
|
|
94
|
+
atuin) tool_time=$(time_command "atuin init zsh >/dev/null") ;;
|
|
95
|
+
zoxide) tool_time=$(time_command "zoxide init zsh >/dev/null") ;;
|
|
96
|
+
fzf) tool_time=$(time_command "true") ;; # FZF sourced from file
|
|
97
|
+
direnv) tool_time=$(time_command "direnv hook zsh >/dev/null") ;;
|
|
98
|
+
esac
|
|
99
|
+
printf "%-35s %8s\n" "$tool init" "${tool_time}ms"
|
|
100
|
+
fi
|
|
101
|
+
done
|
|
102
|
+
|
|
103
|
+
echo "───────────────────────────────────────────────"
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
# Run hyperfine benchmark
|
|
107
|
+
run_hyperfine() {
|
|
108
|
+
if ! command -v hyperfine >/dev/null 2>&1; then
|
|
109
|
+
echo -e "${YELLOW}hyperfine not installed. Using basic timing.${NC}"
|
|
110
|
+
local times=()
|
|
111
|
+
for _ in {1..5}; do
|
|
112
|
+
times+=("$(time_command "zsh -i -c exit")")
|
|
113
|
+
done
|
|
114
|
+
local sum=0
|
|
115
|
+
for t in "${times[@]}"; do sum=$((sum + t)); done
|
|
116
|
+
echo -e "\n${GREEN}Average startup time: $((sum / 5))ms${NC}"
|
|
117
|
+
return
|
|
118
|
+
fi
|
|
119
|
+
|
|
120
|
+
echo -e "\n${BLUE}Running hyperfine benchmark (10 runs, 3 warmup)...${NC}\n"
|
|
121
|
+
hyperfine --warmup 3 --runs 10 --shell=none \
|
|
122
|
+
--export-json "$BENCHMARK_DIR/latest.json" \
|
|
123
|
+
'zsh -i -c exit'
|
|
124
|
+
|
|
125
|
+
# Extract and display results
|
|
126
|
+
if [[ -f "$BENCHMARK_DIR/latest.json" ]]; then
|
|
127
|
+
local mean_ms
|
|
128
|
+
mean_ms=$(jq '.results[0].mean * 1000 | floor' "$BENCHMARK_DIR/latest.json")
|
|
129
|
+
local min_ms
|
|
130
|
+
min_ms=$(jq '.results[0].min * 1000 | floor' "$BENCHMARK_DIR/latest.json")
|
|
131
|
+
local max_ms
|
|
132
|
+
max_ms=$(jq '.results[0].max * 1000 | floor' "$BENCHMARK_DIR/latest.json")
|
|
133
|
+
|
|
134
|
+
echo -e "\n${GREEN}Results:${NC}"
|
|
135
|
+
echo " Mean: ${mean_ms}ms"
|
|
136
|
+
echo " Min: ${min_ms}ms"
|
|
137
|
+
echo " Max: ${max_ms}ms"
|
|
138
|
+
|
|
139
|
+
# Performance rating
|
|
140
|
+
if [[ $mean_ms -lt 100 ]]; then
|
|
141
|
+
echo -e "\n${GREEN}⚡ Excellent (<100ms)${NC}"
|
|
142
|
+
elif [[ $mean_ms -lt 200 ]]; then
|
|
143
|
+
echo -e "\n${GREEN}✓ Good (<200ms)${NC}"
|
|
144
|
+
elif [[ $mean_ms -lt 500 ]]; then
|
|
145
|
+
echo -e "\n${YELLOW}⚠ Acceptable (<500ms)${NC}"
|
|
146
|
+
else
|
|
147
|
+
echo -e "\n${RED}✗ Slow (>500ms) - optimization needed${NC}"
|
|
148
|
+
fi
|
|
149
|
+
|
|
150
|
+
# Save with timestamp for history
|
|
151
|
+
cp "$BENCHMARK_DIR/latest.json" "$BENCHMARK_DIR/$(date +%Y%m%d_%H%M%S).json"
|
|
152
|
+
fi
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
# Compare with previous benchmarks
|
|
156
|
+
compare_benchmarks() {
|
|
157
|
+
echo -e "${BLUE}Benchmark History:${NC}\n"
|
|
158
|
+
|
|
159
|
+
local files
|
|
160
|
+
files=$(find "$BENCHMARK_DIR" -name "*.json" -type f | sort -r | head -10)
|
|
161
|
+
|
|
162
|
+
if [[ -z "$files" ]]; then
|
|
163
|
+
echo "No benchmark history found."
|
|
164
|
+
return
|
|
165
|
+
fi
|
|
166
|
+
|
|
167
|
+
printf "%-20s %10s %10s %10s\n" "Date" "Mean" "Min" "Max"
|
|
168
|
+
echo "────────────────────────────────────────────────"
|
|
169
|
+
|
|
170
|
+
for f in $files; do
|
|
171
|
+
local basename
|
|
172
|
+
basename=$(basename "$f" .json)
|
|
173
|
+
if [[ "$basename" == "latest" ]]; then continue; fi
|
|
174
|
+
|
|
175
|
+
local mean min max
|
|
176
|
+
mean=$(jq '.results[0].mean * 1000 | floor' "$f" 2>/dev/null || echo "N/A")
|
|
177
|
+
min=$(jq '.results[0].min * 1000 | floor' "$f" 2>/dev/null || echo "N/A")
|
|
178
|
+
max=$(jq '.results[0].max * 1000 | floor' "$f" 2>/dev/null || echo "N/A")
|
|
179
|
+
|
|
180
|
+
printf "%-20s %10sms %10sms %10sms\n" "$basename" "$mean" "$min" "$max"
|
|
181
|
+
done
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
# Main execution
|
|
185
|
+
print_header
|
|
186
|
+
|
|
187
|
+
if $PROFILE; then
|
|
188
|
+
run_zsh_profile
|
|
189
|
+
elif $COMPARE; then
|
|
190
|
+
compare_benchmarks
|
|
191
|
+
elif $DETAILED; then
|
|
192
|
+
benchmark_components
|
|
193
|
+
echo ""
|
|
194
|
+
run_hyperfine
|
|
195
|
+
else
|
|
196
|
+
run_hyperfine
|
|
197
|
+
fi
|
|
198
|
+
|
|
199
|
+
echo -e "\n${CYAN}Tip: Run 'dot benchmark --detailed' for per-component timing${NC}"
|
|
200
|
+
echo -e "${CYAN} Run 'dot benchmark --profile' for zprof analysis${NC}"
|
|
201
|
+
echo -e "${CYAN} Run 'dot benchmark --compare' for history${NC}\n"
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# MIT License
|
|
3
|
+
# Copyright (c) 2026 Sebastien Rousseau
|
|
4
|
+
# See LICENSE file for details.
|
|
5
|
+
|
|
6
|
+
# Script: doctor.sh
|
|
7
|
+
# Description: Diagnostics tool for the dotfiles environment.
|
|
8
|
+
# Checks dependencies, paths, and configuration integrity.
|
|
9
|
+
|
|
10
|
+
set -euo pipefail
|
|
11
|
+
|
|
12
|
+
# Colors (respect NO_COLOR: https://no-color.org)
|
|
13
|
+
if [[ -z "${NO_COLOR:-}" ]] && [[ -t 1 ]]; then
|
|
14
|
+
GREEN='\033[0;32m'
|
|
15
|
+
RED='\033[0;31m'
|
|
16
|
+
YELLOW='\033[1;33m'
|
|
17
|
+
NC='\033[0m'
|
|
18
|
+
else
|
|
19
|
+
GREEN='' RED='' YELLOW='' NC=''
|
|
20
|
+
fi
|
|
21
|
+
|
|
22
|
+
echo " Dotfiles Doctor - System Diagnostics"
|
|
23
|
+
echo "-------------------------------------"
|
|
24
|
+
|
|
25
|
+
Errors=0
|
|
26
|
+
Warnings=0
|
|
27
|
+
|
|
28
|
+
log_success() { echo -e "${GREEN} $1${NC}"; }
|
|
29
|
+
log_fail() {
|
|
30
|
+
echo -e "${RED} $1${NC}"
|
|
31
|
+
Errors=$((Errors + 1))
|
|
32
|
+
}
|
|
33
|
+
log_warn() {
|
|
34
|
+
echo -e "${YELLOW}️ $1${NC}"
|
|
35
|
+
Warnings=$((Warnings + 1))
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
# 1. Check Dependencies
|
|
39
|
+
echo "Checking Core Dependencies..."
|
|
40
|
+
for cmd in git curl chezmoi starship rg bat; do
|
|
41
|
+
if command -v "$cmd" &>/dev/null; then
|
|
42
|
+
log_success "Found $cmd: $(command -v "$cmd")"
|
|
43
|
+
else
|
|
44
|
+
log_fail "Missing $cmd"
|
|
45
|
+
fi
|
|
46
|
+
done
|
|
47
|
+
|
|
48
|
+
echo -e "\nChecking Optional AI CLIs..."
|
|
49
|
+
for cmd in claude gemini sgpt ollama opencode aider; do
|
|
50
|
+
if command -v "$cmd" &>/dev/null; then
|
|
51
|
+
log_success "Found $cmd: $(command -v "$cmd")"
|
|
52
|
+
else
|
|
53
|
+
log_warn "Missing $cmd (optional)"
|
|
54
|
+
fi
|
|
55
|
+
done
|
|
56
|
+
|
|
57
|
+
# 2. Check XDG Compliance
|
|
58
|
+
echo -e "\nChecking Environment..."
|
|
59
|
+
if [[ -z "${XDG_CONFIG_HOME:-}" ]]; then
|
|
60
|
+
log_warn "XDG_CONFIG_HOME is not set (Defaulting to ~/.config)"
|
|
61
|
+
else
|
|
62
|
+
log_success "XDG_CONFIG_HOME=$XDG_CONFIG_HOME"
|
|
63
|
+
fi
|
|
64
|
+
|
|
65
|
+
if [[ -z "${PIPX_HOME:-}" ]]; then
|
|
66
|
+
log_warn "PIPX_HOME is not set (Check paths configuration)"
|
|
67
|
+
else
|
|
68
|
+
log_success "PIPX_HOME=$PIPX_HOME"
|
|
69
|
+
fi
|
|
70
|
+
|
|
71
|
+
# 3. Check Chezmoi State
|
|
72
|
+
echo -e "\nChecking Chezmoi State..."
|
|
73
|
+
if chezmoi verify &>/dev/null; then
|
|
74
|
+
log_success "Chezmoi state is synchronized"
|
|
75
|
+
else
|
|
76
|
+
log_fail "Chezmoi state has drifted (Run 'dot drift' to see details)"
|
|
77
|
+
fi
|
|
78
|
+
|
|
79
|
+
# 4. Check Critical Files
|
|
80
|
+
echo -e "\nChecking Critical Files..."
|
|
81
|
+
if [[ -f "$HOME/.zshrc" ]]; then
|
|
82
|
+
log_success "Found .zshrc"
|
|
83
|
+
else
|
|
84
|
+
log_fail "Missing .zshrc"
|
|
85
|
+
fi
|
|
86
|
+
|
|
87
|
+
# 5. Check for Broken Symlinks (Ghost Links)
|
|
88
|
+
echo -e "\nChecking for Broken Symlinks..."
|
|
89
|
+
broken_links=0
|
|
90
|
+
while IFS= read -r -d '' link; do
|
|
91
|
+
if [[ ! -e "$link" ]]; then
|
|
92
|
+
log_warn "Broken symlink: $link -> $(readlink "$link")"
|
|
93
|
+
broken_links=$((broken_links + 1))
|
|
94
|
+
fi
|
|
95
|
+
done < <(find "$HOME" -maxdepth 3 -type l -print0 2>/dev/null)
|
|
96
|
+
|
|
97
|
+
if [[ $broken_links -eq 0 ]]; then
|
|
98
|
+
log_success "No broken symlinks found"
|
|
99
|
+
else
|
|
100
|
+
log_warn "$broken_links broken symlink(s) detected"
|
|
101
|
+
fi
|
|
102
|
+
|
|
103
|
+
# Summary
|
|
104
|
+
echo -e "\n-------------------------------------"
|
|
105
|
+
if [[ $Errors -eq 0 ]]; then
|
|
106
|
+
if [[ $Warnings -eq 0 ]]; then
|
|
107
|
+
echo -e "${GREEN}All systems healthy! ${NC}"
|
|
108
|
+
else
|
|
109
|
+
echo -e "${YELLOW}System healthy with $Warnings warnings.${NC}"
|
|
110
|
+
fi
|
|
111
|
+
else
|
|
112
|
+
echo -e "${RED}Found $Errors errors and $Warnings warnings.${NC}"
|
|
113
|
+
echo "Run 'dot heal' to attempt auto-repair."
|
|
114
|
+
exit 1
|
|
115
|
+
fi
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
if ! command -v chezmoi >/dev/null; then
|
|
5
|
+
echo "chezmoi not found." >&2
|
|
6
|
+
exit 1
|
|
7
|
+
fi
|
|
8
|
+
|
|
9
|
+
echo "=== Dotfiles Drift Dashboard ==="
|
|
10
|
+
|
|
11
|
+
status=$(chezmoi status || true)
|
|
12
|
+
if [[ -z "$status" ]]; then
|
|
13
|
+
echo "Clean: no local drift detected."
|
|
14
|
+
exit 0
|
|
15
|
+
fi
|
|
16
|
+
|
|
17
|
+
printf "\nChanged files:\n"
|
|
18
|
+
printf '%s\n' "$status"
|
|
19
|
+
|
|
20
|
+
count=$(printf '%s\n' "$status" | wc -l | tr -d ' ')
|
|
21
|
+
printf "\nTotal: %s\n" "$count"
|
|
22
|
+
|
|
23
|
+
if [[ "${DOTFILES_DRIFT_SHOW_DIFF:-0}" = "1" ]]; then
|
|
24
|
+
printf "\n--- Diff (excluding scripts/install/tests) ---\n"
|
|
25
|
+
chezmoi diff --exclude scripts --exclude install --exclude tests || true
|
|
26
|
+
fi
|
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Dotfiles Health Check Dashboard
|
|
3
|
+
# Usage: dot health [--verbose|-v] [--json]
|
|
4
|
+
|
|
5
|
+
set -euo pipefail
|
|
6
|
+
|
|
7
|
+
# Colors
|
|
8
|
+
RED='\033[0;31m'
|
|
9
|
+
GREEN='\033[0;32m'
|
|
10
|
+
YELLOW='\033[1;33m'
|
|
11
|
+
BLUE='\033[0;34m'
|
|
12
|
+
CYAN='\033[0;36m'
|
|
13
|
+
GRAY='\033[0;90m'
|
|
14
|
+
NC='\033[0m'
|
|
15
|
+
|
|
16
|
+
# Parse arguments (VERBOSE exported for potential use by sourced scripts)
|
|
17
|
+
export VERBOSE=false
|
|
18
|
+
JSON_OUTPUT=false
|
|
19
|
+
while [[ $# -gt 0 ]]; do
|
|
20
|
+
case "$1" in
|
|
21
|
+
--verbose | -v)
|
|
22
|
+
VERBOSE=true
|
|
23
|
+
shift
|
|
24
|
+
;;
|
|
25
|
+
--json)
|
|
26
|
+
JSON_OUTPUT=true
|
|
27
|
+
shift
|
|
28
|
+
;;
|
|
29
|
+
*) shift ;;
|
|
30
|
+
esac
|
|
31
|
+
done
|
|
32
|
+
|
|
33
|
+
# Health check results
|
|
34
|
+
declare -A RESULTS
|
|
35
|
+
TOTAL_CHECKS=0
|
|
36
|
+
PASSED_CHECKS=0
|
|
37
|
+
WARNINGS=0
|
|
38
|
+
FAILURES=0
|
|
39
|
+
|
|
40
|
+
check() {
|
|
41
|
+
local name="$1"
|
|
42
|
+
local status="$2"
|
|
43
|
+
local message="${3:-}"
|
|
44
|
+
|
|
45
|
+
TOTAL_CHECKS=$((TOTAL_CHECKS + 1))
|
|
46
|
+
|
|
47
|
+
case "$status" in
|
|
48
|
+
pass)
|
|
49
|
+
PASSED_CHECKS=$((PASSED_CHECKS + 1))
|
|
50
|
+
# shellcheck disable=SC2034
|
|
51
|
+
RESULTS["$name"]="pass"
|
|
52
|
+
if ! $JSON_OUTPUT; then
|
|
53
|
+
printf "${GREEN}✓${NC} %-35s ${GREEN}OK${NC}\n" "$name"
|
|
54
|
+
fi
|
|
55
|
+
;;
|
|
56
|
+
warn)
|
|
57
|
+
WARNINGS=$((WARNINGS + 1))
|
|
58
|
+
# shellcheck disable=SC2034
|
|
59
|
+
RESULTS["$name"]="warn"
|
|
60
|
+
if ! $JSON_OUTPUT; then
|
|
61
|
+
printf "${YELLOW}⚠${NC} %-35s ${YELLOW}WARNING${NC}"
|
|
62
|
+
[[ -n "$message" ]] && printf " ${GRAY}%s${NC}" "$message"
|
|
63
|
+
printf "\n"
|
|
64
|
+
fi
|
|
65
|
+
;;
|
|
66
|
+
fail)
|
|
67
|
+
FAILURES=$((FAILURES + 1))
|
|
68
|
+
# shellcheck disable=SC2034
|
|
69
|
+
RESULTS["$name"]="fail"
|
|
70
|
+
if ! $JSON_OUTPUT; then
|
|
71
|
+
printf "${RED}✗${NC} %-35s ${RED}FAILED${NC}"
|
|
72
|
+
[[ -n "$message" ]] && printf " ${GRAY}%s${NC}" "$message"
|
|
73
|
+
printf "\n"
|
|
74
|
+
fi
|
|
75
|
+
;;
|
|
76
|
+
esac
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
print_header() {
|
|
80
|
+
if ! $JSON_OUTPUT; then
|
|
81
|
+
echo -e "\n${CYAN}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"
|
|
82
|
+
echo -e "${CYAN} Dotfiles Health Dashboard${NC}"
|
|
83
|
+
echo -e "${CYAN}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}\n"
|
|
84
|
+
fi
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
check_section() {
|
|
88
|
+
if ! $JSON_OUTPUT; then
|
|
89
|
+
echo -e "\n${BLUE}▸ $1${NC}"
|
|
90
|
+
echo "───────────────────────────────────────────────"
|
|
91
|
+
fi
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
# === Core Checks ===
|
|
95
|
+
run_checks() {
|
|
96
|
+
# --- Dotfiles Core ---
|
|
97
|
+
check_section "Dotfiles Core"
|
|
98
|
+
|
|
99
|
+
# Chezmoi
|
|
100
|
+
if command -v chezmoi >/dev/null 2>&1; then
|
|
101
|
+
check "Chezmoi installed" "pass"
|
|
102
|
+
# Check if source dir exists
|
|
103
|
+
if [[ -d "${HOME}/.local/share/chezmoi" ]] || [[ -d "${HOME}/.dotfiles" ]]; then
|
|
104
|
+
check "Chezmoi source directory" "pass"
|
|
105
|
+
else
|
|
106
|
+
check "Chezmoi source directory" "fail" "Not found"
|
|
107
|
+
fi
|
|
108
|
+
else
|
|
109
|
+
check "Chezmoi installed" "fail" "Not installed"
|
|
110
|
+
fi
|
|
111
|
+
|
|
112
|
+
# Git
|
|
113
|
+
if command -v git >/dev/null 2>&1; then
|
|
114
|
+
check "Git installed" "pass"
|
|
115
|
+
if git config user.email >/dev/null 2>&1; then
|
|
116
|
+
check "Git user configured" "pass"
|
|
117
|
+
else
|
|
118
|
+
check "Git user configured" "warn" "Email not set"
|
|
119
|
+
fi
|
|
120
|
+
else
|
|
121
|
+
check "Git installed" "fail"
|
|
122
|
+
fi
|
|
123
|
+
|
|
124
|
+
# --- Shell ---
|
|
125
|
+
check_section "Shell Environment"
|
|
126
|
+
|
|
127
|
+
# Zsh
|
|
128
|
+
if command -v zsh >/dev/null 2>&1; then
|
|
129
|
+
check "Zsh installed" "pass"
|
|
130
|
+
if [[ "$SHELL" == *"zsh"* ]]; then
|
|
131
|
+
check "Zsh is default shell" "pass"
|
|
132
|
+
else
|
|
133
|
+
check "Zsh is default shell" "warn" "Current: $SHELL"
|
|
134
|
+
fi
|
|
135
|
+
else
|
|
136
|
+
check "Zsh installed" "fail"
|
|
137
|
+
fi
|
|
138
|
+
|
|
139
|
+
# Zinit
|
|
140
|
+
if [[ -d "${ZINIT_HOME:-$HOME/.local/share/zinit}" ]]; then
|
|
141
|
+
check "Zinit plugin manager" "pass"
|
|
142
|
+
else
|
|
143
|
+
check "Zinit plugin manager" "warn" "Not found"
|
|
144
|
+
fi
|
|
145
|
+
|
|
146
|
+
# Starship
|
|
147
|
+
if command -v starship >/dev/null 2>&1; then
|
|
148
|
+
check "Starship prompt" "pass"
|
|
149
|
+
else
|
|
150
|
+
check "Starship prompt" "warn" "Not installed"
|
|
151
|
+
fi
|
|
152
|
+
|
|
153
|
+
# --- Development Tools ---
|
|
154
|
+
check_section "Development Tools"
|
|
155
|
+
|
|
156
|
+
# Node.js
|
|
157
|
+
if command -v node >/dev/null 2>&1; then
|
|
158
|
+
local node_version
|
|
159
|
+
node_version=$(node --version 2>/dev/null)
|
|
160
|
+
check "Node.js ($node_version)" "pass"
|
|
161
|
+
else
|
|
162
|
+
check "Node.js" "warn" "Not installed"
|
|
163
|
+
fi
|
|
164
|
+
|
|
165
|
+
# fnm
|
|
166
|
+
if command -v fnm >/dev/null 2>&1; then
|
|
167
|
+
check "fnm (Node version manager)" "pass"
|
|
168
|
+
else
|
|
169
|
+
check "fnm" "warn" "Not installed"
|
|
170
|
+
fi
|
|
171
|
+
|
|
172
|
+
# Python
|
|
173
|
+
if command -v python3 >/dev/null 2>&1; then
|
|
174
|
+
local py_version
|
|
175
|
+
py_version=$(python3 --version 2>/dev/null | cut -d' ' -f2)
|
|
176
|
+
check "Python ($py_version)" "pass"
|
|
177
|
+
else
|
|
178
|
+
check "Python" "warn" "Not installed"
|
|
179
|
+
fi
|
|
180
|
+
|
|
181
|
+
# Rust
|
|
182
|
+
if command -v rustc >/dev/null 2>&1; then
|
|
183
|
+
check "Rust toolchain" "pass"
|
|
184
|
+
else
|
|
185
|
+
check "Rust toolchain" "warn" "Not installed"
|
|
186
|
+
fi
|
|
187
|
+
|
|
188
|
+
# Go
|
|
189
|
+
if command -v go >/dev/null 2>&1; then
|
|
190
|
+
check "Go" "pass"
|
|
191
|
+
else
|
|
192
|
+
check "Go" "warn" "Not installed"
|
|
193
|
+
fi
|
|
194
|
+
|
|
195
|
+
# --- CLI Tools ---
|
|
196
|
+
check_section "CLI Tools"
|
|
197
|
+
|
|
198
|
+
local tools=("fzf" "ripgrep:rg" "fd" "bat" "eza" "zoxide" "atuin" "delta" "jq" "yq" "sops" "mise" "just" "zellij" "hyperfine")
|
|
199
|
+
for tool in "${tools[@]}"; do
|
|
200
|
+
local name="${tool%%:*}"
|
|
201
|
+
local cmd="${tool##*:}"
|
|
202
|
+
if command -v "$cmd" >/dev/null 2>&1; then
|
|
203
|
+
check "$name" "pass"
|
|
204
|
+
else
|
|
205
|
+
check "$name" "warn" "Not installed"
|
|
206
|
+
fi
|
|
207
|
+
done
|
|
208
|
+
|
|
209
|
+
# --- Editors ---
|
|
210
|
+
check_section "Editors"
|
|
211
|
+
|
|
212
|
+
if command -v nvim >/dev/null 2>&1; then
|
|
213
|
+
check "Neovim" "pass"
|
|
214
|
+
if [[ -d "${XDG_DATA_HOME:-$HOME/.local/share}/nvim/lazy" ]]; then
|
|
215
|
+
check "Neovim plugins (lazy.nvim)" "pass"
|
|
216
|
+
else
|
|
217
|
+
check "Neovim plugins" "warn" "Lazy.nvim not found"
|
|
218
|
+
fi
|
|
219
|
+
else
|
|
220
|
+
check "Neovim" "warn" "Not installed"
|
|
221
|
+
fi
|
|
222
|
+
|
|
223
|
+
# --- Terminal ---
|
|
224
|
+
check_section "Terminal"
|
|
225
|
+
|
|
226
|
+
if command -v ghostty >/dev/null 2>&1 || [[ -d "/Applications/Ghostty.app" ]]; then
|
|
227
|
+
check "Ghostty terminal" "pass"
|
|
228
|
+
else
|
|
229
|
+
check "Ghostty terminal" "warn" "Not installed"
|
|
230
|
+
fi
|
|
231
|
+
|
|
232
|
+
# Fonts - check both Linux and macOS font locations
|
|
233
|
+
local font_found=false
|
|
234
|
+
if fc-list 2>/dev/null | grep -qi "JetBrains"; then
|
|
235
|
+
font_found=true
|
|
236
|
+
elif [[ -d "$HOME/Library/Fonts" ]] && compgen -G "$HOME/Library/Fonts/"*[Jj]et[Bb]rains* >/dev/null 2>&1; then
|
|
237
|
+
font_found=true
|
|
238
|
+
elif [[ -d "$HOME/.local/share/fonts" ]] && compgen -G "$HOME/.local/share/fonts/"*[Jj]et[Bb]rains* >/dev/null 2>&1; then
|
|
239
|
+
font_found=true
|
|
240
|
+
fi
|
|
241
|
+
|
|
242
|
+
if $font_found; then
|
|
243
|
+
check "JetBrains Mono Nerd Font" "pass"
|
|
244
|
+
else
|
|
245
|
+
check "JetBrains Mono Nerd Font" "warn" "Not installed"
|
|
246
|
+
fi
|
|
247
|
+
|
|
248
|
+
# --- Security ---
|
|
249
|
+
check_section "Security"
|
|
250
|
+
|
|
251
|
+
# Age encryption
|
|
252
|
+
if command -v age >/dev/null 2>&1; then
|
|
253
|
+
check "Age encryption" "pass"
|
|
254
|
+
if [[ -f "${HOME}/.config/chezmoi/key.txt" ]]; then
|
|
255
|
+
check "Age key configured" "pass"
|
|
256
|
+
else
|
|
257
|
+
check "Age key configured" "warn" "Key not found"
|
|
258
|
+
fi
|
|
259
|
+
else
|
|
260
|
+
check "Age encryption" "warn" "Not installed"
|
|
261
|
+
fi
|
|
262
|
+
|
|
263
|
+
# SSH
|
|
264
|
+
if [[ -f "${HOME}/.ssh/id_ed25519" ]] || [[ -f "${HOME}/.ssh/id_rsa" ]]; then
|
|
265
|
+
check "SSH keys present" "pass"
|
|
266
|
+
else
|
|
267
|
+
check "SSH keys present" "warn" "No keys found"
|
|
268
|
+
fi
|
|
269
|
+
|
|
270
|
+
# GPG
|
|
271
|
+
if command -v gpg >/dev/null 2>&1; then
|
|
272
|
+
if gpg --list-secret-keys 2>/dev/null | grep -q sec; then
|
|
273
|
+
check "GPG keys" "pass"
|
|
274
|
+
else
|
|
275
|
+
check "GPG keys" "warn" "No secret keys"
|
|
276
|
+
fi
|
|
277
|
+
else
|
|
278
|
+
check "GPG" "warn" "Not installed"
|
|
279
|
+
fi
|
|
280
|
+
|
|
281
|
+
# --- Performance ---
|
|
282
|
+
check_section "Performance"
|
|
283
|
+
|
|
284
|
+
# Shell startup time
|
|
285
|
+
if command -v zsh >/dev/null 2>&1; then
|
|
286
|
+
local startup_time
|
|
287
|
+
startup_time=$({ time zsh -i -c exit; } 2>&1 | grep real | awk '{print $2}' | sed 's/[ms]//g')
|
|
288
|
+
# Try to parse the time (handle different formats)
|
|
289
|
+
if [[ -n "$startup_time" ]]; then
|
|
290
|
+
# Simple check - if startup mentions 0m0, it's under 1 second
|
|
291
|
+
check "Shell startup time" "pass"
|
|
292
|
+
else
|
|
293
|
+
check "Shell startup time" "warn" "Could not measure"
|
|
294
|
+
fi
|
|
295
|
+
fi
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
print_summary() {
|
|
299
|
+
if $JSON_OUTPUT; then
|
|
300
|
+
echo "{"
|
|
301
|
+
echo " \"total\": $TOTAL_CHECKS,"
|
|
302
|
+
echo " \"passed\": $PASSED_CHECKS,"
|
|
303
|
+
echo " \"warnings\": $WARNINGS,"
|
|
304
|
+
echo " \"failures\": $FAILURES,"
|
|
305
|
+
echo " \"score\": $((PASSED_CHECKS * 100 / TOTAL_CHECKS))"
|
|
306
|
+
echo "}"
|
|
307
|
+
return
|
|
308
|
+
fi
|
|
309
|
+
|
|
310
|
+
local score=$((PASSED_CHECKS * 100 / TOTAL_CHECKS))
|
|
311
|
+
|
|
312
|
+
echo -e "\n${CYAN}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"
|
|
313
|
+
echo -e "${CYAN} Summary${NC}"
|
|
314
|
+
echo -e "${CYAN}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}\n"
|
|
315
|
+
|
|
316
|
+
echo -e " Total checks: ${TOTAL_CHECKS}"
|
|
317
|
+
echo -e " ${GREEN}Passed:${NC} ${PASSED_CHECKS}"
|
|
318
|
+
echo -e " ${YELLOW}Warnings:${NC} ${WARNINGS}"
|
|
319
|
+
echo -e " ${RED}Failures:${NC} ${FAILURES}"
|
|
320
|
+
echo ""
|
|
321
|
+
|
|
322
|
+
# Health score bar
|
|
323
|
+
local bar_width=30
|
|
324
|
+
local filled=$((score * bar_width / 100))
|
|
325
|
+
local empty=$((bar_width - filled))
|
|
326
|
+
|
|
327
|
+
printf " Health Score: ["
|
|
328
|
+
if [[ $score -ge 80 ]]; then
|
|
329
|
+
printf '%s' "${GREEN}"
|
|
330
|
+
elif [[ $score -ge 60 ]]; then
|
|
331
|
+
printf '%s' "${YELLOW}"
|
|
332
|
+
else
|
|
333
|
+
printf '%s' "${RED}"
|
|
334
|
+
fi
|
|
335
|
+
printf "%${filled}s" | tr ' ' '█'
|
|
336
|
+
printf '%s' "${NC}"
|
|
337
|
+
printf "%${empty}s" | tr ' ' '░'
|
|
338
|
+
printf "] %s%%\n\n" "${score}"
|
|
339
|
+
|
|
340
|
+
if [[ $score -ge 90 ]]; then
|
|
341
|
+
echo -e " ${GREEN}⚡ Excellent! Your dotfiles are in great shape.${NC}"
|
|
342
|
+
elif [[ $score -ge 70 ]]; then
|
|
343
|
+
echo -e " ${GREEN}✓ Good! Minor improvements possible.${NC}"
|
|
344
|
+
elif [[ $score -ge 50 ]]; then
|
|
345
|
+
echo -e " ${YELLOW}⚠ Fair. Consider addressing warnings.${NC}"
|
|
346
|
+
else
|
|
347
|
+
echo -e " ${RED}✗ Needs attention. Multiple issues found.${NC}"
|
|
348
|
+
fi
|
|
349
|
+
|
|
350
|
+
echo ""
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
# Main
|
|
354
|
+
print_header
|
|
355
|
+
run_checks
|
|
356
|
+
print_summary
|