Skip to content

Repository files navigation

LinuxmacOSShellCheckLicenseSponsor

English | 日本語 | 中文

dotfiles

Development environment setup scripts for macOS, Ubuntu, and WSL. Select and install only the feature blocks you need via an interactive menu.


Quick Start

One-line install (curl)

Clone and run the interactive installer in one command:

curl -fsSL https://raw.githubusercontent.com/long-910/dotfiles/main/install.sh | bash

To install everything non-interactively:

curl -fsSL https://raw.githubusercontent.com/long-910/dotfiles/main/install.sh | bash -s -- --all

The repository is cloned to ~/.dotfiles. Set DOTFILES_DIR to override the location:

DOTFILES_DIR=~/my-dotfiles curl -fsSL https://raw.githubusercontent.com/long-910/dotfiles/main/install.sh | bash

bootstrap.sh (git clone)

Select feature blocks from an interactive menu.

git clone https://github.com/long-910/dotfiles.git
cd dotfiles
bash bootstrap.sh

install_and_configure.sh (Legacy)

All-in-one installer. For environments where bootstrap.sh is unavailable.

git clone https://github.com/long-910/dotfiles.git
cd dotfiles
chmod +x install_and_configure.sh
./install_and_configure.sh

Feature Blocks

BlockToolsDefault
Corezsh, tmux, lsd, emacs, htop, neofetch, yaziON
Shellstarship, fzf, zoxide, atuinON
Devgh, ripgrep, direnv, bat, delta, fd, jq, lazygitON
Node.jsfnm + Node LTS + commitizenOFF
DockerDocker CE + Docker ComposeOFF

Toggle ON/OFF by entering numbers when bootstrap.sh starts. Non-interactive execution is also available:

bash bootstrap.sh --all # All blocks
bash bootstrap.sh --module shell # Single module
bash bootstrap.sh --non-interactive # Auto with defaults
bash bootstrap.sh --list # List modules

Tools

Prompt & Shell Enhancement

ToolDescription
starshipFast, customizable cross-shell prompt
fzfFuzzy finder. Ctrl-R for history, Ctrl-T for files
zoxideSmart cd replacement. z proj jumps to frequent dirs
atuinSQLite-based shell history. Ctrl-R for fuzzy search

Development Tools

ToolDescription
ghGitHub CLI. Manage PRs and Issues from the terminal
ripgrepFast grep alternative. Respects .gitignore
direnvAuto-load per-directory environment variables
batcat alternative with syntax highlighting
deltaGit diff pager with syntax highlighting
fdFast find alternative
jqCommand-line JSON processor
lazygitTerminal UI for git

Terminal Multiplexer

ToolDescription
tmuxTerminal multiplexer. Auto-starts on login; exit tmux to close the shell

tmux starts automatically when you open a new terminal and attaches to the most recent existing session, or creates a new one. Closing tmux also exits the shell. To disable, remove ~/.zshrc.d/tmux.zsh.

File Management

ToolDescription
lsdls alternative with icons
yaziTerminal file manager. Launch with yy, cd to exit dir

WSL2 — icons not displaying? lsd uses Nerd Fonts for file-type icons. On WSL2 the terminal runs on Windows, so the font must be installed on the Windows side:

  1. Download a Nerd Font (e.g. CaskaydiaCove Nerd Font, JetBrainsMono Nerd Font) from nerdfonts.com
  2. Right-click the .ttf file → Install for all users
  3. In Windows Terminal: Settings → your Ubuntu profile → Appearance → Font face → select the installed font (e.g. CaskaydiaCove Nerd Font Mono)
  4. Restart the terminal

Customization

Prompt (starship)

Edit config/starship.toml to customize. After installation, it is placed at ~/.config/starship.toml.

Per-directory Environment Variables (direnv)

Create .envrc in your project root:

export DATABASE_URL="postgresql://localhost/myapp"export NODE_ENV="development"
direnv allow # Required on first use

Project Templates

Quickly scaffold projects with the newproject function:

newproject node my-app # Node.js project
newproject python my-script # Python project

Secrets Management

Store API keys and environment-specific settings in ~/.zshrc.local (not committed to git).

cp dotfiles/.zshrc.local.example ~/.zshrc.local
# Edit ~/.zshrc.local with your editor

See Doc/en/secrets.md for details.


Uninstall

bash uninstall.sh
  • Removes deployed files from ~/.zshrc.d/
  • Restores backups of .zshrc, .tmux.conf, .emacs.el
  • Removes ~/.config/starship.toml and ~/.config/atuin/config.toml
  • Removes git commit.template setting
  • Optionally removes installed packages

Documentation


Supported Environments

EnvironmentStatus
macOS (Apple Silicon / Intel)
Ubuntu 22.04 / 24.04
WSL2 (Ubuntu)

License

MIT — See LICENSE for details.

About

No description or website provided.

Topics

Resources

Stars

8 stars

Watchers

1 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages