Personal dotfiles and development environment configuration for macOS. Features organized configs, automated setup scripts, and a collection of productivity utilities.
Tmux + Neovim setup with Catppuccin theme and Powerlevel10k
.
├── assets/ # Static assets
│ ├── catppuccin_*.zsh # Zsh syntax highlighting themes
│ ├── JetBrainsMonoPatched.zip # Nerd Font for terminal
│ └── terminal-setup.png # Terminal setup screenshot
├── bin/ # Custom scripts and utilities
│ ├── android/ # Android development scripts
│ │ ├── adb-install # Install React Native apps
│ │ ├── adb-reverse # Port forwarding setup
│ │ ├── adb-uninstall # Uninstall apps from device
│ │ └── wireless-adb # Wireless debugging setup
│ ├── dev/ # Development utilities
│ │ ├── kill-port # Kill process on specified port
│ │ ├── setup-ssh-agent # SSH key management
│ │ └── setup/ # Environment setup scripts
│ │ ├── setup-environment # Install dev tools
│ │ ├── install-global-deps # Install global packages
│ │ └── link-dotfiles # Create config symlinks
│ └── utils.sh # Shared utility functions
├── configs/ # Configuration files
│ ├── .eslintrc.json # ESLint configuration
│ ├── .gitconfig.example # Git configuration template
│ ├── .gitconfig__wrk.example # Work-specific git config template
│ ├── .p10k.zsh # Powerlevel10k theme
│ ├── .prettierrc.json # Prettier configuration
│ ├── .tmux.conf # Tmux configuration
│ ├── .vimrc # Vim configuration
│ ├── .zshrc # Zsh configuration
│ ├── .zshrc_pre # Zsh pre-configuration (themes)
│ ├── ssh_config.example # SSH configuration template
│ ├── eslint/ # ESLint configurations
│ │ ├── eslint.config.ts # ESLint flat config (modern)
│ │ └── eslint-utilities.ts # ESLint shared utilities
│ ├── prettier.config.js # Prettier config (modern)
│ ├── tsconfig.base.json # TypeScript base config
│ └── tsconfig.json # TypeScript project config
├── alacritty/ # Alacritty terminal config
├── fish/ # Fish shell configuration
├── nvim/ # Neovim configuration
└── LICENSE # MIT License
-
Clone this repository:
git clone https://github.com/san-siva/dotfiles.git ~/.config cd ~/.config
-
Create your
~/.zshrcfile:echo "source ~/.config/configs/.zshrc" > ~/.zshrc
-
Set up your git and SSH configuration:
# Copy the example files cp configs/.gitconfig.example configs/.gitconfig cp configs/.gitconfig__wrk.example configs/.gitconfig__wrk cp configs/ssh_config.example configs/ssh_config # Edit with your personal information # configs/.gitconfig - Update email, name, and work directory path # configs/.gitconfig__wrk - Update work email, name, and signing key paths # configs/ssh_config - Update SSH key paths for github and github-wrk aliases
Note: The actual
.gitconfigandssh_configfiles are gitignored to protect your credentials from being exposed in the repository. The work config includes URL rewriting to automatically use the correct SSH key for all GitHub operations in work repos. -
Run the setup scripts:
# Install development environment and tools ./bin/dev/setup/setup-environment # Install global dependencies (npm, brew, pip packages) ./bin/dev/setup/install-global-deps # Create symlinks for config files ./bin/dev/setup/link-dotfiles
All scripts follow a consistent structure with a main() function and display a "Sankit" banner. They use the shared utils.sh library for common operations.
Located in bin/android/:
-
wireless-adb- Enable wireless ADB debugging over WiFiwireless-adb # Follow prompts to enter port number -
adb-install- Install and run React Native app with custom configurationadb-install --port=8081 --env=.env.dev --variant=debug
-
adb-uninstall- Uninstall app from connected Android deviceadb-uninstall --target=com.example.app
-
adb-reverse- Setup reverse port forwarding for React Nativeadb-reverse --metro-port=8081 --target-port=8081
Located in bin/dev/:
-
kill-port- Kill process running on specified portkill-port --port=3000
-
setup-ssh-agent- Silently setup SSH agent and load keys- Automatically sources in
.zshrc - Loads personal and work SSH keys
- Only prints errors/warnings
- Automatically sources in
Located in bin/dev/setup/:
-
setup-environment- Install all development tools- Installs: Lua, Python, Neovim, Node.js, Yarn, Ruby, Rust, Java, Go, Tmux, Kitty, Oh My Zsh
- Each function checks if tools are already installed
-
install-global-deps- Install global npm, brew, and pip packages- ESLint, Prettier, TypeScript, Jest (with all necessary plugins)
- ripgrep, fzf, fd, zoxide, jq, yq
- figlet, lolcat (for script banners)
- Gitsy (git workflow automation tools)
- Symlinks ESLint configs globally to npm lib directory
- Each function handles its own dependency checks
-
link-dotfiles- Create symlinks from~/.config/configs/to home directory- Links:
.tmux.conf,.vimrc,.prettierrc.json,.eslintrc.json,.p10k.zsh - Links:
.gitconfig,.gitconfig__wrk,.ssh/config(must be created from.examplefiles first)
- Links:
All configs are located in configs/ and automatically linked to your home directory.
-
.gitconfig.example- Template for main git configuration- Copy to
.gitconfigand customize with your email/name - Auto-includes work config for
~/Documents/Work/repos - Configured for git submodules
- Copy to
-
.gitconfig__wrk.example- Template for work-specific overrides- Copy to
.gitconfig__wrkand customize with your work email - GPG commit signing with SSH
- Update signing key path to match your SSH key location
- URL rewriting: Automatically rewrites GitHub URLs to use
github-wrkSSH aliasgit@github.com:→git@github-wrk:(for all work repos)- Only applies to repos under the work directory path specified in
.gitconfig
- Copy to
Privacy Note: The actual
.gitconfigand.gitconfig__wrkfiles are gitignored to prevent exposing personal email addresses in the repository. Always use the.examplefiles as templates.
ssh_config.example- Template for SSH configuration- Copy to
ssh_configand customize with your SSH key paths - Supports separate GitHub hosts for personal and work accounts
- Configure
IdentityFilepaths to match your SSH key locations - Host aliases:
github- Personal GitHub account (uses personal SSH key)github-wrk- Work GitHub account (uses work SSH key)
- Works seamlessly with git URL rewriting in
.gitconfig__wrk- All GitHub URLs in work repos automatically use
github-wrkalias - Ensures correct SSH key is used for authentication and commit signing
- All GitHub URLs in work repos automatically use
- Copy to
Example ~/.ssh/config:
Host github
HostName github.com
User git
IdentityFile ~/.ssh/id_rsa_personal
IdentitiesOnly no
Host github-wrk
HostName github.com
User git
IdentityFile ~/.ssh/id_rsa_work
IdentitiesOnly yes
This configuration allows you to use different SSH keys for personal and work GitHub accounts. The github-wrk alias is automatically used for all repositories under your work directory (as configured in .gitconfig) via URL rewriting.
Privacy Note: The actual
ssh_configfile is gitignored to protect your SSH key paths from being exposed in the repository. Always use the.examplefile as a template.
-
.zshrc- Main Zsh configuration- Path management (Homebrew, Go, Cargo, Ruby, Java)
- NVM integration (silent output)
- SSH agent setup via dedicated script
- Zoxide initialization
- Aliases for common commands
-
.zshrc_pre- Theme and Oh My Zsh setup- Loads Catppuccin syntax highlighting
- Powerlevel10k theme configuration
- History substring search plugin
-
.p10k.zsh- Powerlevel10k theme customization
Generic configs suitable for React/Node.js projects:
tsconfig.base.json- Base TypeScript configuration with strict settingstsconfig.json- Project-specific TypeScript configeslint/eslint.config.ts- Modern flat ESLint configuration (symlinked globally by setup script)eslint/eslint-utilities.ts- Shared ESLint rules and plugins (symlinked globally by setup script)- React, React Hooks, Redux Saga
- Jest testing rules
- Import sorting and organization
- TypeScript strict rules
- Symlinked to:
$(npm config get prefix)/lib/eslint-configs/
jest.config.js- Jest testing framework configuration
Note: The ESLint configs are automatically symlinked globally when running
install-global-deps. Any updates to the configs in~/.config/configs/eslint/are immediately reflected globally. You can import them in your projects using the path shown during installation.
eclipse-java-google-style.xml- Eclipse Java formatter with Google style guidelombok.jar- Lombok library for Java annotation processing
prettier.config.js- Prettier configuration (4-space tabs, single quotes).prettierrc.json- Alternative JSON format for compatibility
.tmux.conf- Tmux configuration.vimrc- Vim editor configurationnvim/- Neovim configuration with lazy.nvim package manageralacritty/- Alacritty terminal emulator configkitty/- Kitty terminal configuration
All scripts follow a consistent, maintainable pattern:
#!/usr/bin/env bash
# Author: Santhosh Siva
# Date Created: DD-MM-YYYY
# Description: What this script does
source "$(dirname "${BASH_SOURCE[0]}")/../utils.sh"
# Default Values
variable=""
set_flags() {
# Parse command line arguments
while [ $# -gt 0 ]; do
case "$1" in
-h | --help) show_help ;;
--option=*) variable="${1#*=}" ;;
*) echo "Unknown option: $1" && exit 1 ;;
esac
shift
done
}
main() {
validate_dependencies figlet lolcat # For banner scripts
print_banner # Shows "Sankit" banner
set_flags "$@"
# Script logic here
}
main "$@"
exit 0Display Functions:
print_banner()- Display ASCII art "Sankit" banner using figlet and lolcatprint_message(message, step_number)- Formatted console output with step numbersindent()- Indent piped output with "│" prefix
Dependency Management:
validate_dependencies(cmd1 cmd2 ...)- Check and auto-install via brew if missinginstall_dependency(cmd, package)- Install single package via brew
User Interaction:
prompt_user(default_yes, message, step)- Interactive Y/n prompts with coloroverwrite(message)- Overwrite previous terminal line
Utilities:
navigate_to_dir(dir)- Safely change directory with error handlingis_git_repo(dir)- Check if directory is a git repositorycheck_uncommitted_changes()- Check if git repo has uncommitted changes
Color Variables:
$BLUE,$GREEN,$RED,$PROMPT,$NC- Terminal color codes
Kill a process on port 3000:
kill-port --port=3000Install and run React Native app:
adb-install --port=8081 --env=.env.staging --variant=debugSetup wireless ADB debugging:
wireless-adb
# Enter port when prompted (e.g., 5555)Setup reverse port forwarding:
adb-reverse --metro-port=8081Uninstall app from device:
adb-uninstall --target=com.myapp.debugGitsy is automatically installed by the install-global-deps script. If not already installed, run:
npm install -g @san-siva/gitsyCheckout to a branch:
g-co --target-branch=feature/new-feature --stash-changesCreate worktree:
g-wa --target-branch=hotfix/critical --path=../hotfix-worktreeDelete worktree:
g-wr --target-branch=feature/old-featureCompare branches with diff:
g-diff --target-branch=main # Show stat summary
g-diff --target-branch=main --full # Show full diff with colorsSee the Gitsy npm package for complete documentation.
- macOS - Scripts are macOS-specific (uses
brew, macOS paths) - Git - For cloning and submodule management
- Zsh - Default shell (comes with macOS)
The setup scripts will install these if missing:
- Homebrew - Package manager for macOS
- Node.js / npm - Via NVM (Node Version Manager)
- Python 3 / pip3 - For Python tools
- Ruby / gem - For Ruby packages
- Rust / cargo - For Rust tools
- Go - For Go tools
- Java / JDK - For Java development
- figlet - ASCII art text generation (auto-installed)
- lolcat - Rainbow coloring (auto-installed)
-
Fork this repository on GitHub
-
Set up your personal git and SSH configuration:
cp configs/.gitconfig.example configs/.gitconfig cp configs/.gitconfig__wrk.example configs/.gitconfig__wrk cp configs/ssh_config.example configs/ssh_config
- Edit
configs/.gitconfig- Change email, name, and work directory path (e.g.,~/Documents/Work/) - Edit
configs/.gitconfig__wrk- Set work email, signing key path, and verify URL rewriting rules - Edit
configs/ssh_config- Update SSH key paths forgithubandgithub-wrkaliases - Update
bin/dev/setup-ssh-agent- Update SSH key paths
- Edit
-
Customize the banner:
- Edit
bin/utils.shline 69-73 - Change
figlet -f slant "Sankit"to your name
- Edit
-
Add custom scripts:
- Place in
bin/directory - Use the standard script template
- Source
utils.shfor helper functions
- Place in
-
Modify configurations:
- Edit files in
configs/directory - Run
link-dotfilesto update symlinks
- Edit files in
-
Add custom paths:
- Edit
configs/.zshrcaround line 97 - Add your project directories to PATH
- Edit
The setup supports different git configs and SSH keys based on directory:
Git Configuration:
- Personal repos: Uses
configs/.gitconfig(personal email, default GitHub URLs) - Work repos in
~/Documents/Work/: Automatically usesconfigs/.gitconfig__wrk- Work email with GPG signing using SSH
- Git URL rewriting: All
github.comURLs automatically usegithub-wrkSSH alias - Organization-specific URLs (e.g.,
github-nexthink) also rewritten togithub-wrk
SSH Key Management:
githubalias → Personal SSH key (for personal repos)github-wrkalias → Work SSH key (automatically used for all work repos via URL rewriting)- Submodules in work repos automatically use correct SSH key
How it works:
- When you clone or pull in
~/Documents/Work/, git includes.gitconfig__wrk - URL rewriting rewrites
git@github.com:org/repo→git@github-wrk:org/repo - SSH uses the
github-wrkalias configuration with your work SSH key - Commits are signed with your work SSH signing key
Both files must be created from their respective .example templates to protect your personal information from being committed to the repository.
MIT License - See LICENSE file for details
- Author: Santhosh Siva
- Inspired by the dotfiles community