Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 18 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,24 @@ Suitup can bootstrap Zsh and Homebrew for you, but the most reliable path is to

### Install and run

Suitup now assumes zsh is already installed and that you are running the command from a zsh session.
When you run suitup locally from the repo, use a zsh session. The curl installer can bootstrap missing prerequisites for you on a fresh machine.

### Quick install via curl

```bash
curl -fsSL https://raw.githubusercontent.com/ChangeHow/suitup/main/install.sh | bash
```

The installer first asks whether you want `init` (full setup) or `append` (incremental updates to an existing `.zshrc`), then downloads a temporary copy of the repo, runs `npm ci`, and launches the matching `node src/cli.js` command inside `zsh`.
The installer now defaults to `init`, bootstraps missing `zsh` and Node.js/npm when possible, downloads a temporary copy of the repo, runs `npm ci`, and launches suitup inside `zsh`.

`init` is a non-interactive quick-start path that uses recommended defaults:

- bootstrap package manager + zsh when needed
- install the layered zsh config
- install zinit + Powerlevel10k preset
- install recommended CLI tools and frontend tooling
- install recommended GUI apps on macOS
- write shared aliases

You can also pass a specific command to the installer:

Expand All @@ -75,6 +84,7 @@ node src/cli.js

| Command | Description |
|---------|-------------|
| `node src/cli.js init` | Non-interactive quick init with recommended defaults |
| `node src/cli.js` | Full interactive setup (default) |
| `node src/cli.js setup` | Same as above |
| `node src/cli.js append` | Append configs to existing `.zshrc` |
Expand Down Expand Up @@ -222,13 +232,15 @@ After setup, your shell config looks like:
options.zsh # Zsh shell options
shared/
tools.zsh # Tool init (fzf, atuin, zoxide, fnm)
plugins.zsh # zinit plugin declarations
highlighting.zsh # zsh-syntax-highlighting styles
aliases.zsh # Shared aliases
completion.zsh # Native completion setup
prompt.zsh # Prompt/theme (p10k)
local/
machine.zsh # Machine-specific overrides
secrets.zsh # API keys (create manually, gitignored)
~/.config/suitup/
aliases # Shell aliases
zinit-plugins # Zinit plugin config
config.vim # Vim config
```

Expand All @@ -247,8 +259,8 @@ Implementation details and architecture notes live in `AGENTS.md`.

- macOS (full support, tested on Sonoma+)
- Linux (bootstrap package-manager selection supported; most install steps still target Homebrew ecosystem)
- Node.js >= 18
- Zsh installed locally
- Node.js >= 18 for local repo usage; the curl installer bootstraps it when possible
- Zsh for local repo usage; the curl installer bootstraps it when possible
- Run suitup from a zsh session (`echo $SHELL` should end with `zsh`)

## License
Expand Down
4 changes: 2 additions & 2 deletions configs/local/machine.zsh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# ============================================================================
# Machine-specific overrides
# ============================================================================
# Add local path additions, work profile toggles, or any other settings
# Add local path additions, machine-only toggles, or any other settings
# that apply only to this machine.
#
# Example:
# export ZSH_WORK_PROFILE=1 # load work/* config on this machine
# export EDITOR="nvim"
# path=("/usr/local/custom/bin" $path)
31 changes: 31 additions & 0 deletions configs/shared/aliases.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# ============================================================================
# Shared aliases
# Generated by suitup
# ============================================================================

# utilities
alias reload-zsh="source ~/.zshrc"
alias edit-zsh="${EDITOR:-vi} ~/.zshrc"
alias edit-plugins="${EDITOR:-vi} ~/.config/zsh/shared/plugins.zsh"
alias edit-aliases="${EDITOR:-vi} ~/.config/zsh/shared/aliases.zsh"
alias ll="eza -abghlS --color=always --icons=always"
alias ls="eza -s=name --group-directories-first --color=always --icons=always"
alias ltree="eza -abghS --icons=always --tree --git-ignore"
alias cat="bat"

# git
alias gco="git checkout"
alias gph="git push"
alias gphu='local b; b=$(git rev-parse --abbrev-ref HEAD 2>/dev/null); [[ $b != HEAD ]] && gph -u origin "$b"'
alias gcol="git checkout --no-guess"
alias gpl="git pull --rebase"
alias gcz="git-cz"
alias gczn="git-cz -n"
alias gst="git status --short"
alias glg="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %Cgreen(%cr) %C(bold blue)<%ae>%Creset%n%s' --abbrev-commit"
alias gss="git restore --staged ."
alias resolve-pnpmlock="git checkout --ours pnpm-lock.yaml && git add pnpm-lock.yaml"

# search
alias ss="fzf --walker-skip .git,node_modules --preview 'bat -n --color=always {}'"
alias zx='zoxide query --interactive'
20 changes: 20 additions & 0 deletions configs/shared/completion.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# ============================================================================
# Native zsh completion
# Generated by suitup
# ============================================================================

autoload -Uz compinit

_zsh_compdump_file="${XDG_CACHE_HOME:-$HOME/.cache}/zsh/.zcompdump"
typeset -g _zsh_completion_cache_mode='refresh'

if [[ -s "$_zsh_compdump_file" && -n "$(command find "$_zsh_compdump_file" -mtime -7 -print 2>/dev/null)" ]]; then
_zsh_completion_cache_mode='cache-hit'
compinit -C -d "$_zsh_compdump_file"
else
compinit -d "$_zsh_compdump_file"
fi

bindkey -M emacs '^I' expand-or-complete
bindkey -M viins '^I' expand-or-complete
bindkey -M vicmd '^I' expand-or-complete
20 changes: 20 additions & 0 deletions configs/shared/highlighting.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# ============================================================================
# Interactive shell highlighting
# Generated by suitup
# ============================================================================

typeset -gA ZSH_HIGHLIGHT_STYLES

ZSH_HIGHLIGHT_STYLES[arg0]='fg=green,bold'
ZSH_HIGHLIGHT_STYLES[single-hyphen-option]='fg=cyan'
ZSH_HIGHLIGHT_STYLES[double-hyphen-option]='fg=cyan'
ZSH_HIGHLIGHT_STYLES[path]='fg=blue,underline'
ZSH_HIGHLIGHT_STYLES[globbing]='fg=magenta'
ZSH_HIGHLIGHT_STYLES[history-expansion]='fg=blue,bold'
ZSH_HIGHLIGHT_STYLES[single-quoted-argument]='fg=yellow'
ZSH_HIGHLIGHT_STYLES[double-quoted-argument]='fg=yellow'
ZSH_HIGHLIGHT_STYLES[dollar-double-quoted-argument]='fg=magenta'
ZSH_HIGHLIGHT_STYLES[command-substitution-delimiter]='fg=magenta,bold'
ZSH_HIGHLIGHT_STYLES[process-substitution-delimiter]='fg=magenta,bold'
ZSH_HIGHLIGHT_STYLES[redirection]='fg=red,bold'
ZSH_HIGHLIGHT_STYLES[reserved-word]='fg=yellow,bold'
13 changes: 13 additions & 0 deletions configs/shared/plugins.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# ============================================================================
# zinit plugin declarations
# Generated by suitup
# ============================================================================

zinit ice wait"0" lucid atload'_zsh_autosuggest_bind_widgets'
zinit light 'zsh-users/zsh-autosuggestions'

zinit ice wait"0" lucid
zinit light 'zsh-users/zsh-syntax-highlighting'

zinit ice depth"1"
zinit light romkatv/powerlevel10k
6 changes: 0 additions & 6 deletions configs/shared/prompt.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@
# Generated by suitup (Powerlevel10k preset)
# ============================================================================

if (( ${+functions[zinit]} )); then
# Load p10k last so it wraps everything and exposes the `p10k` command.
zinit ice depth"1"
zinit light romkatv/powerlevel10k
fi

if [[ -f ~/.p10k.zsh ]]; then
source ~/.p10k.zsh
else
Expand Down
14 changes: 9 additions & 5 deletions configs/zshrc.template
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,18 @@ source "$ZSH_CONFIG/shared/tools.zsh"
# ---------------------------------------------------------------------------
# Plugin manager
# ---------------------------------------------------------------------------
_stage "zinit"
_stage "plugins"
ZINIT_HOME="${XDG_DATA_HOME:-${HOME}/.local/share}/zinit/zinit.git"
source_if_exists "${ZINIT_HOME}/zinit.zsh"

# Suitup
_stage "suitup"
source_if_exists "$HOME/.config/suitup/zinit-plugins"
source_if_exists "$HOME/.config/suitup/aliases"
# Shared shell config
source_if_exists "$ZSH_CONFIG/shared/plugins.zsh"
source_if_exists "$ZSH_CONFIG/shared/highlighting.zsh"
source_if_exists "$ZSH_CONFIG/shared/aliases.zsh"

# Completion system
_stage "completion"
source_if_exists "$ZSH_CONFIG/shared/completion.zsh"

# ---------------------------------------------------------------------------
# Local overrides
Expand Down
Loading
Loading