@sebastienrousseau/dotfiles 0.2.481 → 0.2.499

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 (317) hide show
  1. package/docs/ARCHITECTURE.md +29 -196
  2. package/docs/COMPLIANCE.md +10 -10
  3. package/docs/COPYRIGHT +3 -4
  4. package/docs/OPERATIONS.md +38 -65
  5. package/docs/PLAN.md +3 -3
  6. package/docs/PR_DESCRIPTION.md +85 -84
  7. package/docs/ROADMAP.md +11 -11
  8. package/docs/ROADMAP_legacy.md +556 -0
  9. package/docs/SECURITY_CHECKLIST.md +1 -1
  10. package/docs/TASK.md +4 -4
  11. package/docs/WALKTHROUGH.md +33 -152
  12. package/package.json +17 -5
  13. package/scripts/backup.sh +142 -0
  14. package/scripts/banner.sh +20 -0
  15. package/scripts/benchmark.sh +20 -0
  16. package/scripts/build.sh +41 -0
  17. package/scripts/clean.sh +31 -0
  18. package/scripts/compile.sh +54 -0
  19. package/scripts/copy.sh +108 -0
  20. package/scripts/{tools/detect-collisions.py → detect-collisions.py} +1 -1
  21. package/scripts/doctor.sh +79 -0
  22. package/scripts/dotfiles.sh +63 -0
  23. package/scripts/download.sh +35 -0
  24. package/scripts/help.sh +57 -0
  25. package/scripts/lock-configs.sh +57 -0
  26. package/scripts/package.sh +46 -0
  27. package/scripts/ssh.sh +55 -0
  28. package/scripts/teleport.sh +23 -0
  29. package/scripts/{tests/test-aliases.sh → test-aliases.sh} +3 -3
  30. package/scripts/test_smoke.sh +88 -0
  31. package/scripts/unpack.sh +28 -0
  32. package/scripts/{diagnostics/verify_state.sh → verify_state.sh} +21 -21
  33. package/templates/projects/go/README.md +0 -4
  34. package/templates/projects/node/README.md +0 -4
  35. package/templates/projects/python/README.md +0 -4
  36. package/templates/projects/python/pyproject.toml +0 -15
  37. package/CHANGELOG.md +0 -285
  38. package/LICENSE +0 -1283
  39. package/README.md +0 -315
  40. package/docs/ALIASES.md +0 -128
  41. package/docs/FEATURES.md +0 -166
  42. package/docs/FONTS.md +0 -147
  43. package/docs/INSTALL.md +0 -119
  44. package/docs/KEYS.md +0 -40
  45. package/docs/KEY_ROTATION.md +0 -219
  46. package/docs/LEGACY_ROADMAP.md +0 -142
  47. package/docs/NEOVIM_IDE_GUIDE.md +0 -52
  48. package/docs/README.md +0 -269
  49. package/docs/REPO_AUDIT.md +0 -23
  50. package/docs/SCREENSHOTS.md +0 -116
  51. package/docs/SECRETS.md +0 -76
  52. package/docs/SECURITY.md +0 -30
  53. package/docs/TESTING.md +0 -190
  54. package/docs/TOOLS.md +0 -146
  55. package/docs/TROUBLESHOOTING.md +0 -112
  56. package/docs/UTILS.md +0 -105
  57. package/docs/WSL2_NIX_TROUBLESHOOTING.md +0 -723
  58. package/docs/adr/ADR-001-ci-cd-pipeline.md +0 -101
  59. package/docs/adr/ADR-002-shell-performance.md +0 -121
  60. package/docs/adr/ADR-003-security-first.md +0 -140
  61. package/docs/adr/ADR-004-cli-architecture.md +0 -157
  62. package/docs/adr/ADR-005-chezmoi-choice.md +0 -89
  63. package/docs/adr/ADR-006-shell-selection.md +0 -115
  64. package/docs/adr/README.md +0 -33
  65. package/docs/themes/README.md +0 -20
  66. package/dot_config/aider/aider.conf.yml +0 -32
  67. package/dot_config/alacritty/alacritty.toml.tmpl +0 -483
  68. package/dot_config/ansible/ansible.cfg.tmpl +0 -11
  69. package/dot_config/atuin/config.toml +0 -23
  70. package/dot_config/bat/config +0 -8
  71. package/dot_config/brave-flags.conf.tmpl +0 -7
  72. package/dot_config/btop/btop.conf +0 -16
  73. package/dot_config/btop/themes/tokyonight.theme +0 -34
  74. package/dot_config/bun/bunfig.toml.tmpl +0 -33
  75. package/dot_config/claude/mcp_servers.json +0 -49
  76. package/dot_config/clippy.toml +0 -55
  77. package/dot_config/containers/containers.conf +0 -14
  78. package/dot_config/curl/dot_curlrc +0 -18
  79. package/dot_config/dlv/config.yml +0 -39
  80. package/dot_config/docker/config.json.tmpl +0 -15
  81. package/dot_config/dotfiles/boot/README.md +0 -11
  82. package/dot_config/dotfiles/grub/README.md +0 -11
  83. package/dot_config/dotfiles/lock/README.md +0 -11
  84. package/dot_config/dotfiles/versions.env.tmpl +0 -19
  85. package/dot_config/duf/duf.conf +0 -6
  86. package/dot_config/duti/defaults.duti +0 -5
  87. package/dot_config/emoji/emoji.txt +0 -34
  88. package/dot_config/fastfetch/config.jsonc +0 -28
  89. package/dot_config/firefox/user.js +0 -8
  90. package/dot_config/flatpak/flatpak.list +0 -4
  91. package/dot_config/fontconfig/fonts.conf.tmpl +0 -44
  92. package/dot_config/gem/gemrc +0 -9
  93. package/dot_config/gh/config.yml +0 -12
  94. package/dot_config/ghostty/config.tmpl +0 -661
  95. package/dot_config/git/attributes +0 -12
  96. package/dot_config/git/config.tmpl +0 -77
  97. package/dot_config/git/ignore +0 -27
  98. package/dot_config/gnupg/gpg-agent.conf.tmpl +0 -11
  99. package/dot_config/go/aliases.sh +0 -61
  100. package/dot_config/go/env.sh +0 -24
  101. package/dot_config/go/golangci.yml +0 -118
  102. package/dot_config/go/gopls.json +0 -30
  103. package/dot_config/goose/config.yaml +0 -29
  104. package/dot_config/gtk-3.0/gtk.css.tmpl +0 -305
  105. package/dot_config/gtk-3.0/settings.ini.tmpl +0 -66
  106. package/dot_config/gtk-4.0/gtk.css.tmpl +0 -309
  107. package/dot_config/gtk-4.0/settings.ini.tmpl +0 -21
  108. package/dot_config/htop/htoprc +0 -20
  109. package/dot_config/ice/README.md +0 -13
  110. package/dot_config/inputrc +0 -2
  111. package/dot_config/ipython/profile_default/ipython_config.py.tmpl +0 -5
  112. package/dot_config/just/justfile +0 -104
  113. package/dot_config/k9s/config.yaml.tmpl +0 -65
  114. package/dot_config/k9s/skins/catppuccin-mocha.yaml +0 -116
  115. package/dot_config/karabiner/karabiner.json +0 -14
  116. package/dot_config/kitty/kitty.conf.tmpl +0 -517
  117. package/dot_config/lazydocker/config.yml +0 -186
  118. package/dot_config/lazygit/config.yml +0 -23
  119. package/dot_config/lsd/config.yaml +0 -19
  120. package/dot_config/mas/masapps.txt +0 -5
  121. package/dot_config/minikube/config.json +0 -13
  122. package/dot_config/mise/config.toml +0 -41
  123. package/dot_config/mongosh/mongoshrc.js +0 -67
  124. package/dot_config/mycli/myclirc +0 -67
  125. package/dot_config/nano/nanorc +0 -28
  126. package/dot_config/ncdu/config +0 -12
  127. package/dot_config/nvim/init.lua +0 -4
  128. package/dot_config/nvim/lazy-lock.json +0 -27
  129. package/dot_config/nvim/lua/config/autocmds.lua +0 -63
  130. package/dot_config/nvim/lua/config/keymaps.lua +0 -87
  131. package/dot_config/nvim/lua/config/lazy.lua +0 -34
  132. package/dot_config/nvim/lua/config/options.lua +0 -48
  133. package/dot_config/nvim/lua/plugins/coding.lua +0 -234
  134. package/dot_config/nvim/lua/plugins/dap.lua +0 -201
  135. package/dot_config/nvim/lua/plugins/editor.lua +0 -59
  136. package/dot_config/nvim/lua/plugins/git.lua +0 -9
  137. package/dot_config/nvim/lua/plugins/lsp.lua +0 -221
  138. package/dot_config/nvim/lua/plugins/markdown.lua +0 -17
  139. package/dot_config/nvim/lua/plugins/rust.lua +0 -33
  140. package/dot_config/nvim/lua/plugins/sessions.lua +0 -32
  141. package/dot_config/nvim/lua/plugins/ui.lua +0 -537
  142. package/dot_config/nvim/snippets/all.lua +0 -9
  143. package/dot_config/nvim/snippets/python.lua +0 -16
  144. package/dot_config/pip/pip.conf.tmpl +0 -32
  145. package/dot_config/pypoetry/config.toml.tmpl +0 -6
  146. package/dot_config/pyrightconfig.json.tmpl +0 -5
  147. package/dot_config/raycast/README.md +0 -13
  148. package/dot_config/redis/redisclirc +0 -41
  149. package/dot_config/shell/00-container-detect.sh +0 -53
  150. package/dot_config/shell/00-core-paths.sh.tmpl +0 -95
  151. package/dot_config/shell/05-core-safety.sh.tmpl +0 -13
  152. package/dot_config/shell/40-ls-colors.sh.tmpl +0 -31
  153. package/dot_config/shell/50-logic-functions.sh.tmpl +0 -10
  154. package/dot_config/shell/90-theme-switch.sh +0 -70
  155. package/dot_config/shell/90-ux-aliases.sh.tmpl +0 -35
  156. package/dot_config/shell/91-ux-aliases-lazy.sh.tmpl +0 -23
  157. package/dot_config/shell/Brewfile +0 -207
  158. package/dot_config/shell/Brewfile.cask +0 -92
  159. package/dot_config/shell/Brewfile.cli +0 -119
  160. package/dot_config/shell/README.md +0 -267
  161. package/dot_config/shell/custom/context_suggest.zsh +0 -68
  162. package/dot_config/shell/custom/error_analysis.zsh +0 -45
  163. package/dot_config/sops/dot_sops.yaml +0 -23
  164. package/dot_config/starship.toml.tmpl +0 -124
  165. package/dot_config/task/Taskfile.yml +0 -86
  166. package/dot_config/tflint/tflint.hcl.tmpl +0 -9
  167. package/dot_config/tmux/tmux.conf.tmpl +0 -181
  168. package/dot_config/topgrade/topgrade.toml.tmpl +0 -42
  169. package/dot_config/vscode/extensions.txt +0 -11
  170. package/dot_config/vscode/settings.json.tmpl +0 -123
  171. package/dot_config/waybar/style.css +0 -8
  172. package/dot_config/wezterm/wezterm.lua.tmpl +0 -236
  173. package/dot_config/wget/wgetrc +0 -12
  174. package/dot_config/yarn/yarnrc.yml.tmpl +0 -36
  175. package/dot_config/yazi/yazi.toml +0 -40
  176. package/dot_config/zellij/config.kdl +0 -79
  177. package/dot_config/zsh/dot_zprofile +0 -13
  178. package/dot_config/zsh/dot_zshenv +0 -6
  179. package/dot_config/zsh/dot_zshrc.tmpl +0 -199
  180. package/dot_config/zsh/rc.d/05-ssh-agent.zsh +0 -5
  181. package/dot_config/zsh/rc.d/10-env.zsh.tmpl +0 -28
  182. package/dot_config/zsh/rc.d/20-zinit.zsh.tmpl +0 -22
  183. package/dot_config/zsh/rc.d/30-options.zsh.tmpl +0 -123
  184. package/dot_config/zsh/rc.d/40-bell.zsh.tmpl +0 -20
  185. package/dot_config/zsh/rc.d/50-login-fortune.zsh.tmpl +0 -9
  186. package/dot_local/bin/executable_ai_core +0 -130
  187. package/dot_local/bin/executable_b64 +0 -59
  188. package/dot_local/bin/executable_dot +0 -178
  189. package/dot_local/bin/executable_dot_completion +0 -55
  190. package/dot_local/bin/executable_epoch +0 -62
  191. package/dot_local/bin/executable_extract +0 -108
  192. package/dot_local/bin/executable_git-ai-commit +0 -160
  193. package/dot_local/bin/executable_git-ai-diff +0 -154
  194. package/dot_local/bin/executable_hash +0 -123
  195. package/dot_local/bin/executable_hex +0 -79
  196. package/dot_local/bin/executable_ip +0 -37
  197. package/dot_local/bin/executable_jsonv +0 -54
  198. package/dot_local/bin/executable_jwt +0 -78
  199. package/dot_local/bin/executable_kill-port +0 -59
  200. package/dot_local/bin/executable_lorem +0 -103
  201. package/dot_local/bin/executable_regex +0 -96
  202. package/dot_local/bin/executable_tmux-sessionizer +0 -187
  203. package/dot_local/bin/executable_tour +0 -137
  204. package/dot_local/bin/executable_update +0 -108
  205. package/dot_local/bin/executable_uuid +0 -57
  206. package/dot_local/bin/executable_yamlv +0 -39
  207. package/dot_local/bin/executable_zig-install +0 -89
  208. package/dot_local/bin/voice_ops +0 -7
  209. package/dot_local/share/bash-completion/completions/dot +0 -54
  210. package/dot_local/share/zsh/completions/.keep +0 -0
  211. package/install.sh +0 -255
  212. package/scripts/ci/validate-ci-config.sh +0 -222
  213. package/scripts/demo/record.sh +0 -41
  214. package/scripts/diagnostics/benchmark.sh +0 -201
  215. package/scripts/diagnostics/doctor.sh +0 -115
  216. package/scripts/diagnostics/drift-dashboard.sh +0 -26
  217. package/scripts/diagnostics/health.sh +0 -356
  218. package/scripts/diagnostics/history-analysis.sh +0 -77
  219. package/scripts/diagnostics/security-score.sh +0 -392
  220. package/scripts/dot/commands/appearance.sh +0 -63
  221. package/scripts/dot/commands/core.sh +0 -130
  222. package/scripts/dot/commands/diagnostics.sh +0 -100
  223. package/scripts/dot/commands/meta.sh +0 -117
  224. package/scripts/dot/commands/restore.sh +0 -209
  225. package/scripts/dot/commands/secrets.sh +0 -81
  226. package/scripts/dot/commands/security.sh +0 -73
  227. package/scripts/dot/commands/tools.sh +0 -228
  228. package/scripts/dot/lib/utils.sh +0 -72
  229. package/scripts/fonts/install-nerd-fonts.sh +0 -59
  230. package/scripts/fonts/patch-fonts.sh +0 -34
  231. package/scripts/ops/chezmoi-apply.sh +0 -42
  232. package/scripts/ops/chezmoi-diff.sh +0 -14
  233. package/scripts/ops/chezmoi-remove.sh +0 -43
  234. package/scripts/ops/chezmoi-update.sh +0 -16
  235. package/scripts/ops/heal.sh +0 -466
  236. package/scripts/ops/health-check.sh +0 -380
  237. package/scripts/ops/rollback.sh +0 -531
  238. package/scripts/ops/teleport.sh +0 -32
  239. package/scripts/secrets/age-init.sh +0 -69
  240. package/scripts/secrets/create-secrets-file.sh +0 -44
  241. package/scripts/secrets/encrypt-ssh-key.sh +0 -42
  242. package/scripts/security/backup.sh +0 -17
  243. package/scripts/security/dns-doh.sh +0 -29
  244. package/scripts/security/encryption-check.sh +0 -39
  245. package/scripts/security/enforce-policies.sh +0 -339
  246. package/scripts/security/firewall.sh +0 -34
  247. package/scripts/security/lock-configs.sh +0 -57
  248. package/scripts/security/lock-screen.sh +0 -33
  249. package/scripts/security/manage-secrets.sh +0 -415
  250. package/scripts/security/telemetry-kill.sh +0 -28
  251. package/scripts/security/usb-safety.sh +0 -29
  252. package/scripts/tests/README.md +0 -241
  253. package/scripts/tests/benchmark.sh +0 -91
  254. package/scripts/tests/framework/assertions.sh +0 -283
  255. package/scripts/tests/framework/mocks.sh +0 -201
  256. package/scripts/tests/framework/test_runner.sh +0 -189
  257. package/scripts/tests/integration/test_install.sh +0 -237
  258. package/scripts/tests/performance/benchmark_runner.sh +0 -156
  259. package/scripts/tests/performance/regression_check.sh +0 -73
  260. package/scripts/tests/performance/stress_test.sh +0 -65
  261. package/scripts/tests/test-docker.sh +0 -48
  262. package/scripts/tests/unit/test_ai_aliases.sh +0 -158
  263. package/scripts/tests/unit/test_ai_cli_checks.sh +0 -47
  264. package/scripts/tests/unit/test_backup.sh +0 -227
  265. package/scripts/tests/unit/test_case_functions.sh +0 -238
  266. package/scripts/tests/unit/test_cd_aliases.sh +0 -367
  267. package/scripts/tests/unit/test_dot_cli.sh +0 -217
  268. package/scripts/tests/unit/test_encode64.sh +0 -67
  269. package/scripts/tests/unit/test_environment.sh +0 -78
  270. package/scripts/tests/unit/test_extract.sh +0 -163
  271. package/scripts/tests/unit/test_framework_edge_cases.sh +0 -113
  272. package/scripts/tests/unit/test_genpass.sh +0 -298
  273. package/scripts/tests/unit/test_install_edge_cases.sh +0 -167
  274. package/scripts/tests/unit/test_installers.sh +0 -172
  275. package/scripts/tests/unit/test_keygen.sh +0 -68
  276. package/scripts/tests/unit/test_logging.sh +0 -96
  277. package/scripts/tests/unit/test_os_detection_comprehensive.sh +0 -388
  278. package/scripts/tests/unit/test_package_managers_comprehensive.sh +0 -321
  279. package/scripts/tests/unit/test_prependpath.sh +0 -66
  280. package/scripts/tests/unit/test_prependpath_refactored.sh +0 -89
  281. package/scripts/tests/unit/test_rd.sh +0 -230
  282. package/scripts/tests/unit/test_security_fixes.sh +0 -130
  283. package/scripts/tests/unit/test_security_scripts.sh +0 -87
  284. package/scripts/tests/unit/test_template_validation.sh +0 -238
  285. package/scripts/tests/unit/test_utility_functions.sh +0 -144
  286. package/scripts/tests/unit/test_wave1_alias_split.sh +0 -132
  287. package/scripts/tests/unit/test_wave1_ci_pinning.sh +0 -61
  288. package/scripts/tests/unit/test_wave1_gitleaks_config.sh +0 -52
  289. package/scripts/tests/unit/test_wave1_heal_fixes.sh +0 -97
  290. package/scripts/tests/unit/test_wave1_install_gpg.sh +0 -35
  291. package/scripts/tests/unit/test_wave1_zshenv_path.sh +0 -89
  292. package/scripts/tests/unit/test_wave1_zshrc_lazy_hook.sh +0 -115
  293. package/scripts/tests/unit/test_wave2_dot_new_guard.sh +0 -75
  294. package/scripts/tests/unit/test_zipf.sh +0 -76
  295. package/scripts/theme/apply-gnome-theme.sh +0 -297
  296. package/scripts/theme/install-boot-logo.sh +0 -61
  297. package/scripts/theme/install-catppuccin-themes.sh +0 -346
  298. package/scripts/theme/install-cursors.sh +0 -24
  299. package/scripts/theme/install-file-icons.sh +0 -25
  300. package/scripts/theme/install-grub-theme.sh +0 -51
  301. package/scripts/theme/install-lock-icon.sh +0 -29
  302. package/scripts/theme/switch.sh +0 -250
  303. package/scripts/theme/wallpaper-rotate.sh +0 -82
  304. package/scripts/theme/wallpaper-sync.sh +0 -42
  305. package/scripts/tools/cmatrix.sh +0 -20
  306. package/scripts/tools/emoji-picker.sh +0 -45
  307. package/scripts/tools/figlet-banner.sh +0 -17
  308. package/scripts/tools/log-rotate.sh +0 -29
  309. package/scripts/tools/lolcat-wrap.sh +0 -18
  310. package/scripts/tools/pipes.sh +0 -47
  311. package/scripts/tuning/linux.sh +0 -175
  312. package/scripts/tuning/macos.sh +0 -46
  313. package/templates/projects/molecule/README.md +0 -7
  314. package/templates/projects/molecule/converge.yml +0 -7
  315. package/templates/projects/molecule/molecule.yml +0 -16
  316. package/templates/projects/packer/README.md +0 -15
  317. package/templates/projects/packer/main.pkr.hcl +0 -15
