Personal shell configuration organized in a modular dotfile style β one function per file, easy to customize and portable across machines.
dotfiles/
βββ install.sh β Install/uninstall script
βββ Makefile β Shortcuts: make install, make update...
βββ .gitignore
βββ README.md
βββ test/
β βββ zsh_test.sh β Smoke tests for aliases/functions
βββ starship/
β βββ starship.toml β ~/.config/starship.toml
βββ zsh/
βββ .zshenv β ~/.zshenv (core env for interactive + non-interactive)
βββ zshrc β ~/.zshrc (entry point, only sources modules)
βββ config/
βββ env.zsh β entrypoint env, detects OS and sources appropriate module
βββ env.shared.zsh β shared runtime: bun hook, lazy NVM, atuin, envman
βββ env.linux.zsh β Linux-specific env (Linuxbrew, custom paths)
βββ env.macos.zsh β macOS-specific env (Homebrew Apple Silicon/Intel)
βββ options.zsh β ZSH options + HISTSIZE
βββ completion.zsh β compinit, zstyle, docker/kubectl completion
βββ plugins.zsh β fzf, zoxide, starship, autosuggestions, syntax-highlight, atuin
βββ aliases.zsh β modern CLI, git, docker, k8s, system
βββ functions.zsh β fsearch, hs, hgrep, sgrep, dsearch, lsearch, dklog, log
βββ keybindings.zsh β bindkey
βββ history-auto-repair.zsh
βββ history-repair.sh
βββ local.zsh β (NOT committed) per-machine overrides
local.zshloads last β use it to override aliases, add env vars, or machine-specific config without editing shared files.
.zshenvis always loaded first by Zsh (even non-interactive shells). Keep only essential environment variables; avoid heavysource/evalhere.
git clone <repo-url> ~/dotfiles
cd ~/dotfiles
./install.shDone. Open a new terminal or run source ~/.zshrc.
The script checks and auto-installs missing tools/plugins. Full checklist:
| Plugin | Purpose |
|---|---|
| fzf | Fuzzy finder |
| zoxide | Smart cd |
| starship | Prompt |
| atuin | Enhanced history |
| zsh-autosuggestions | Command suggestions |
| zsh-syntax-highlighting | Syntax highlighting |
| Tool | Purpose |
|---|---|
| eza | ls replacement |
| bat | cat replacement |
| ripgrep | grep replacement |
| lazygit | Git TUI |
| lazydocker | Docker TUI |
| btop | System monitor |
| duf | Disk usage |
| nvim | Neovim |
| k9s | K8s dashboard |
fixpyenv |
Auto-fix pyenv shim/lock errors |
Aliases: fixpyenv β Runs the fix-pyenv.sh script to resolve "Failed to load pyenv" or log stream errors on shell startup. The script runs automatically via zshrc, but you can invoke it manually if issues occur:
fixpyenvThe script will:
- Find and remove stale pyenv shim files
- Clean
__pycache__directories in~/.pyenv/versions/ - Fix permission issues on pyenv directories
./install.sh --plugins # Check and install zsh plugins
./install.sh --tools # Check and install CLI tools
./install.sh --doctor # Check all toolsThe script auto-selects install location:
- User mode:
~/.local/bin - Sudo mode:
/usr/local/bin
| Alias | Command | Description |
|---|---|---|
ls |
eza --icons |
List files with icons |
ll |
eza -lah --icons |
Detailed list |
la |
eza -a --icons |
Include hidden files |
tree |
eza --tree --icons |
Tree view |
cat |
bat |
View file with syntax highlighting |
grep |
rg |
Faster search |
rgd |
rg -g "!*.log" -g "!node_modules" |
rg ignoring logs and node_modules |
| Alias | Command |
|---|---|
g |
git |
gs |
git status |
ga |
git add |
gaa |
git add . |
gc |
git commit |
gcm "msg" |
git commit -m "msg" |
gp |
git push |
gl |
git pull |
gd |
git diff |
gco |
git checkout |
gcb |
git checkout -b |
glog |
git log --oneline --graph --decorate |
lg |
lazygit |
| Alias | Command |
|---|---|
d |
docker |
dc |
docker compose |
dps |
docker ps |
dpa |
docker ps -a |
di |
docker images |
dex |
docker exec -it |
dlog |
docker logs -f |
ld |
lazydocker |
ct |
ctop |
| Alias | Command |
|---|---|
k |
k9s |
kgp |
kubectl get pods |
kgs |
kubectl get svc |
kgn |
kubectl get nodes |
| Alias | Command |
|---|---|
cls |
clear |
bt |
btop |
df |
duf |
reload |
source ~/.zshrc |
Search file content β preview with bat β open in nvim at correct line.
fsearch "TODO"Search config files (yaml, toml, json) with fzf preview.
hs "traefik"Search with 3 lines context in *.yml, *.yaml, *.env.
hgrep "DATABASE_URL"Search inside services/<service> directory.
sgrep "PORT" apiSearch inside docker-compose files.
dsearch "volumes"Search in /var/log and ~/logs.
lsearch "error"View docker compose logs + realtime filter.
dklog api "ERROR"View docker or k8s logs depending on MODE variable.
log api "panic"
MODE=k8s log my-pod "timeout"# Edit files in ~/dotfiles/zsh/
vim ~/dotfiles/zsh/config/aliases.zsh
# Reload immediately
reload # or: source ~/.zshrc
# Commit and push
cd ~/dotfiles
git add . && git commit -m "feat: add new alias"
git pushgit pull # in ~/dotfiles/Changes take effect immediately thanks to symlinks β no need to re-run install.sh.
The repo keeps its current structure. These commands add an optional chezmoi-based workflow:
# Install chezmoi to ~/.local/bin
make chezmoi-install
# Initialize from this repo and apply immediately
make chezmoi-init
# Apply new changes
make chezmoi-applymake menu
# or
./install.sh --menuMenu supports: Install, Update, Doctor, Plugins, Tools, Test, Benchmark, Edit, Uninstall.
If fzf is available it uses fuzzy menu; otherwise falls back to select-style menu.
make lintmake testRun a single alias test:
make test TEST="alias ls"cd ~/dotfiles && ./install.sh --uninstallCreate ~/.config/zsh/local.zsh for machine-specific settings (not committed):
# Example: ~/.config/zsh/local.zsh
export WORK_TOKEN="ghp_..."
export KUBECONFIG="$HOME/.kube/work-cluster.yaml"
alias vpn="sudo openvpn ~/work.ovpn"See details in IMPROVEMENTS.md.
Ctrl+Rβ fzf history search (or use atuin if installed)z <directory>β jump to frequently-used directories (zoxide)fsearchβ search codebase, Enter opens nvim at correct line- History auto-repairs on corruption via
history-auto-repair.zsh