AI CLI-optimized dotfiles for productive development in GitHub Codespaces and local environments.
git clone https://github.com/UngalSoththu/dotfiles.git ~/dotfiles
cd ~/dotfiles
./install.shgit clone https://github.com/UngalSoththu/dotfiles.git ~/dotfiles
cd ~/dotfiles
make installReload your shell:
source ~/.bashrc # or source ~/.zshrc- Pre-configured aliases for Claude Code and other AI CLIs
- AI-assisted git commits with
gaialias - Command explanation with
ai_explain - Environment variables for AI tool caching
- Bash - Enhanced with aliases, functions, and custom prompt
- Zsh - Compatible with Oh My Zsh, includes completion system
- Smart git integration (branch in prompt)
- History improvements (larger history, ignore duplicates)
- Codespaces detection
- Git - Optimized config for Codespaces, useful aliases
- Vim - Sensible defaults, vim-plug for plugins
- Tmux - Productive terminal workflows
dotfiles/
├── .gitignore # Exclude symlinks, backups, caches
├── README.md # This file
├── install.sh # Automated installation script
├── Makefile # Alternative make-based installation
├── shell/
│ ├── .bashrc # Main bash configuration
│ ├── .bash_profile # Bash login shell config
│ ├── .zshrc # Main zsh configuration
│ └── .profile # Generic shell profile
├── editors/
│ └── .vimrc # Vim configuration
├── terminal/
│ └── .tmux.conf # Tmux configuration
├── git/
│ ├── .gitconfig # Main git configuration
│ └── .gitconfig_codespaces # Codespaces-specific overrides
├── config/
│ ├── bash/
│ │ ├── aliases.sh # Bash aliases (AI CLI + general)
│ │ ├── chelper.sh # GLM/Zhipu AI integration
│ │ ├── functions.sh # Helper functions
│ │ ├── prompt.sh # Custom prompt configuration
│ │ └── paths.sh # PATH modifications
│ ├── zsh/
│ │ ├── aliases.zsh # Zsh-specific aliases
│ │ ├── chelper.zsh # GLM/Zhipu AI integration (zsh)
│ │ └── plugins.zsh # Zsh plugin configurations
│ └── git/
│ └── ignore # Global .gitignore templates
└── bin/
├── ai-cli-helper.sh # AI CLI utility functions
├── chelper-setup.sh # GLM/Zhipu AI setup script
└── codespaces-setup.sh # Codespaces-specific setup
git clone https://github.com/UngalSoththu/dotfiles.git ~/dotfiles
export DOTFILES_ROOT=~/dotfilesBash:
ln -s ~/dotfiles/shell/.bashrc ~/.bashrc
ln -s ~/dotfiles/shell/.bash_profile ~/.bash_profile
ln -s ~/dotfiles/shell/.profile ~/.profile
source ~/.bashrcZsh:
ln -s ~/dotfiles/shell/.zshrc ~/.zshrc
source ~/.zshrcln -s ~/dotfiles/git/.gitconfig ~/.gitconfig
ln -s ~/dotfiles/git/.gitconfig_codespaces ~/.gitconfig_codespaces
ln -s ~/dotfiles/config/git/ignore ~/.gitignore_globalln -s ~/dotfiles/editors/.vimrc ~/.vimrc
# Install vim-plug
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
# Install plugins in vim
vim +PlugInstall +qall# Install tmux first (if not installed)
sudo apt-get install tmux # Linux
brew install tmux # macOS
# Link config
ln -s ~/dotfiles/terminal/.tmux.conf ~/.tmux.confcc # Launch Claude Code
cca "ask" # Ask Claude a question
ccr # Review current code
cce # Explain current code
ccp # Generate implementation plan
cch # Show Claude Code helpai_explain cmd... # Explain a shell command
gai # AI-assisted git commit
ai_detect # Detect available AI CLI tools
ai_best # Show the best available AI tool# Explain a command
ai_explain "find . -name '*.js' | xargs grep 'TODO'"
# AI-assisted commit
git add .
gai
# Ask Claude a question
cca "How do I create a REST API in Python?"
# Review current file
ccrThis dotfiles repository includes integration with Zhipu AI GLM models through the @z_ai/coding-helper package. This allows you to use GLM models as an alternative backend for Claude Code.
Install with the dotfiles installer:
cd ~/dotfiles
./install.sh --with-chelperOr manually:
# Install the package
npm install -g @z_ai/coding-helper
# Or use the setup script
~/dotfiles/bin/chelper-setup.shGet your API key from https://open.bigmodel.cn/
# Set your API key
export Z_AI_API_KEY='your-api-key-here'
# Authenticate with GLM
chelper auth glm_coding_plan_global $Z_AI_API_KEY
# Reload Claude to use GLM backend
chelper auth reload claudeglm_init # Initialize GLM authentication
glm_status # Show current GLM status
glm_use # Switch to GLM backend
claude_use # Switch back to Claude backend
glm-auth # Quick auth command
glm-reload # Reload Claude configuration# One-time setup
npm install -g @z_ai/coding-helper
export Z_AI_API_KEY='your-api-key-here'
glm_init
# Now use Claude Code with GLM backend
ccZ_AI_API_KEY- Your Zhipu AI API keyCHELPER_CONFIG_DIR- Chelper config directory (default:~/.chelper)
gst # git status
ga # git add
gaa # git add -A
gd # git diff
gds # git diff --staged
gco # git checkout
gcb # git checkout -b
gcm # git commit -m
gp # git push
gl # git log --oneline --graph --decorate- Git branch and status display
- Codespaces indicator
[CS] - Color-coded user/host/path
- Python virtualenv display
mkcd <dir> # Create directory and enter it
extract <file> # Extract any archive
backup <file> # Backup a file
ff <name> # Find files by name
fd <name> # Find directories by name
psgrep <name> # Search processesThe vim configuration includes:
- Sensible defaults (line numbers, syntax highlighting)
- vim-plug plugin manager
- Pre-configured plugins (fugitive, airline, ale, etc.)
- Leader key set to
,
<leader>w # Save
<leader>q # Quit
<leader>ev # Edit .vimrc
<leader>sv # Reload .vimrc
<leader>n # Toggle relative line numbers
Ctrl-p # Fuzzy file searchThe tmux configuration includes:
- Prefix key:
Ctrl-a(instead of defaultCtrl-b) - Vim-like pane navigation (
h,j,k,l) - Split panes with
|(horizontal) and-(vertical) - Status bar with session info
Ctrl-a | # Split horizontally
Ctrl-a - # Split vertically
Ctrl-a h/j/k/l # Navigate panes
Ctrl-a c # New window
Ctrl-a n/p # Next/previous window
Ctrl-a r # Reload configEdit config/bash/aliases.sh to add personal aliases:
# Your custom aliases
alias myproject='cd ~/projects/myproject'
alias deploy='./scripts/deploy.sh'Edit config/bash/prompt.sh to customize the shell prompt.
- Add plugin to
editors/.vimrcin the vim-plug section:
Plug 'username/repo'- Run
vim +PlugInstall +qall
./install.sh./install.sh -y./install.sh --dry-run./install.sh --skip-vim-plugins --skip-tmuxThe dotfiles automatically detect Codespaces and:
- Set
[CS]indicator in prompt - Configure git credential helper
- Add Codespaces-specific aliases
Detected automatically for WSL-specific optimizations.
Detected automatically for macOS-specific paths and tools.
cd ~/dotfiles
git pullOr use make:
cd ~/dotfiles
make updateThe install script automatically backs up existing configs to ~/.dotfiles-backup/.
Manual backup:
make backupmake clean- OS: Linux, macOS, or WSL
- Shell: Bash 4+ or Zsh 5+
- Git: Version 2.0+
- Vim: Version 8+ (with
+python3recommended) - Optional: tmux, node, python, docker
For full functionality, consider installing:
# CLI tools
sudo apt-get install tmux tree hurl jq fzf
# Python tools
pip install black flake8 pylint
# Node tools
npm install -g @anthropic-ai/claude-code
# Zsh plugins (optional)
git clone https://github.com/zsh-users/zsh-syntax-highlighting ~/.zsh/zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestionsMIT License - feel free to use and modify for your own needs.
Contributions welcome! Feel free to submit issues or pull requests.
Inspired by various dotfiles repositories and the developer community.