@@ -1,22 +0,0 @@
1
- # Zinit plugin manager
2
- ZINIT_HOME="${XDG_DATA_HOME:-${HOME}/.local/share}/zinit/zinit.git"
3
- if [[ ! -f "$ZINIT_HOME/zinit.zsh" ]]; then
4
- print -P "%F{33}▓▒░ %F{220}Installing %F{33}ZDHARMA-CONTINUUM%F{220} Initiative Plugin Manager (%F{33}zdharma-continuum/zinit%F{220})…%f"
5
- command mkdir -p "$(dirname $ZINIT_HOME)" && command chmod g-rwX "$(dirname $ZINIT_HOME)"
6
- command git clone https://github.com/zdharma-continuum/zinit "$ZINIT_HOME" && \
7
- print -P "%F{33}▓▒░ %F{34}Installation successful.%f%b" || \
8
- print -P "%F{160}▓▒░ The clone has failed.%f%b"
9
- fi
10
-
11
- source "$ZINIT_HOME/zinit.zsh"
12
- autoload -Uz _zinit
13
- (( ${+_comps} )) && _comps[zinit]=_zinit
14
-
15
- # Load Zsh Plugins (Turbo mode - deferred loading, pinned to stable releases)
16
- # fast-syntax-highlighting: Better performance than zsh-syntax-highlighting
17
- zinit ice wait lucid
18
- zinit light zdharma-continuum/fast-syntax-highlighting
19
- zinit ice wait lucid ver"v0.7.1" atload"_zsh_autosuggest_start"
20
- zinit light zsh-users/zsh-autosuggestions
21
- zinit ice wait lucid ver"0.35.0" blockf atpull"zinit creinstall -q ."
22
- zinit light zsh-users/zsh-completions
@@ -1,123 +0,0 @@
1
- # Zsh history and options
2
- # Set secure default umask (077 = owner only, 022 = standard)
3
- umask 022
4
-
5
- HISTFILE="${HOME}/.zsh_history"
6
- HISTSIZE=10000
7
- SAVEHIST=10000
8
- setopt HIST_IGNORE_ALL_DUPS
9
- setopt HIST_SAVE_NO_DUPS
10
- setopt HIST_EXPIRE_DUPS_FIRST
11
- setopt HIST_FIND_NO_DUPS
12
- setopt HIST_IGNORE_SPACE
13
- setopt HIST_REDUCE_BLANKS
14
- setopt EXTENDED_HISTORY
15
- setopt SHARE_HISTORY
16
- setopt APPEND_HISTORY
17
-
18
- setopt AUTO_CD
19
- setopt AUTO_PUSHD
20
- setopt PUSHD_IGNORE_DUPS
21
- setopt PUSHD_SILENT
22
- setopt NO_BEEP
23
-
24
- bindkey -v
25
-
26
- # Fix: prevent auto-indent when pasting multi-line content (vi mode)
27
- autoload -Uz bracketed-paste-magic
28
- zle -N bracketed-paste bracketed-paste-magic
29
-
30
- autoload -Uz up-line-or-beginning-search down-line-or-beginning-search
31
- zle -N up-line-or-beginning-search
32
- zle -N down-line-or-beginning-search
33
- bindkey -M viins "^[[A" up-line-or-beginning-search
34
- bindkey -M viins "^[[B" down-line-or-beginning-search
35
- bindkey -M viins "^P" up-line-or-beginning-search
36
- bindkey -M viins "^N" down-line-or-beginning-search
37
-
38
- ZSH_COMPLETIONS_DIR="${XDG_DATA_HOME:-${HOME}/.local/share}/zsh/completions"
39
- if [[ ! -d "${ZSH_COMPLETIONS_DIR}" ]]; then
40
- command mkdir -p "${ZSH_COMPLETIONS_DIR}"
41
- fi
42
- if [[ -z ${fpath[(r)${ZSH_COMPLETIONS_DIR}]} ]]; then
43
- fpath=("${ZSH_COMPLETIONS_DIR}" "${fpath[@]}")
44
- fi
45
- if [[ -f "${HOME}/.local/bin/executable_dot_completion" ]]; then
46
- fpath=("${HOME}/.local/bin" "${fpath[@]}")
47
- fi
48
- # fnm (Fast Node Manager)
49
- # Initialize early so Node + corepack use the expected version.
50
- if command -v fnm >/dev/null; then
51
- if [[ ! -f "${ZSH_COMPLETIONS_DIR}/_fnm" ]]; then
52
- command fnm completions --shell zsh >| "${ZSH_COMPLETIONS_DIR}/_fnm"
53
- fi
54
- _lazy_load_fnm() {
55
- unfunction node npm npx pnpm pnpx fnm _lazy_load_fnm 2>/dev/null
56
- eval "$(command fnm env --use-on-cd --shell zsh --log-level quiet)"
57
- }
58
- fnm() { _lazy_load_fnm; command fnm "$@"; }
59
- node() { _lazy_load_fnm; command node "$@"; }
60
- npm() { _lazy_load_fnm; command npm "$@"; }
61
- npx() { _lazy_load_fnm; command npx "$@"; }
62
- pnpm() { _lazy_load_fnm; command pnpm "$@"; }
63
- pnpx() { _lazy_load_fnm; command pnpx "$@"; }
64
- fi
65
-
66
-
67
- # Lazy-load NVM (if fnm is not installed)
68
- if ! command -v fnm >/dev/null; then
69
- export NVM_DIR="${NVM_DIR:-$HOME/.nvm}"
70
- if [[ -s "${NVM_DIR}/nvm.sh" ]]; then
71
- _lazy_load_nvm() {
72
- unfunction node npm npx nvm _lazy_load_nvm 2>/dev/null
73
- # shellcheck disable=SC1090
74
- . "${NVM_DIR}/nvm.sh"
75
- if [[ -s "${NVM_DIR}/bash_completion" ]]; then
76
- # shellcheck disable=SC1090
77
- . "${NVM_DIR}/bash_completion"
78
- fi
79
- }
80
- nvm() { _lazy_load_nvm; nvm "$@"; }
81
- node() { _lazy_load_nvm; command node "$@"; }
82
- npm() { _lazy_load_nvm; command npm "$@"; }
83
- npx() { _lazy_load_nvm; command npx "$@"; }
84
- fi
85
- fi
86
-
87
- # Lazy-load SDKMAN
88
- export SDKMAN_DIR="${SDKMAN_DIR:-$HOME/.sdkman}"
89
- if [[ -s "${SDKMAN_DIR}/bin/sdkman-init.sh" && -z "${functions[sdk]:-}" ]]; then
90
- _lazy_load_sdkman() {
91
- unfunction sdk _lazy_load_sdkman 2>/dev/null
92
- # shellcheck disable=SC1090
93
- . "${SDKMAN_DIR}/bin/sdkman-init.sh"
94
- }
95
- sdk() { _lazy_load_sdkman; sdk "$@"; }
96
- fi
97
- # Defer compinit to first prompt — saves ~37ms off startup
98
- autoload -Uz compinit add-zsh-hook
99
- _deferred_compinit() {
100
- add-zsh-hook -d precmd _deferred_compinit
101
- if [[ -n ${ZDOTDIR}/.zcompdump(#qN.mh+24) ]]; then
102
- compinit
103
- else
104
- compinit -C
105
- fi
106
- # Compile zcompdump to bytecode in background for faster subsequent loads
107
- { [[ ! -f "${ZDOTDIR}/.zcompdump.zwc" || "${ZDOTDIR}/.zcompdump" -nt "${ZDOTDIR}/.zcompdump.zwc" ]] && zcompile "${ZDOTDIR}/.zcompdump" } &!
108
- }
109
- add-zsh-hook precmd _deferred_compinit
110
-
111
- zstyle ':completion:*' menu select
112
- zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}'
113
- zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}"
114
- zstyle ':completion:*' special-dirs true
115
- zstyle ':completion:*' verbose yes
116
-
117
- autoload -Uz colors && colors
118
- unsetopt correct_all
119
-
120
- # direnv (directory environments)
121
- if command -v direnv >/dev/null; then
122
- _cached_eval direnv-hook direnv hook zsh
123
- fi
@@ -1,20 +0,0 @@
1
- # Terminal bell (sound + visual)
2
-
3
- : ${DOTFILES_BELL_SOUND:=1}
4
- : ${DOTFILES_BELL_VISUAL:=1}
5
-
6
- if [[ "$DOTFILES_BELL_SOUND" == "1" ]]; then
7
- unsetopt NO_BEEP
8
- setopt BEEP
9
- else
10
- setopt NO_BEEP
11
- fi
12
-
13
- # Some zsh builds don't include visualbell; guard to avoid startup errors.
14
- if (( $+options[visualbell] )); then
15
- if [[ "$DOTFILES_BELL_VISUAL" == "1" ]]; then
16
- setopt VISUALBELL
17
- else
18
- unsetopt VISUALBELL
19
- fi
20
- fi
@@ -1,9 +0,0 @@
1
- # Login fortune (cowsay)
2
-
3
- : ${DOTFILES_LOGIN_FORTUNE:=1}
4
-
5
- if [[ -o login ]] && [[ "$DOTFILES_LOGIN_FORTUNE" == "1" ]]; then
6
- if command -v fortune >/dev/null && command -v cowsay >/dev/null; then
7
- fortune | cowsay
8
- fi
9
- fi
@@ -1,130 +0,0 @@
1
- #!/usr/bin/env bash
2
- #
3
- # ai_core.sh - Central wrapper for AI operations in the Predictive Shell
4
- # Part of the "Predictive Shell" (AI v2) implementation
5
- #
6
-
7
- set -e
8
-
9
- # Configuration
10
- LLAMAFILE_URL="https://huggingface.co/jart/inexpensive-llm/resolve/main/llamafile-server-0.1-llava-v1.5-7b-q4"
11
- MODEL_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/ai/models"
12
- MODEL_PATH="$MODEL_DIR/llava-v1.5-7b-q4.llamafile"
13
- # Default to port 8080 for llamafile server
14
- SERVER_PORT=8080
15
-
16
- # Ensure model directory exists
17
- ensure_model_dir() {
18
- if [ ! -d "$MODEL_DIR" ]; then
19
- mkdir -p "$MODEL_DIR"
20
- fi
21
- }
22
-
23
- # Check if we have a local LLM available
24
- check_local_llm() {
25
- if [ -f "$MODEL_PATH" ]; then
26
- return 0
27
- else
28
- return 1
29
- fi
30
- }
31
-
32
- # Download the model (interactive only)
33
- download_model() {
34
- ensure_model_dir
35
- echo "Local LLM model not found at $MODEL_PATH"
36
- echo "This feature requires downloading a localized LLM (~4GB)."
37
- read -p "Do you want to download it now? (y/n) " -n 1 -r
38
- echo
39
- if [[ $REPLY =~ ^[Yy]$ ]]; then
40
- echo "Downloading llamafile..."
41
- # Note: curl -L is used to follow redirects
42
- if curl -L -o "$MODEL_PATH" "$LLAMAFILE_URL"; then
43
- chmod +x "$MODEL_PATH"
44
- echo "Download complete. Model saved to $MODEL_PATH"
45
- else
46
- echo "Download failed."
47
- return 1
48
- fi
49
- else
50
- echo "Skipping download. AI features may be limited."
51
- return 1
52
- fi
53
- }
54
-
55
- # Verify status of AI subsystem
56
- status() {
57
- echo "--- Predictive Shell AI Core Status ---"
58
- if check_local_llm; then
59
- echo "Local LLM: Installed ($MODEL_PATH)"
60
- else
61
- echo "Local LLM: Not installed"
62
- fi
63
-
64
- # Check for other providers
65
- if command -v gh &> /dev/null && gh copilot --version &> /dev/null; then
66
- echo "GitHub Copilot CLI: Available"
67
- else
68
- echo "GitHub Copilot CLI: Not available"
69
- fi
70
- }
71
-
72
- # Start the server (background)
73
- start_server() {
74
- if ! check_local_llm; then
75
- download_model || return 1
76
- fi
77
-
78
- echo "Starting Local LLM Server..."
79
- "$MODEL_PATH" --server --nobrowser --port "$SERVER_PORT" &
80
- echo "Server started on port $SERVER_PORT"
81
- }
82
-
83
- # Query the LLM
84
- # Usage: ai_core query "Your prompt here"
85
- query() {
86
- local prompt="$1"
87
-
88
- # Priority 1: Local LLM Server if running
89
- if nc -z localhost "$SERVER_PORT" 2>/dev/null; then
90
- # Simple curl based query to llamafile standard endpoint
91
- # Note: This is a simplified example payload
92
- curl -s -X POST "http://localhost:$SERVER_PORT/completion" \
93
- -H "Content-Type: application/json" \
94
- -d "{\"prompt\": \"$prompt\", \"n_predict\": 128}" | jq -r .content
95
- return
96
- fi
97
-
98
- # Priority 2: GitHub Copilot CLI
99
- if command -v gh &> /dev/null && gh copilot --version &> /dev/null; then
100
- # Use gh copilot explain/suggest
101
- # This wrapper might need adjustment based on how we want to use it
102
- # generally 'gh copilot explain' is interactive.
103
- echo "Local server not running. Using GitHub Copilot..."
104
- gh copilot explain "$prompt"
105
- return
106
- fi
107
-
108
- echo "No AI provider available. Run 'ai_core start' or install GitHub Copilot CLI."
109
- }
110
-
111
-
112
- case "$1" in
113
- status)
114
- status
115
- ;;
116
- download)
117
- download_model
118
- ;;
119
- start)
120
- start_server
121
- ;;
122
- query)
123
- shift
124
- query "$@"
125
- ;;
126
- *)
127
- echo "Usage: $0 {status|download|start|query}"
128
- exit 1
129
- ;;
130
- esac
@@ -1,59 +0,0 @@
1
- #!/usr/bin/env bash
2
- # Base64 encoder/decoder
3
- # Usage: b64 [encode|decode] <string> | b64 [encode|decode] < file
4
-
5
- set -euo pipefail
6
-
7
- usage() {
8
- echo "Usage: b64 [OPTIONS] [STRING]"
9
- echo ""
10
- echo "Options:"
11
- echo " -e, --encode Encode to base64 (default)"
12
- echo " -d, --decode Decode from base64"
13
- echo " -u, --url Use URL-safe base64"
14
- echo " -h, --help Show this help"
15
- echo ""
16
- echo "Examples:"
17
- echo " b64 'hello world' # Encode string"
18
- echo " b64 -d 'aGVsbG8gd29ybGQ=' # Decode string"
19
- echo " cat file.bin | b64 # Encode file"
20
- echo " b64 -d < encoded.txt # Decode file"
21
- }
22
-
23
- MODE="encode"
24
- URL_SAFE=false
25
-
26
- while [[ $# -gt 0 ]]; do
27
- case "$1" in
28
- -e|--encode|encode) MODE="encode"; shift ;;
29
- -d|--decode|decode) MODE="decode"; shift ;;
30
- -u|--url) URL_SAFE=true; shift ;;
31
- -h|--help) usage; exit 0 ;;
32
- -*) echo "Unknown option: $1"; usage; exit 1 ;;
33
- *) break ;;
34
- esac
35
- done
36
-
37
- # Get input
38
- if [[ $# -gt 0 ]]; then
39
- INPUT="$*"
40
- else
41
- INPUT=$(cat)
42
- fi
43
-
44
- if [[ "$MODE" == "encode" ]]; then
45
- if $URL_SAFE; then
46
- echo -n "$INPUT" | base64 | tr '+/' '-_' | tr -d '='
47
- else
48
- echo -n "$INPUT" | base64
49
- fi
50
- else
51
- if $URL_SAFE; then
52
- # Add padding back
53
- INPUT=$(echo "$INPUT" | tr '-_' '+/')
54
- MOD=$((${#INPUT} % 4))
55
- if [[ $MOD -eq 2 ]]; then INPUT="${INPUT}=="; fi
56
- if [[ $MOD -eq 3 ]]; then INPUT="${INPUT}="; fi
57
- fi
58
- echo "$INPUT" | base64 -d 2>/dev/null || base64 -D <<< "$INPUT"
59
- fi
@@ -1,178 +0,0 @@
1
- #!/usr/bin/env bash
2
- # Dotfiles CLI Entry Point - v0.2.481
3
- # Modular architecture with command handlers in scripts/dot/commands/
4
-
5
- set -e
6
-
7
- VERSION="0.2.481"
8
-
9
- COMMAND="$1"
10
- if [ -n "$1" ]; then
11
- shift
12
- fi
13
-
14
- # Resolve the dotfiles source directory
15
- resolve_source_dir() {
16
- if [ -n "${CHEZMOI_SOURCE_DIR:-}" ] && [ -d "$CHEZMOI_SOURCE_DIR" ]; then
17
- echo "$CHEZMOI_SOURCE_DIR"
18
- return
19
- fi
20
- if [ -d "$HOME/.dotfiles" ]; then
21
- echo "$HOME/.dotfiles"
22
- return
23
- fi
24
- if [ -d "$HOME/.local/share/chezmoi" ]; then
25
- echo "$HOME/.local/share/chezmoi"
26
- return
27
- fi
28
- echo ""
29
- }
30
-
31
- show_help() {
32
- cat <<'EOF'
33
- Usage: dot [command]
34
-
35
- Core Commands:
36
- apply Apply dotfiles (chezmoi apply)
37
- sync Apply dotfiles (alias of apply)
38
- update Pull latest changes and apply them (chezmoi update)
39
- add Add a file to chezmoi source
40
- diff Show chezmoi diff with exclusions
41
- status Show configuration drift (chezmoi status)
42
- remove Safely remove a managed file
43
- cd Print source directory path (use: cd $(dot cd))
44
- edit Open chezmoi source in $EDITOR
45
-
46
- Diagnostics:
47
- doctor Check system health and configuration
48
- heal Auto-repair common dotfiles issues
49
- health Run comprehensive health dashboard
50
- security-score Security assessment with grading
51
- rollback Rollback dotfiles to a previous state
52
- restore Restore from backup or git ref
53
- drift Drift dashboard (detailed chezmoi status)
54
- history Shell history analysis
55
- benchmark Run shell startup benchmark (--detailed, --profile)
56
-
57
- Tools:
58
- tools Show or install nix packages (dot tools [install])
59
- new Create a new project from a template
60
- sandbox Launch a safe sandbox preview (Docker/Podman)
61
- keys Show keybindings catalog
62
- learn Start the interactive tour of your new tools
63
- docs Show repo README
64
- log-rotate Rotate ~/.local/share/dotfiles.log
65
-
66
- Appearance:
67
- theme Switch terminal theme (dark/light)
68
- wallpaper Apply a wallpaper from your library
69
- fonts Install Nerd Fonts (JetBrainsMono by default)
70
- tune Apply OS tuning (opt-in)
71
-
72
- Secrets:
73
- secrets-init Initialize age key for secrets
74
- secrets Edit encrypted secrets (age)
75
- secrets-create Create an encrypted secrets file
76
- ssh-key Encrypt an SSH key locally with age
77
-
78
- Security (opt-in):
79
- backup Create a compressed backup of your home
80
- encrypt-check Check disk encryption status
81
- firewall Apply firewall hardening
82
- telemetry Disable OS telemetry
83
- dns-doh Enable DNS-over-HTTPS
84
- lock-screen Enforce lock screen idle settings
85
- usb-safety Disable automount for removable media
86
-
87
- Meta:
88
- upgrade Update flake, plugins, and dotfiles
89
- packages List installed packages and package managers
90
- --version Show version information
91
- help Show this help message
92
- EOF
93
- }
94
-
95
- # Dispatch to command module
96
- dispatch() {
97
- local module="$1"
98
- local cmd="$2"
99
- shift 2
100
-
101
- local src_dir
102
- src_dir="$(resolve_source_dir)"
103
- if [ -z "$src_dir" ]; then
104
- echo "Dotfiles source not found." >&2
105
- exit 1
106
- fi
107
-
108
- local module_path="$src_dir/scripts/dot/commands/$module.sh"
109
- if [ -f "$module_path" ]; then
110
- exec bash "$module_path" "$cmd" "$@"
111
- else
112
- echo "Command module not found: $module" >&2
113
- exit 1
114
- fi
115
- }
116
-
117
- case "$COMMAND" in
118
- # Version
119
- --version|-v|version)
120
- echo "dot v${VERSION}"
121
- echo "Dotfiles CLI - Cross-platform shell environment distribution"
122
- echo ""
123
- echo "Repository: https://github.com/sebastienrousseau/dotfiles"
124
- echo "Managed by: chezmoi $(chezmoi --version 2>/dev/null | head -1 || echo 'not installed')"
125
- exit 0
126
- ;;
127
-
128
- # Core commands
129
- apply|sync|update|add|diff|status|remove|cd|edit)
130
- dispatch "core" "$COMMAND" "$@"
131
- ;;
132
-
133
- # Diagnostics
134
- doctor|heal|health|health-check|security-score|rollback|restore|drift|history|benchmark)
135
- dispatch "diagnostics" "$COMMAND" "$@"
136
- ;;
137
-
138
- # Tools
139
- tools|new|packages|log-rotate)
140
- dispatch "tools" "$COMMAND" "$@"
141
- ;;
142
-
143
- # Appearance
144
- theme|wallpaper|fonts|tune)
145
- dispatch "appearance" "$COMMAND" "$@"
146
- ;;
147
-
148
- # Secrets
149
- secrets-init|secrets|secrets-create|ssh-key)
150
- dispatch "secrets" "$COMMAND" "$@"
151
- ;;
152
-
153
- # Security
154
- backup|encrypt-check|firewall|telemetry|dns-doh|lock-screen|usb-safety)
155
- dispatch "security" "$COMMAND" "$@"
156
- ;;
157
-
158
- # Meta
159
- upgrade|docs|learn|keys|sandbox)
160
- dispatch "meta" "$COMMAND" "$@"
161
- ;;
162
-
163
- # Help
164
- help|--help|-h)
165
- show_help
166
- ;;
167
-
168
- # Unknown or empty
169
- *)
170
- if [ -z "$COMMAND" ]; then
171
- show_help
172
- else
173
- echo "Unknown command: $COMMAND"
174
- echo "Try 'dot help' for usage."
175
- exit 1
176
- fi
177
- ;;
178
- esac
@@ -1,55 +0,0 @@
1
- #compdef dot
2
-
3
- # Zsh completion for the dot CLI
4
- # Source this file or place in a directory in $fpath
5
-
6
- _dot() {
7
- local -a commands
8
- commands=(
9
- 'apply:Apply dotfiles (chezmoi apply)'
10
- 'sync:Apply dotfiles (alias of apply)'
11
- 'update:Pull latest changes and apply'
12
- 'add:Add a file to chezmoi source'
13
- 'diff:Show chezmoi diff with exclusions'
14
- 'status:Show configuration drift'
15
- 'remove:Safely remove a managed file'
16
- 'cd:Print source directory path'
17
- 'drift:Drift dashboard (detailed chezmoi status)'
18
- 'history:Shell history analysis'
19
- 'doctor:Check system health and configuration'
20
- 'heal:Auto-repair common dotfiles issues'
21
- 'health:Run comprehensive health check'
22
- 'rollback:Rollback dotfiles to a previous state'
23
- 'keys:Show keybindings catalog'
24
- 'tools:Show or install nix packages'
25
- 'sandbox:Launch a safe sandbox preview'
26
- 'benchmark:Run shell startup benchmark'
27
- 'tune:Apply OS tuning (opt-in)'
28
- 'secrets:Edit encrypted secrets (age)'
29
- 'secrets-init:Initialize age key for secrets'
30
- 'secrets-create:Create an encrypted secrets file'
31
- 'ssh-key:Encrypt an SSH key locally with age'
32
- 'firewall:Apply firewall hardening (opt-in)'
33
- 'telemetry:Disable OS telemetry (opt-in)'
34
- 'dns-doh:Enable DNS-over-HTTPS (opt-in)'
35
- 'encrypt-check:Check disk encryption status'
36
- 'backup:Create a compressed backup of your home'
37
- 'lock-screen:Enforce lock screen idle settings'
38
- 'usb-safety:Disable automount for removable media'
39
- 'fonts:Install Nerd Fonts'
40
- 'wallpaper:Apply a wallpaper from your library'
41
- 'theme:Switch terminal theme (dark/light)'
42
- 'packages:List installed packages and package managers'
43
- 'upgrade:Update flake, plugins, and dotfiles'
44
- 'edit:Open chezmoi source in editor'
45
- 'docs:Show repo README'
46
- 'new:Create a new project from a template'
47
- 'log-rotate:Rotate ~/.local/share/dotfiles.log'
48
- 'learn:Start the interactive tour'
49
- '--version:Show version information'
50
- 'help:Show this help message'
51
- )
52
- _describe 'command' commands
53
- }
54
-
55
- _dot "$@"
@@ -1,62 +0,0 @@
1
- #!/usr/bin/env bash
2
- # Epoch time converter
3
- # Usage: epoch [timestamp] | epoch -r <date>
4
-
5
- set -euo pipefail
6
-
7
- usage() {
8
- echo "Usage: epoch [OPTIONS] [VALUE]"
9
- echo ""
10
- echo "Options:"
11
- echo " -r, --reverse Convert date string to epoch"
12
- echo " -m, --millis Use milliseconds precision"
13
- echo " -h, --help Show this help"
14
- echo ""
15
- echo "Examples:"
16
- echo " epoch # Current epoch time"
17
- echo " epoch 1234567890 # Convert epoch to date"
18
- echo " epoch -r '2024-01-01' # Convert date to epoch"
19
- echo " epoch -m # Current epoch in milliseconds"
20
- }
21
-
22
- REVERSE=false
23
- MILLIS=false
24
-
25
- while [[ $# -gt 0 ]]; do
26
- case "$1" in
27
- -r|--reverse) REVERSE=true; shift ;;
28
- -m|--millis) MILLIS=true; shift ;;
29
- -h|--help) usage; exit 0 ;;
30
- -*) echo "Unknown option: $1"; usage; exit 1 ;;
31
- *) break ;;
32
- esac
33
- done
34
-
35
- if $REVERSE; then
36
- # Convert date to epoch
37
- DATE_STR="${1:-}"
38
- if [[ -z "$DATE_STR" ]]; then
39
- echo "Error: Date string required for reverse conversion"
40
- exit 1
41
- fi
42
- if $MILLIS; then
43
- date -d "$DATE_STR" +%s%3N 2>/dev/null || date -j -f "%Y-%m-%d" "$DATE_STR" +%s000 2>/dev/null
44
- else
45
- date -d "$DATE_STR" +%s 2>/dev/null || date -j -f "%Y-%m-%d" "$DATE_STR" +%s 2>/dev/null
46
- fi
47
- elif [[ $# -gt 0 ]]; then
48
- # Convert epoch to date
49
- EPOCH="$1"
50
- # Handle milliseconds
51
- if [[ ${#EPOCH} -gt 10 ]]; then
52
- EPOCH=$((EPOCH / 1000))
53
- fi
54
- date -d "@$EPOCH" 2>/dev/null || date -r "$EPOCH" 2>/dev/null
55
- else
56
- # Current time
57
- if $MILLIS; then
58
- date +%s%3N 2>/dev/null || echo "$(date +%s)000"
59
- else
60
- date +%s
61
- fi
62
- fi