@sebastienrousseau/dotfiles 0.2.469 → 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 -140
- 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 -382
- package/dist/lib/README.md +0 -86
- package/dist/lib/aliases/README.md +0 -57
- package/dist/lib/aliases/archives/README.md +0 -145
- package/dist/lib/aliases/archives/archives.aliases.sh +0 -114
- package/dist/lib/aliases/cd/README.md +0 -146
- package/dist/lib/aliases/cd/cd.aliases.sh +0 -51
- package/dist/lib/aliases/chmod/README.md +0 -160
- package/dist/lib/aliases/chmod/chmod.aliases.sh +0 -107
- 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 -70
- 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/list/README.md +0 -131
- package/dist/lib/aliases/list/list.aliases.sh +0 -132
- 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/python/python.aliases.sh +0 -141
- 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 -182
- package/dist/lib/aliases/rust/rust.aliases.sh +0 -119
- 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 -310
- 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 -167
- package/dist/lib/configurations/curl/cacert.pem +0 -3460
- package/dist/lib/configurations/curl/curlrc +0 -53
- 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 -48
- 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/prompt/prompt.sh +0 -81
- 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 -193
- package/dist/lib/configurations/wget/wgetrc +0 -40
- package/dist/lib/configurations/zsh/zshrc +0 -50
- package/dist/lib/configurations.sh +0 -45
- package/dist/lib/functions/README.md +0 -92
- package/dist/lib/functions/apihealth.sh +0 -277
- package/dist/lib/functions/apilatency.sh +0 -157
- package/dist/lib/functions/apiload.sh +0 -165
- package/dist/lib/functions/backup.sh +0 -143
- package/dist/lib/functions/cdls.sh +0 -60
- package/dist/lib/functions/curlheader.sh +0 -78
- package/dist/lib/functions/curlstatus.sh +0 -74
- package/dist/lib/functions/curltime.sh +0 -75
- package/dist/lib/functions/encode64.sh +0 -107
- package/dist/lib/functions/environment.sh +0 -78
- package/dist/lib/functions/extract.sh +0 -86
- package/dist/lib/functions/freespace.sh +0 -67
- package/dist/lib/functions/genpwd.sh +0 -105
- package/dist/lib/functions/goto.sh +0 -67
- package/dist/lib/functions/hexdump.sh +0 -96
- package/dist/lib/functions/hiddenfiles.sh +0 -77
- package/dist/lib/functions/hostinfo.sh +0 -98
- package/dist/lib/functions/hstats.sh +0 -75
- package/dist/lib/functions/httpdebug.sh +0 -113
- package/dist/lib/functions/kebabcase.sh +0 -61
- package/dist/lib/functions/keygen.sh +0 -194
- package/dist/lib/functions/last.sh +0 -112
- package/dist/lib/functions/logout.sh +0 -120
- package/dist/lib/functions/lowercase.sh +0 -61
- package/dist/lib/functions/matrix.sh +0 -216
- 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 -73
- package/dist/lib/functions/sentencecase.sh +0 -63
- package/dist/lib/functions/showhiddenfiles.sh +0 -14
- package/dist/lib/functions/size.sh +0 -16
- package/dist/lib/functions/snakecase.sh +0 -61
- package/dist/lib/functions/stopwatch.sh +0 -15
- package/dist/lib/functions/sysinfo.sh +0 -145
- package/dist/lib/functions/titlecase.sh +0 -65
- package/dist/lib/functions/uppercase.sh +0 -61
- 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 -46
- package/dist/lib/history.sh +0 -90
- package/dist/lib/paths/README.md +0 -52
- package/dist/lib/paths/custom.paths.sh +0 -40
- package/dist/lib/paths/default.paths.sh +0 -37
- package/dist/lib/paths.sh +0 -46
- 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,108 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Universal archive extraction
|
|
3
|
+
# Usage: extract <file> [destination]
|
|
4
|
+
|
|
5
|
+
set -euo pipefail
|
|
6
|
+
|
|
7
|
+
if [[ $# -lt 1 ]]; then
|
|
8
|
+
echo "Usage: extract <file> [destination]"
|
|
9
|
+
echo "Supported formats: tar, tar.gz, tar.bz2, tar.xz, tar.zst, gz, bz2, xz, zst, zip, rar, 7z, deb, rpm"
|
|
10
|
+
exit 1
|
|
11
|
+
fi
|
|
12
|
+
|
|
13
|
+
FILE="$1"
|
|
14
|
+
DEST="${2:-.}"
|
|
15
|
+
|
|
16
|
+
if [[ ! -f "$FILE" ]]; then
|
|
17
|
+
echo "Error: File not found: $FILE"
|
|
18
|
+
exit 1
|
|
19
|
+
fi
|
|
20
|
+
|
|
21
|
+
# Create destination if needed
|
|
22
|
+
mkdir -p "$DEST"
|
|
23
|
+
|
|
24
|
+
echo "Extracting: $FILE"
|
|
25
|
+
|
|
26
|
+
case "$FILE" in
|
|
27
|
+
*.tar.bz2|*.tbz2)
|
|
28
|
+
tar xjf "$FILE" -C "$DEST"
|
|
29
|
+
;;
|
|
30
|
+
*.tar.gz|*.tgz)
|
|
31
|
+
tar xzf "$FILE" -C "$DEST"
|
|
32
|
+
;;
|
|
33
|
+
*.tar.xz|*.txz)
|
|
34
|
+
tar xJf "$FILE" -C "$DEST"
|
|
35
|
+
;;
|
|
36
|
+
*.tar.zst|*.tzst)
|
|
37
|
+
tar --zstd -xf "$FILE" -C "$DEST"
|
|
38
|
+
;;
|
|
39
|
+
*.tar)
|
|
40
|
+
tar xf "$FILE" -C "$DEST"
|
|
41
|
+
;;
|
|
42
|
+
*.bz2)
|
|
43
|
+
bunzip2 -k "$FILE"
|
|
44
|
+
;;
|
|
45
|
+
*.gz)
|
|
46
|
+
gunzip -k "$FILE"
|
|
47
|
+
;;
|
|
48
|
+
*.xz)
|
|
49
|
+
unxz -k "$FILE"
|
|
50
|
+
;;
|
|
51
|
+
*.zst)
|
|
52
|
+
unzstd -k "$FILE"
|
|
53
|
+
;;
|
|
54
|
+
*.zip|*.jar|*.war|*.ear)
|
|
55
|
+
unzip -q "$FILE" -d "$DEST"
|
|
56
|
+
;;
|
|
57
|
+
*.rar)
|
|
58
|
+
if command -v unrar >/dev/null 2>&1; then
|
|
59
|
+
unrar x "$FILE" "$DEST/"
|
|
60
|
+
elif command -v 7z >/dev/null 2>&1; then
|
|
61
|
+
7z x "$FILE" -o"$DEST"
|
|
62
|
+
else
|
|
63
|
+
echo "Error: unrar or 7z required for .rar files"
|
|
64
|
+
exit 1
|
|
65
|
+
fi
|
|
66
|
+
;;
|
|
67
|
+
*.7z)
|
|
68
|
+
if command -v 7z >/dev/null 2>&1; then
|
|
69
|
+
7z x "$FILE" -o"$DEST"
|
|
70
|
+
else
|
|
71
|
+
echo "Error: 7z required for .7z files"
|
|
72
|
+
exit 1
|
|
73
|
+
fi
|
|
74
|
+
;;
|
|
75
|
+
*.deb)
|
|
76
|
+
if command -v dpkg-deb >/dev/null 2>&1; then
|
|
77
|
+
dpkg-deb -x "$FILE" "$DEST"
|
|
78
|
+
elif command -v ar >/dev/null 2>&1; then
|
|
79
|
+
cd "$DEST" && ar x "$FILE"
|
|
80
|
+
else
|
|
81
|
+
echo "Error: dpkg-deb or ar required for .deb files"
|
|
82
|
+
exit 1
|
|
83
|
+
fi
|
|
84
|
+
;;
|
|
85
|
+
*.rpm)
|
|
86
|
+
if command -v rpm2cpio >/dev/null 2>&1; then
|
|
87
|
+
cd "$DEST" && rpm2cpio "$FILE" | cpio -idmv
|
|
88
|
+
else
|
|
89
|
+
echo "Error: rpm2cpio required for .rpm files"
|
|
90
|
+
exit 1
|
|
91
|
+
fi
|
|
92
|
+
;;
|
|
93
|
+
*.Z)
|
|
94
|
+
uncompress "$FILE"
|
|
95
|
+
;;
|
|
96
|
+
*.lzma)
|
|
97
|
+
unlzma -k "$FILE"
|
|
98
|
+
;;
|
|
99
|
+
*.lz4)
|
|
100
|
+
lz4 -d "$FILE"
|
|
101
|
+
;;
|
|
102
|
+
*)
|
|
103
|
+
echo "Error: Unknown archive format: $FILE"
|
|
104
|
+
exit 1
|
|
105
|
+
;;
|
|
106
|
+
esac
|
|
107
|
+
|
|
108
|
+
echo "Extracted to: $DEST"
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# git-ai-commit - Generate commit messages using AI
|
|
3
|
+
# Managed by chezmoi - https://github.com/sebastienrousseau/dotfiles
|
|
4
|
+
#
|
|
5
|
+
# Usage: git ai-commit [--provider <provider>] [--edit]
|
|
6
|
+
# --provider: claude, gemini, sgpt, ollama (auto-detected if not specified)
|
|
7
|
+
# --edit: Open editor to modify the generated message before committing
|
|
8
|
+
|
|
9
|
+
set -euo pipefail
|
|
10
|
+
|
|
11
|
+
# Colors
|
|
12
|
+
RED='\033[0;31m'
|
|
13
|
+
GREEN='\033[0;32m'
|
|
14
|
+
YELLOW='\033[1;33m'
|
|
15
|
+
BLUE='\033[0;34m'
|
|
16
|
+
NC='\033[0m'
|
|
17
|
+
|
|
18
|
+
EDIT_MODE=false
|
|
19
|
+
PROVIDER=""
|
|
20
|
+
|
|
21
|
+
# Parse arguments
|
|
22
|
+
while [[ $# -gt 0 ]]; do
|
|
23
|
+
case $1 in
|
|
24
|
+
--provider|-p)
|
|
25
|
+
PROVIDER="$2"
|
|
26
|
+
shift 2
|
|
27
|
+
;;
|
|
28
|
+
--edit|-e)
|
|
29
|
+
EDIT_MODE=true
|
|
30
|
+
shift
|
|
31
|
+
;;
|
|
32
|
+
--help|-h)
|
|
33
|
+
echo "Usage: git ai-commit [--provider <provider>] [--edit]"
|
|
34
|
+
echo ""
|
|
35
|
+
echo "Options:"
|
|
36
|
+
echo " --provider, -p AI provider: claude, gemini, sgpt, ollama, aider"
|
|
37
|
+
echo " --edit, -e Open editor to modify generated message"
|
|
38
|
+
echo ""
|
|
39
|
+
echo "Environment:"
|
|
40
|
+
echo " GIT_AI_PROVIDER Default AI provider"
|
|
41
|
+
exit 0
|
|
42
|
+
;;
|
|
43
|
+
*)
|
|
44
|
+
echo -e "${RED}Unknown option: $1${NC}"
|
|
45
|
+
exit 1
|
|
46
|
+
;;
|
|
47
|
+
esac
|
|
48
|
+
done
|
|
49
|
+
|
|
50
|
+
# Auto-detect provider if not specified
|
|
51
|
+
detect_provider() {
|
|
52
|
+
if [[ -n "${GIT_AI_PROVIDER:-}" ]]; then
|
|
53
|
+
echo "$GIT_AI_PROVIDER"
|
|
54
|
+
elif command -v claude >/dev/null 2>&1; then
|
|
55
|
+
echo "claude"
|
|
56
|
+
elif command -v aider >/dev/null 2>&1; then
|
|
57
|
+
echo "aider"
|
|
58
|
+
elif command -v gemini >/dev/null 2>&1; then
|
|
59
|
+
echo "gemini"
|
|
60
|
+
elif command -v sgpt >/dev/null 2>&1; then
|
|
61
|
+
echo "sgpt"
|
|
62
|
+
elif command -v ollama >/dev/null 2>&1; then
|
|
63
|
+
echo "ollama"
|
|
64
|
+
else
|
|
65
|
+
echo ""
|
|
66
|
+
fi
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
PROVIDER="${PROVIDER:-$(detect_provider)}"
|
|
70
|
+
|
|
71
|
+
if [[ -z "$PROVIDER" ]]; then
|
|
72
|
+
echo -e "${RED}Error: No AI provider found. Install claude, gemini, sgpt, aider, or ollama.${NC}"
|
|
73
|
+
exit 1
|
|
74
|
+
fi
|
|
75
|
+
|
|
76
|
+
# Check if there are staged changes
|
|
77
|
+
if ! git diff --cached --quiet; then
|
|
78
|
+
DIFF=$(git diff --cached --stat)
|
|
79
|
+
DIFF_CONTENT=$(git diff --cached)
|
|
80
|
+
else
|
|
81
|
+
echo -e "${YELLOW}No staged changes. Stage changes with 'git add' first.${NC}"
|
|
82
|
+
exit 1
|
|
83
|
+
fi
|
|
84
|
+
|
|
85
|
+
echo -e "${BLUE}Generating commit message using ${PROVIDER}...${NC}"
|
|
86
|
+
|
|
87
|
+
# Prompt for commit message generation
|
|
88
|
+
PROMPT="Generate a concise, conventional commit message for the following git diff.
|
|
89
|
+
|
|
90
|
+
Rules:
|
|
91
|
+
1. Use conventional commits format: type(scope): description
|
|
92
|
+
2. Types: feat, fix, docs, style, refactor, perf, test, build, ci, chore
|
|
93
|
+
3. Keep the first line under 72 characters
|
|
94
|
+
4. Add a blank line and bullet points for details if needed
|
|
95
|
+
5. Focus on WHAT changed and WHY, not HOW
|
|
96
|
+
|
|
97
|
+
Diff summary:
|
|
98
|
+
$DIFF
|
|
99
|
+
|
|
100
|
+
Diff content:
|
|
101
|
+
$DIFF_CONTENT
|
|
102
|
+
|
|
103
|
+
Return ONLY the commit message, no explanations or markdown formatting."
|
|
104
|
+
|
|
105
|
+
# Generate message based on provider
|
|
106
|
+
case "$PROVIDER" in
|
|
107
|
+
claude)
|
|
108
|
+
MESSAGE=$(echo "$PROMPT" | claude --print 2>/dev/null || echo "")
|
|
109
|
+
;;
|
|
110
|
+
aider)
|
|
111
|
+
MESSAGE=$(echo "$PROMPT" | aider --message "$PROMPT" --no-git --yes 2>/dev/null | tail -20 || echo "")
|
|
112
|
+
;;
|
|
113
|
+
gemini)
|
|
114
|
+
MESSAGE=$(echo "$PROMPT" | gemini 2>/dev/null || echo "")
|
|
115
|
+
;;
|
|
116
|
+
sgpt)
|
|
117
|
+
MESSAGE=$(sgpt "$PROMPT" 2>/dev/null || echo "")
|
|
118
|
+
;;
|
|
119
|
+
ollama)
|
|
120
|
+
MODEL="${OLLAMA_MODEL:-llama3.2}"
|
|
121
|
+
MESSAGE=$(echo "$PROMPT" | ollama run "$MODEL" 2>/dev/null || echo "")
|
|
122
|
+
;;
|
|
123
|
+
*)
|
|
124
|
+
echo -e "${RED}Unknown provider: $PROVIDER${NC}"
|
|
125
|
+
exit 1
|
|
126
|
+
;;
|
|
127
|
+
esac
|
|
128
|
+
|
|
129
|
+
# Clean up the message
|
|
130
|
+
MESSAGE=$(echo "$MESSAGE" | sed 's/^```[a-z]*//g' | sed 's/```$//g' | sed '/^$/d' | head -20)
|
|
131
|
+
|
|
132
|
+
if [[ -z "$MESSAGE" ]]; then
|
|
133
|
+
echo -e "${RED}Failed to generate commit message.${NC}"
|
|
134
|
+
exit 1
|
|
135
|
+
fi
|
|
136
|
+
|
|
137
|
+
echo -e "${GREEN}Generated commit message:${NC}"
|
|
138
|
+
echo "---"
|
|
139
|
+
echo "$MESSAGE"
|
|
140
|
+
echo "---"
|
|
141
|
+
|
|
142
|
+
if [[ "$EDIT_MODE" == "true" ]]; then
|
|
143
|
+
# Create temp file for editing
|
|
144
|
+
TMPFILE=$(mktemp)
|
|
145
|
+
echo "$MESSAGE" > "$TMPFILE"
|
|
146
|
+
${EDITOR:-vim} "$TMPFILE"
|
|
147
|
+
MESSAGE=$(cat "$TMPFILE")
|
|
148
|
+
rm -f "$TMPFILE"
|
|
149
|
+
fi
|
|
150
|
+
|
|
151
|
+
# Confirm and commit
|
|
152
|
+
echo ""
|
|
153
|
+
read -p "Commit with this message? [Y/n] " -n 1 -r
|
|
154
|
+
echo
|
|
155
|
+
if [[ $REPLY =~ ^[Yy]$ ]] || [[ -z $REPLY ]]; then
|
|
156
|
+
git commit -m "$MESSAGE"
|
|
157
|
+
echo -e "${GREEN}Committed successfully!${NC}"
|
|
158
|
+
else
|
|
159
|
+
echo -e "${YELLOW}Commit cancelled.${NC}"
|
|
160
|
+
fi
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# git-ai-diff - AI-powered diff analysis and review
|
|
3
|
+
# Managed by chezmoi - https://github.com/sebastienrousseau/dotfiles
|
|
4
|
+
#
|
|
5
|
+
# Usage: git ai-diff [<commit>] [--provider <provider>]
|
|
6
|
+
# <commit>: Compare against this commit (default: HEAD)
|
|
7
|
+
# --provider: claude, gemini, sgpt, ollama (auto-detected if not specified)
|
|
8
|
+
|
|
9
|
+
set -euo pipefail
|
|
10
|
+
|
|
11
|
+
# Colors
|
|
12
|
+
RED='\033[0;31m'
|
|
13
|
+
GREEN='\033[0;32m'
|
|
14
|
+
YELLOW='\033[1;33m'
|
|
15
|
+
BLUE='\033[0;34m'
|
|
16
|
+
CYAN='\033[0;36m'
|
|
17
|
+
NC='\033[0m'
|
|
18
|
+
|
|
19
|
+
PROVIDER=""
|
|
20
|
+
TARGET="HEAD"
|
|
21
|
+
STAGED_ONLY=false
|
|
22
|
+
|
|
23
|
+
# Parse arguments
|
|
24
|
+
while [[ $# -gt 0 ]]; do
|
|
25
|
+
case $1 in
|
|
26
|
+
--provider|-p)
|
|
27
|
+
PROVIDER="$2"
|
|
28
|
+
shift 2
|
|
29
|
+
;;
|
|
30
|
+
--staged|-s)
|
|
31
|
+
STAGED_ONLY=true
|
|
32
|
+
shift
|
|
33
|
+
;;
|
|
34
|
+
--help|-h)
|
|
35
|
+
echo "Usage: git ai-diff [<commit>] [--provider <provider>] [--staged]"
|
|
36
|
+
echo ""
|
|
37
|
+
echo "Options:"
|
|
38
|
+
echo " <commit> Compare against this commit (default: HEAD)"
|
|
39
|
+
echo " --provider, -p AI provider: claude, gemini, sgpt, ollama, aider"
|
|
40
|
+
echo " --staged, -s Review only staged changes"
|
|
41
|
+
echo ""
|
|
42
|
+
echo "Environment:"
|
|
43
|
+
echo " GIT_AI_PROVIDER Default AI provider"
|
|
44
|
+
exit 0
|
|
45
|
+
;;
|
|
46
|
+
-*)
|
|
47
|
+
echo -e "${RED}Unknown option: $1${NC}"
|
|
48
|
+
exit 1
|
|
49
|
+
;;
|
|
50
|
+
*)
|
|
51
|
+
TARGET="$1"
|
|
52
|
+
shift
|
|
53
|
+
;;
|
|
54
|
+
esac
|
|
55
|
+
done
|
|
56
|
+
|
|
57
|
+
# Auto-detect provider if not specified
|
|
58
|
+
detect_provider() {
|
|
59
|
+
if [[ -n "${GIT_AI_PROVIDER:-}" ]]; then
|
|
60
|
+
echo "$GIT_AI_PROVIDER"
|
|
61
|
+
elif command -v claude >/dev/null 2>&1; then
|
|
62
|
+
echo "claude"
|
|
63
|
+
elif command -v aider >/dev/null 2>&1; then
|
|
64
|
+
echo "aider"
|
|
65
|
+
elif command -v gemini >/dev/null 2>&1; then
|
|
66
|
+
echo "gemini"
|
|
67
|
+
elif command -v sgpt >/dev/null 2>&1; then
|
|
68
|
+
echo "sgpt"
|
|
69
|
+
elif command -v ollama >/dev/null 2>&1; then
|
|
70
|
+
echo "ollama"
|
|
71
|
+
else
|
|
72
|
+
echo ""
|
|
73
|
+
fi
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
PROVIDER="${PROVIDER:-$(detect_provider)}"
|
|
77
|
+
|
|
78
|
+
if [[ -z "$PROVIDER" ]]; then
|
|
79
|
+
echo -e "${RED}Error: No AI provider found. Install claude, gemini, sgpt, aider, or ollama.${NC}"
|
|
80
|
+
exit 1
|
|
81
|
+
fi
|
|
82
|
+
|
|
83
|
+
# Get the diff
|
|
84
|
+
if [[ "$STAGED_ONLY" == "true" ]]; then
|
|
85
|
+
DIFF=$(git diff --cached)
|
|
86
|
+
DIFF_STAT=$(git diff --cached --stat)
|
|
87
|
+
CONTEXT="staged changes"
|
|
88
|
+
else
|
|
89
|
+
DIFF=$(git diff "$TARGET")
|
|
90
|
+
DIFF_STAT=$(git diff "$TARGET" --stat)
|
|
91
|
+
CONTEXT="changes compared to $TARGET"
|
|
92
|
+
fi
|
|
93
|
+
|
|
94
|
+
if [[ -z "$DIFF" ]]; then
|
|
95
|
+
echo -e "${YELLOW}No changes to review.${NC}"
|
|
96
|
+
exit 0
|
|
97
|
+
fi
|
|
98
|
+
|
|
99
|
+
echo -e "${BLUE}Analyzing ${CONTEXT} using ${PROVIDER}...${NC}"
|
|
100
|
+
echo ""
|
|
101
|
+
echo -e "${CYAN}Changed files:${NC}"
|
|
102
|
+
echo "$DIFF_STAT"
|
|
103
|
+
echo ""
|
|
104
|
+
|
|
105
|
+
# Prompt for diff analysis
|
|
106
|
+
PROMPT="You are an expert code reviewer. Analyze the following git diff and provide:
|
|
107
|
+
|
|
108
|
+
1. **Summary**: Brief overview of what changed (2-3 sentences)
|
|
109
|
+
2. **Key Changes**: Bullet points of important modifications
|
|
110
|
+
3. **Potential Issues**: Any bugs, security issues, or code smells you notice
|
|
111
|
+
4. **Suggestions**: Improvements or best practices to consider
|
|
112
|
+
5. **Risk Level**: Low/Medium/High with brief justification
|
|
113
|
+
|
|
114
|
+
Be concise but thorough. Focus on actionable feedback.
|
|
115
|
+
|
|
116
|
+
Diff:
|
|
117
|
+
\`\`\`diff
|
|
118
|
+
$DIFF
|
|
119
|
+
\`\`\`"
|
|
120
|
+
|
|
121
|
+
# Generate analysis based on provider
|
|
122
|
+
case "$PROVIDER" in
|
|
123
|
+
claude)
|
|
124
|
+
ANALYSIS=$(echo "$PROMPT" | claude --print 2>/dev/null || echo "")
|
|
125
|
+
;;
|
|
126
|
+
aider)
|
|
127
|
+
ANALYSIS=$(aider --message "$PROMPT" --no-git --yes 2>/dev/null | tail -50 || echo "")
|
|
128
|
+
;;
|
|
129
|
+
gemini)
|
|
130
|
+
ANALYSIS=$(echo "$PROMPT" | gemini 2>/dev/null || echo "")
|
|
131
|
+
;;
|
|
132
|
+
sgpt)
|
|
133
|
+
ANALYSIS=$(sgpt "$PROMPT" 2>/dev/null || echo "")
|
|
134
|
+
;;
|
|
135
|
+
ollama)
|
|
136
|
+
MODEL="${OLLAMA_MODEL:-llama3.2}"
|
|
137
|
+
ANALYSIS=$(echo "$PROMPT" | ollama run "$MODEL" 2>/dev/null || echo "")
|
|
138
|
+
;;
|
|
139
|
+
*)
|
|
140
|
+
echo -e "${RED}Unknown provider: $PROVIDER${NC}"
|
|
141
|
+
exit 1
|
|
142
|
+
;;
|
|
143
|
+
esac
|
|
144
|
+
|
|
145
|
+
if [[ -z "$ANALYSIS" ]]; then
|
|
146
|
+
echo -e "${RED}Failed to analyze diff.${NC}"
|
|
147
|
+
exit 1
|
|
148
|
+
fi
|
|
149
|
+
|
|
150
|
+
echo -e "${GREEN}=== AI Code Review ===${NC}"
|
|
151
|
+
echo ""
|
|
152
|
+
echo "$ANALYSIS"
|
|
153
|
+
echo ""
|
|
154
|
+
echo -e "${GREEN}=== End Review ===${NC}"
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Hash calculator (MD5, SHA1, SHA256, SHA512)
|
|
3
|
+
# Usage: hash [algorithm] <string|file>
|
|
4
|
+
|
|
5
|
+
set -euo pipefail
|
|
6
|
+
|
|
7
|
+
usage() {
|
|
8
|
+
echo "Usage: hash [OPTIONS] [INPUT]"
|
|
9
|
+
echo ""
|
|
10
|
+
echo "Algorithms:"
|
|
11
|
+
echo " -m, --md5 MD5 hash"
|
|
12
|
+
echo " -1, --sha1 SHA-1 hash"
|
|
13
|
+
echo " -2, --sha256 SHA-256 hash (default)"
|
|
14
|
+
echo " -5, --sha512 SHA-512 hash"
|
|
15
|
+
echo " -a, --all Show all hashes"
|
|
16
|
+
echo ""
|
|
17
|
+
echo "Options:"
|
|
18
|
+
echo " -f, --file Hash file contents"
|
|
19
|
+
echo " -c, --check Verify hash (input: hash to verify)"
|
|
20
|
+
echo " -h, --help Show this help"
|
|
21
|
+
echo ""
|
|
22
|
+
echo "Examples:"
|
|
23
|
+
echo " hash 'hello' # SHA256 of string"
|
|
24
|
+
echo " hash -m 'hello' # MD5 of string"
|
|
25
|
+
echo " hash -f myfile.txt # SHA256 of file"
|
|
26
|
+
echo " hash -a 'hello' # All hashes"
|
|
27
|
+
echo " hash -c abc123 'hello' # Verify hash"
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
ALGO="sha256"
|
|
31
|
+
FILE_MODE=false
|
|
32
|
+
CHECK_MODE=false
|
|
33
|
+
ALL_MODE=false
|
|
34
|
+
|
|
35
|
+
while [[ $# -gt 0 ]]; do
|
|
36
|
+
case "$1" in
|
|
37
|
+
-m|--md5) ALGO="md5"; shift ;;
|
|
38
|
+
-1|--sha1) ALGO="sha1"; shift ;;
|
|
39
|
+
-2|--sha256) ALGO="sha256"; shift ;;
|
|
40
|
+
-5|--sha512) ALGO="sha512"; shift ;;
|
|
41
|
+
-a|--all) ALL_MODE=true; shift ;;
|
|
42
|
+
-f|--file) FILE_MODE=true; shift ;;
|
|
43
|
+
-c|--check) CHECK_MODE=true; EXPECTED="$2"; shift 2 ;;
|
|
44
|
+
-h|--help) usage; exit 0 ;;
|
|
45
|
+
-*) echo "Unknown option: $1"; usage; exit 1 ;;
|
|
46
|
+
*) break ;;
|
|
47
|
+
esac
|
|
48
|
+
done
|
|
49
|
+
|
|
50
|
+
# Get hash command based on algorithm
|
|
51
|
+
get_hash_cmd() {
|
|
52
|
+
local algo="$1"
|
|
53
|
+
case "$algo" in
|
|
54
|
+
md5)
|
|
55
|
+
if command -v md5sum >/dev/null 2>&1; then echo "md5sum"
|
|
56
|
+
elif command -v md5 >/dev/null 2>&1; then echo "md5 -q"
|
|
57
|
+
else echo "openssl md5 -r"; fi
|
|
58
|
+
;;
|
|
59
|
+
sha1)
|
|
60
|
+
if command -v sha1sum >/dev/null 2>&1; then echo "sha1sum"
|
|
61
|
+
elif command -v shasum >/dev/null 2>&1; then echo "shasum -a 1"
|
|
62
|
+
else echo "openssl sha1 -r"; fi
|
|
63
|
+
;;
|
|
64
|
+
sha256)
|
|
65
|
+
if command -v sha256sum >/dev/null 2>&1; then echo "sha256sum"
|
|
66
|
+
elif command -v shasum >/dev/null 2>&1; then echo "shasum -a 256"
|
|
67
|
+
else echo "openssl sha256 -r"; fi
|
|
68
|
+
;;
|
|
69
|
+
sha512)
|
|
70
|
+
if command -v sha512sum >/dev/null 2>&1; then echo "sha512sum"
|
|
71
|
+
elif command -v shasum >/dev/null 2>&1; then echo "shasum -a 512"
|
|
72
|
+
else echo "openssl sha512 -r"; fi
|
|
73
|
+
;;
|
|
74
|
+
esac
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
compute_hash() {
|
|
78
|
+
local algo="$1"
|
|
79
|
+
local input="$2"
|
|
80
|
+
local cmd=$(get_hash_cmd "$algo")
|
|
81
|
+
|
|
82
|
+
if $FILE_MODE; then
|
|
83
|
+
$cmd "$input" | awk '{print $1}'
|
|
84
|
+
else
|
|
85
|
+
echo -n "$input" | $cmd | awk '{print $1}'
|
|
86
|
+
fi
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
# Get input
|
|
90
|
+
if [[ $# -gt 0 ]]; then
|
|
91
|
+
INPUT="$1"
|
|
92
|
+
else
|
|
93
|
+
read -r INPUT
|
|
94
|
+
fi
|
|
95
|
+
|
|
96
|
+
# Validate file mode
|
|
97
|
+
if $FILE_MODE && [[ ! -f "$INPUT" ]]; then
|
|
98
|
+
echo "Error: File not found: $INPUT"
|
|
99
|
+
exit 1
|
|
100
|
+
fi
|
|
101
|
+
|
|
102
|
+
if $ALL_MODE; then
|
|
103
|
+
echo "MD5: $(compute_hash md5 "$INPUT")"
|
|
104
|
+
echo "SHA1: $(compute_hash sha1 "$INPUT")"
|
|
105
|
+
echo "SHA256: $(compute_hash sha256 "$INPUT")"
|
|
106
|
+
echo "SHA512: $(compute_hash sha512 "$INPUT")"
|
|
107
|
+
elif $CHECK_MODE; then
|
|
108
|
+
COMPUTED=$(compute_hash "$ALGO" "$INPUT")
|
|
109
|
+
EXPECTED_LOWER=$(echo "$EXPECTED" | tr '[:upper:]' '[:lower:]')
|
|
110
|
+
COMPUTED_LOWER=$(echo "$COMPUTED" | tr '[:upper:]' '[:lower:]')
|
|
111
|
+
|
|
112
|
+
if [[ "$EXPECTED_LOWER" == "$COMPUTED_LOWER" ]]; then
|
|
113
|
+
echo "✓ Hash matches"
|
|
114
|
+
exit 0
|
|
115
|
+
else
|
|
116
|
+
echo "✗ Hash mismatch"
|
|
117
|
+
echo " Expected: $EXPECTED"
|
|
118
|
+
echo " Got: $COMPUTED"
|
|
119
|
+
exit 1
|
|
120
|
+
fi
|
|
121
|
+
else
|
|
122
|
+
compute_hash "$ALGO" "$INPUT"
|
|
123
|
+
fi
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Hex viewer/converter
|
|
3
|
+
# Usage: hex <file> | hex -e <string> | hex -d <hex>
|
|
4
|
+
|
|
5
|
+
set -euo pipefail
|
|
6
|
+
|
|
7
|
+
usage() {
|
|
8
|
+
echo "Usage: hex [OPTIONS] [INPUT]"
|
|
9
|
+
echo ""
|
|
10
|
+
echo "Options:"
|
|
11
|
+
echo " -e, --encode Convert string to hex"
|
|
12
|
+
echo " -d, --decode Convert hex to string"
|
|
13
|
+
echo " -c, --color Colorize output"
|
|
14
|
+
echo " -n, --length N Bytes per line (default: 16)"
|
|
15
|
+
echo " -h, --help Show this help"
|
|
16
|
+
echo ""
|
|
17
|
+
echo "Examples:"
|
|
18
|
+
echo " hex file.bin # View file in hex"
|
|
19
|
+
echo " hex -e 'hello' # String to hex"
|
|
20
|
+
echo " hex -d '68656c6c6f' # Hex to string"
|
|
21
|
+
echo " cat file | hex # View stdin in hex"
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
MODE="view"
|
|
25
|
+
COLOR=false
|
|
26
|
+
BYTES_PER_LINE=16
|
|
27
|
+
|
|
28
|
+
while [[ $# -gt 0 ]]; do
|
|
29
|
+
case "$1" in
|
|
30
|
+
-e|--encode) MODE="encode"; shift ;;
|
|
31
|
+
-d|--decode) MODE="decode"; shift ;;
|
|
32
|
+
-c|--color) COLOR=true; shift ;;
|
|
33
|
+
-n|--length) BYTES_PER_LINE="$2"; shift 2 ;;
|
|
34
|
+
-h|--help) usage; exit 0 ;;
|
|
35
|
+
-*) echo "Unknown option: $1"; usage; exit 1 ;;
|
|
36
|
+
*) break ;;
|
|
37
|
+
esac
|
|
38
|
+
done
|
|
39
|
+
|
|
40
|
+
case "$MODE" in
|
|
41
|
+
encode)
|
|
42
|
+
INPUT="${1:-}"
|
|
43
|
+
[[ -z "$INPUT" ]] && read -r INPUT
|
|
44
|
+
echo -n "$INPUT" | xxd -p | tr -d '\n'
|
|
45
|
+
echo
|
|
46
|
+
;;
|
|
47
|
+
|
|
48
|
+
decode)
|
|
49
|
+
INPUT="${1:-}"
|
|
50
|
+
[[ -z "$INPUT" ]] && read -r INPUT
|
|
51
|
+
# Remove spaces and newlines
|
|
52
|
+
INPUT=$(echo "$INPUT" | tr -d ' \n')
|
|
53
|
+
echo "$INPUT" | xxd -r -p
|
|
54
|
+
echo
|
|
55
|
+
;;
|
|
56
|
+
|
|
57
|
+
view)
|
|
58
|
+
if [[ $# -gt 0 ]] && [[ -f "$1" ]]; then
|
|
59
|
+
INPUT_FILE="$1"
|
|
60
|
+
else
|
|
61
|
+
INPUT_FILE="-"
|
|
62
|
+
fi
|
|
63
|
+
|
|
64
|
+
if command -v xxd >/dev/null 2>&1; then
|
|
65
|
+
if $COLOR && command -v bat >/dev/null 2>&1; then
|
|
66
|
+
xxd -c "$BYTES_PER_LINE" "$INPUT_FILE" | bat --language=xxd --style=plain
|
|
67
|
+
else
|
|
68
|
+
xxd -c "$BYTES_PER_LINE" "$INPUT_FILE"
|
|
69
|
+
fi
|
|
70
|
+
elif command -v hexdump >/dev/null 2>&1; then
|
|
71
|
+
hexdump -C "$INPUT_FILE"
|
|
72
|
+
elif command -v od >/dev/null 2>&1; then
|
|
73
|
+
od -A x -t x1z -v "$INPUT_FILE"
|
|
74
|
+
else
|
|
75
|
+
echo "Error: xxd, hexdump, or od required"
|
|
76
|
+
exit 1
|
|
77
|
+
fi
|
|
78
|
+
;;
|
|
79
|
+
esac
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Show public and local IP addresses
|
|
3
|
+
# Usage: ip [--json]
|
|
4
|
+
|
|
5
|
+
set -euo pipefail
|
|
6
|
+
|
|
7
|
+
JSON_OUTPUT=false
|
|
8
|
+
[[ "${1:-}" == "--json" ]] && JSON_OUTPUT=true
|
|
9
|
+
|
|
10
|
+
# Get public IP
|
|
11
|
+
get_public_ip() {
|
|
12
|
+
curl -s --max-time 5 https://api.ipify.org 2>/dev/null ||
|
|
13
|
+
curl -s --max-time 5 https://ifconfig.me 2>/dev/null ||
|
|
14
|
+
curl -s --max-time 5 https://icanhazip.com 2>/dev/null ||
|
|
15
|
+
echo "unavailable"
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
# Get local IP
|
|
19
|
+
get_local_ip() {
|
|
20
|
+
if command -v ip >/dev/null 2>&1; then
|
|
21
|
+
ip route get 1 2>/dev/null | awk '{print $7; exit}'
|
|
22
|
+
elif command -v ifconfig >/dev/null 2>&1; then
|
|
23
|
+
ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1' | head -1
|
|
24
|
+
else
|
|
25
|
+
hostname -I 2>/dev/null | awk '{print $1}' || echo "unavailable"
|
|
26
|
+
fi
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
PUBLIC_IP=$(get_public_ip)
|
|
30
|
+
LOCAL_IP=$(get_local_ip)
|
|
31
|
+
|
|
32
|
+
if $JSON_OUTPUT; then
|
|
33
|
+
echo "{\"public\": \"$PUBLIC_IP\", \"local\": \"$LOCAL_IP\"}"
|
|
34
|
+
else
|
|
35
|
+
echo "Public IP: $PUBLIC_IP"
|
|
36
|
+
echo "Local IP: $LOCAL_IP"
|
|
37
|
+
fi
|