> For the complete documentation index, see [llms.txt](https://memogarcia.gitbook.io/continuous-learning/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://memogarcia.gitbook.io/continuous-learning/tech/os/mac/configure.md).

# Configure MacOS

Installing brew

```bash
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```

Install CLI tools

```bash
brew install \
    git zsh tmux vim wget jq curl htop tree exa bat fzf ripgrep kind k9s k6 istioctl hugo ansible argo argocd atlas autojump bat crane docker-compose eksctl faas-cli gnupg helm go httpie tmux terraform skaffold ripgrep rust python@3.11 pyyaml pulumi poetry nim nmap openstackclient neovim linkerd kubectl bandwhich tokei gh glab
```

Install UI tools

```bash
brew install --cask \
    amethyst keycastr kity numi orion meld wireshark-chmodbpf
```

Configure `~/.zshrc`

```bash
setopt HIST_IGNORE_ALL_DUPS

bindkey -e

WORDCHARS=${WORDCHARS//[\/]}

ZSH_AUTOSUGGEST_MANUAL_REBIND=1

ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets)


ZIM_HOME=${ZDOTDIR:-${HOME}}/.zim
# Download zimfw plugin manager if missing.
if [[ ! -e ${ZIM_HOME}/zimfw.zsh ]]; then
  if (( ${+commands[curl]} )); then
    curl -fsSL --create-dirs -o ${ZIM_HOME}/zimfw.zsh \
        https://github.com/zimfw/zimfw/releases/latest/download/zimfw.zsh
  else
    mkdir -p ${ZIM_HOME} && wget -nv -O ${ZIM_HOME}/zimfw.zsh \
        https://github.com/zimfw/zimfw/releases/latest/download/zimfw.zsh
  fi
fi
# Install missing modules, and update ${ZIM_HOME}/init.zsh if missing or outdated.
if [[ ! ${ZIM_HOME}/init.zsh -nt ${ZDOTDIR:-${HOME}}/.zimrc ]]; then
  source ${ZIM_HOME}/zimfw.zsh init -q
fi
# Initialize modules.
source ${ZIM_HOME}/init.zsh

zmodload -F zsh/terminfo +p:terminfo
# Bind ^[[A/^[[B manually so up/down works both before and after zle-line-init
for key ('^[[A' '^P' ${terminfo[kcuu1]}) bindkey ${key} history-substring-search-up
for key ('^[[B' '^N' ${terminfo[kcud1]}) bindkey ${key} history-substring-search-down
for key ('k') bindkey -M vicmd ${key} history-substring-search-up
for key ('j') bindkey -M vicmd ${key} history-substring-search-down
unset key

export ZSH="/Users/memo/.oh-my-zsh"

ZSH_THEME="nebirhos"

plugins=(git git-extras jsontools repo sudo)

source $ZSH/oh-my-zsh.sh


export PATH=/opt/homebrew/bin:$PATH

export EDITOR=nvim
export VISUAL=nvim
alias vi=nvim
alias vim=nvim
alias cat=bat
alias grep=rg
alias git=/opt/homebrew/bin/git
alias ls=exa
alias k=kubectl

# kitty
export TERM=xterm-256color

setopt EXTENDED_HISTORY
setopt HIST_EXPIRE_DUPS_FIRST
setopt HIST_IGNORE_DUPS
setopt HIST_IGNORE_ALL_DUPS
setopt HIST_IGNORE_SPACE
setopt HIST_FIND_NO_DUPS
setopt HIST_SAVE_NO_DUPS
setopt HIST_BEEP

export HISTTIMEFORMAT=${HISTTIMEFORMAT:-"%Y-%m-%d %H:%M:%S"}
export HISTCONTROL=$HISTCONTROL${HISTCONTROL+:}ignoredups
export HISTSIZE=${HISTSIZE:-32768} # resize history size
export HISTFILESIZE=$HISTSIZE

source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh

[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh

export FZF_DEFAULT_OPTS='--color=fg:#f8f8f2,bg:#282a36,hl:#bd93f9 --color=fg+:#f8f8f2,bg+:#44475a,hl+:#bd93f9 --color=info:#ffb86c,prompt:#50fa7b,pointer:#ff79c6 --color=marker:#ff79c6,spinner:#ffb86c,header:#6272a4'

export PATH=$PATH:~/.linkerd2/bin

[ -f /opt/homebrew/etc/profile.d/autojump.sh ] && . /opt/homebrew/etc/profile.d/autojump.sh

export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://memogarcia.gitbook.io/continuous-learning/tech/os/mac/configure.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
