├── .github └── pull_request_template.md ├── .gitignore ├── README.md ├── config ├── gitconfig ├── gitignore_global ├── peco-config.json ├── tmux.conf ├── zsh │ └── function │ │ ├── enter-list-files.zsh │ │ ├── http-status.zsh │ │ ├── peco-cdr-change-directory.zsh │ │ ├── peco-ghq-change-directory.zsh │ │ ├── peco-git-checkout-branch.zsh │ │ ├── peco-k8s-change-context.zsh │ │ ├── peco-k8s-change-namespace.zsh │ │ ├── peco-k8s-describe-pod.zsh │ │ ├── peco-k8s-stern.zsh │ │ ├── peco-k8s-view-pod-logs.zsh │ │ └── peco-select-command-history.zsh └── zshrc └── script ├── install-config.sh ├── install-else.sh ├── install-go.sh └── install-homebrew.sh /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | ## WHAT 2 | 10 | 11 | ## WHY 12 | 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | emacs.d/elpa/archives/* 2 | emacs.d/etc/.cache/* 3 | emacs.d/eshell 4 | emacs.d/.mc-lists.el 5 | emacs.d/.lsp-session-* 6 | .cask 7 | *.code-workspace 8 | .cursor/mcp.json -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | tcnksm does dotfiles [![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://github.com/tcnksm/dotfiles/blob/master/LICENCE) 2 | ==== 3 | 4 | Your dotfiles are how you personalize your system. These are mine :memo: 5 | 6 | ## Clone 7 | 8 | Add a new SSH key to your GitHub account 🔐: 9 | 10 | ```bash 11 | $ mkdir ~/.ssh 12 | $ cd ~/.ssh 13 | $ ssh-keygen -t ed25519 -C "email@example.com" -f github_ed25519 14 | $ pbcopy < github_ed25519.pub 15 | ``` 16 | 17 | Clone this repository: 18 | 19 | ```bash 20 | $ mkdir -p ~/src/github.com/tcnksm/ 21 | $ cd ~/src/github.com/tcnksm/ 22 | $ git clone git@github.com:tcnksm/dotfiles.git 23 | ``` 24 | 25 | ## Setup 26 | 27 | ```bash 28 | ``` 29 | 30 | ## Author 31 | 32 | [Taichi Nakashima](https://github.com/tcnksm) 33 | -------------------------------------------------------------------------------- /config/gitconfig: -------------------------------------------------------------------------------- 1 | [include] 2 | path = ~/.gitconfig.local 3 | 4 | [user] 5 | name = tcnksm 6 | email = taichi@hey.com 7 | signingkey = 3AFAB3D6A776A83E 8 | 9 | [color] 10 | status = auto 11 | diff = auto 12 | branch = auto 13 | interactive = auto 14 | grep = auto 15 | 16 | [core] 17 | editor = /usr/bin/vi #/usr/local/bin/emacsclient -t --alternate-editor "/usr/local/bin/emacs -nw" 18 | excludesfile = ~/.gitignore_global 19 | 20 | [merge] 21 | ff = false 22 | 23 | [pull] 24 | rebase = true 25 | 26 | [push] 27 | default = simple 28 | 29 | [grep] 30 | lineNumber = true 31 | 32 | [alias] 33 | s = status 34 | au = !git add -u && git status 35 | ca = commit --amend 36 | cm = commit -S -m 37 | 38 | d = diff HEAD~ 39 | ds = diff --staged 40 | dm = diff master 41 | 42 | # http://blog.blindgaenger.net/advanced_git_aliases.html 43 | this = !git init && git add . && git commit -m \"Initial commit\" 44 | rr = !git ls-files -z --deleted | xargs -0 git rm 45 | 46 | [ghq] 47 | root = ~/src 48 | 49 | [remote "origin"] 50 | fetch = +refs/pull/*/head:refs/remotes/origin/pr/* 51 | [url "ssh://git@github.com"] 52 | insteadOf = https://github.com 53 | [commit] 54 | gpgsign = false 55 | [init] 56 | defaultBranch = main 57 | -------------------------------------------------------------------------------- /config/gitignore_global: -------------------------------------------------------------------------------- 1 | *.o 2 | \#*# 3 | *# 4 | .#* 5 | .*~ 6 | *~ 7 | .DS_Store 8 | 9 | *.xcodeproj/* 10 | !*.xcodeproj/project.pbxproj 11 | !**/*.xcodeproj/default.* 12 | 13 | *.xcworkspace/* 14 | !*.xcworkspace/contents.xcworkspacedata 15 | 16 | -------------------------------------------------------------------------------- /config/peco-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "Keymap": { 3 | "C-k": "peco.SelectPrevious", 4 | "C-j": "peco.SelectNext", 5 | "C-g": "peco.Cancel", 6 | "C-v": "peco.SelectNextPage" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /config/tmux.conf: -------------------------------------------------------------------------------- 1 | # ----------------------------------------- 2 | # General (Options) 3 | # ----------------------------------------- 4 | # Prefix key 5 | unbind C-b 6 | set-option -g prefix C-t 7 | 8 | # Reload tmux.conf 9 | bind u source-file ~/.tmux.conf \; display "Reloaded!" 10 | 11 | # Shell 12 | set-option -g default-shell /usr/local/bin/zsh 13 | 14 | # Color 15 | set-option -g default-terminal "screen-256color" 16 | set -g status-fg cyan 17 | set -g status-bg default 18 | setw -g window-status-current-fg white 19 | setw -g window-status-current-bg black 20 | 21 | # Status 22 | set -g status off 23 | 24 | # Mouse 25 | set -g mouse on 26 | 27 | # ----------------------------------------- 28 | # Window 29 | # ----------------------------------------- 30 | bind d detach 31 | 32 | bind n next-window 33 | bind p previous-window 34 | 35 | bind 2 split-window -v -c "#{pane_current_path}" # Vertical 36 | bind 3 split-window -h -c "#{pane_current_path}" # Horizontal 37 | 38 | # ----------------------------------------- 39 | # Pane 40 | # ----------------------------------------- 41 | bind k kill-pane 42 | 43 | # Move 44 | bind C-t last-pane 45 | bind -r C-p select-pane -U # Up 46 | bind -r C-n select-pane -D # Down 47 | bind -r C-b select-pane -L # Left 48 | bind -r C-f select-pane -R # Right 49 | 50 | # Re-size pane 51 | bind -r C-k resize-pane -U 6 # Up 52 | bind -r C-j resize-pane -D 6 # Down 53 | bind -r C-h resize-pane -L 6 # Left 54 | bind -r C-l resize-pane -R 6 # Right 55 | 56 | # Synchronize 57 | bind s set-window-option synchronize-panes on 58 | bind e set-window-option synchronize-panes off -------------------------------------------------------------------------------- /config/zsh/function/enter-list-files.zsh: -------------------------------------------------------------------------------- 1 | function _show-git-status() { 2 | if [ "$(git rev-parse --is-inside-work-tree 2> /dev/null)" = 'true' ]; then 3 | git status -sb 4 | echo 5 | fi 6 | return 0 7 | } 8 | 9 | function _ls-abbrev() { 10 | local cmd_ls='ls' 11 | local -a opt_ls 12 | opt_ls=('-CF' '--color=always') 13 | case "${OSTYPE}" in 14 | freebsd*|darwin*) 15 | if type gls > /dev/null 2>&1; then 16 | cmd_ls='gls' 17 | else 18 | # -G : Enable colorized output. 19 | opt_ls=('-aCFG') 20 | fi 21 | ;; 22 | esac 23 | 24 | local ls_result 25 | ls_result=$(CLICOLOR_FORCE=1 COLUMNS=$COLUMNS command $cmd_ls ${opt_ls[@]} | sed $'/^\e\[[0-9;]*m$/d') 26 | 27 | local ls_lines=$(echo "$ls_result" | wc -l | tr -d ' ') 28 | 29 | if [ $ls_lines -gt 5 ]; then 30 | echo "$ls_result" | head -n 3 31 | else 32 | echo "$ls_result" 33 | fi 34 | } 35 | 36 | function _enter-list-files() { 37 | if [ -n "$BUFFER" ]; then 38 | zle accept-line 39 | return 0 40 | fi 41 | 42 | _ls-abbrev 43 | echo 44 | 45 | _show-git-status 46 | 47 | zle reset-prompt 48 | return 0 49 | } 50 | 51 | zle -N enter-list-files _enter-list-files -------------------------------------------------------------------------------- /config/zsh/function/http-status.zsh: -------------------------------------------------------------------------------- 1 | alias "100"="echo 'Continue'" 2 | alias "101"="echo 'Switching Protocols'" 3 | alias "200"="echo 'OK'" 4 | alias "201"="echo 'Created'" 5 | alias "202"="echo 'Accepted'" 6 | alias "203"="echo 'Non-Authoritative Information'" 7 | alias "204"="echo 'No Content'" 8 | alias "205"="echo 'Reset Content'" 9 | alias "206"="echo 'Partial Content'" 10 | alias "300"="echo 'Multiple Choices'" 11 | alias "301"="echo 'Moved Permanently'" 12 | alias "302"="echo 'Found'" 13 | alias "303"="echo 'See Other'" 14 | alias "304"="echo 'Not Modified'" 15 | alias "305"="echo 'Use Proxy'" 16 | alias "307"="echo 'Temporary Redirect'" 17 | alias "400"="echo 'Bad Request'" 18 | alias "401"="echo 'Unauthorized'" 19 | alias "402"="echo 'Payment Required'" 20 | alias "403"="echo 'Forbidden'" 21 | alias "404"="echo 'Not Found'" 22 | alias "405"="echo 'Method Not Allowed'" 23 | alias "406"="echo 'Not Acceptable'" 24 | alias "407"="echo 'Proxy Authentication Required'" 25 | alias "408"="echo 'Request Timeout'" 26 | alias "409"="echo 'Conflict'" 27 | alias "410"="echo 'Gone'" 28 | alias "411"="echo 'Length Required'" 29 | alias "412"="echo 'Precondition Failed'" 30 | alias "413"="echo 'Payload Too Large'" 31 | alias "414"="echo 'URI Too Long'" 32 | alias "415"="echo 'Unsupported Media Type'" 33 | alias "416"="echo 'Range Not Satisfiable'" 34 | alias "417"="echo 'Expectation Failed'" 35 | alias "426"="echo 'Upgrade Required'" 36 | alias "500"="echo 'Internal Server Error'" 37 | alias "501"="echo 'Not Implemented'" 38 | alias "502"="echo 'Bad Gateway'" 39 | alias "503"="echo 'Service Unavailable'" 40 | alias "504"="echo 'Gateway Timeout'" 41 | alias "505"="echo 'HTTP Version Not Supported'" -------------------------------------------------------------------------------- /config/zsh/function/peco-cdr-change-directory.zsh: -------------------------------------------------------------------------------- 1 | autoload -U chpwd_recent_dirs cdr 2 | function _peco-cdr-change-directory () { 3 | local selected_dir=$(cdr -l | awk '{ print $2 }' | peco) 4 | if [ -n "$selected_dir" ]; then 5 | BUFFER="cd ${selected_dir}" 6 | zle accept-line 7 | fi 8 | zle clear-screen 9 | } 10 | zle -N peco-cdr-change-directory _peco-cdr-change-directory 11 | -------------------------------------------------------------------------------- /config/zsh/function/peco-ghq-change-directory.zsh: -------------------------------------------------------------------------------- 1 | # Change directory to the repo where fetched by peco 2 | function _peco-ghq-change-directory() { 3 | local selected_dir=$(ghq list --full-path | peco --query "$LBUFFER") 4 | if [ -n "$selected_dir" ]; then 5 | BUFFER="cd ${selected_dir}" 6 | zle accept-line 7 | fi 8 | zle clear-screen 9 | } 10 | zle -N peco-ghq-change-directory _peco-ghq-change-directory 11 | 12 | -------------------------------------------------------------------------------- /config/zsh/function/peco-git-checkout-branch.zsh: -------------------------------------------------------------------------------- 1 | function _peco-git-checkout-branch () { 2 | local selected_branch_name="$(git branch -a | peco | tr -d ' ')" 3 | case "$selected_branch_name" in 4 | *-\>* ) 5 | selected_branch_name="$(echo ${selected_branch_name} | perl -ne 's/^.*->(.*?)\/(.*)$/\2/;print')";; 6 | remotes* ) 7 | selected_branch_name="$(echo ${selected_branch_name} | perl -ne 's/^.*?remotes\/(.*?)\/(.*)$/\2/;print')";; 8 | esac 9 | if [ -n "$selected_branch_name" ]; then 10 | BUFFER="git checkout ${selected_branch_name}" 11 | zle accept-line 12 | fi 13 | zle clear-screen 14 | } 15 | zle -N peco-git-checkout-branch _peco-git-checkout-branch 16 | -------------------------------------------------------------------------------- /config/zsh/function/peco-k8s-change-context.zsh: -------------------------------------------------------------------------------- 1 | function _peco-k8s-change-context() { 2 | local selected_ctx=$(kubectx | peco --query "$LBUFFER") 3 | if [ -n "$selected_ctx" ]; then 4 | BUFFER="kubectx ${selected_ctx}" 5 | zle accept-line 6 | fi 7 | zle clear-screen 8 | } 9 | zle -N peco-k8s-change-context _peco-k8s-change-context 10 | -------------------------------------------------------------------------------- /config/zsh/function/peco-k8s-change-namespace.zsh: -------------------------------------------------------------------------------- 1 | function _peco-k8s-change-namespace() { 2 | local selected_ctx=$(kubens | peco --query "$LBUFFER") 3 | if [ -n "$selected_ctx" ]; then 4 | BUFFER="kubens ${selected_ctx}" 5 | zle accept-line 6 | fi 7 | zle clear-screen 8 | } 9 | zle -N peco-k8s-change-namespace _peco-k8s-change-namespace 10 | -------------------------------------------------------------------------------- /config/zsh/function/peco-k8s-describe-pod.zsh: -------------------------------------------------------------------------------- 1 | function _peco-k8s-describe-pod { 2 | local selected=$(kubectl get pods | peco --query "$LBUFFER" | cut -d ' ' -f 1) 3 | if [ -n "$selected" ]; then 4 | print -s "kubectl describe pod ${selected}" 5 | kubectl describe pod ${selected} 6 | fi 7 | } -------------------------------------------------------------------------------- /config/zsh/function/peco-k8s-stern.zsh: -------------------------------------------------------------------------------- 1 | function _peco-k8s-stern { 2 | local selected=$(kubectl get deployments,daemonsets,statefulset --no-headers | cut -d ' ' -f 1 | peco --query "$LBUFFER" | cut -d '/' -f 2) 3 | if [ -n "$selected" ]; then 4 | print -s "stern ${selected}" # resiter history 5 | stern ${selected} 6 | fi 7 | } -------------------------------------------------------------------------------- /config/zsh/function/peco-k8s-view-pod-logs.zsh: -------------------------------------------------------------------------------- 1 | function _peco-k8s-view-pod-logs { 2 | local selected=$(kubectl get pods | peco --query "$LBUFFER" | cut -d ' ' -f 1) 3 | if [ -n "$selected" ]; then 4 | print -s "kubectl logs -f ${selected}" 5 | kubectl logs -f ${selected} 6 | fi 7 | } -------------------------------------------------------------------------------- /config/zsh/function/peco-select-command-history.zsh: -------------------------------------------------------------------------------- 1 | function _peco-select-command-history() { 2 | local tac 3 | if which tac > /dev/null; then 4 | tac="tac" 5 | else 6 | tac="tail -r" 7 | fi 8 | BUFFER=$(history -n 1 | \ 9 | grep -v "ls" | \ 10 | eval $tac | \ 11 | peco --query "$LBUFFER") 12 | CURSOR=$#BUFFER 13 | zle clear-screen 14 | } 15 | zle -N peco-select-command-history _peco-select-command-history 16 | -------------------------------------------------------------------------------- /config/zshrc: -------------------------------------------------------------------------------- 1 | # ------------------------------------ 2 | # General 3 | # ------------------------------------ 4 | eval "$(/opt/homebrew/bin/brew shellenv)" 5 | fpath=(/usr/local/share/zsh/functions ${fpath}) 6 | for f (~/src/github.com/tcnksm/dotfiles/config/zsh/function/*.zsh) source "${f}" 7 | 8 | # ------------------------------------ 9 | # Bind key 10 | # ------------------------------------ 11 | bindkey -e 12 | 13 | bindkey '^r' peco-select-command-history 14 | bindkey '^j' peco-ghq-change-directory 15 | bindkey '^h' peco-cdr-change-directory 16 | bindkey '^b' peco-git-checkout-branch 17 | bindkey '^x' peco-k8s-change-context 18 | bindkey '^]' peco-k8s-change-namespace 19 | 20 | # ------------------------------------ 21 | # Completion 22 | # ------------------------------------ 23 | autoload -U compinit && compinit 24 | 25 | setopt AUTO_LIST 26 | setopt LIST_PACKED 27 | 28 | zstyle ':completion:*' verbose yes 29 | zstyle ':completion:*:descriptions' format '%B%d%b' 30 | zstyle ':completion:*:default' menu select=1 31 | 32 | # ------------------------------------ 33 | # History 34 | # ------------------------------------ 35 | HISTFILE=~/.zsh_history 36 | HISTSIZE=100000 37 | SAVEHIST=100000 38 | 39 | setopt HIST_IGNORE_DUPS 40 | setopt SHARE_HISTORY 41 | 42 | # Historical backward/forward search 43 | # with linehead string binded to ^P/^N 44 | autoload history-search-end 45 | zle -N history-beginning-search-backward-end history-search-end 46 | zle -N history-beginning-search-forward-end history-search-end 47 | bindkey "^P" history-beginning-search-backward-end 48 | bindkey "^N" history-beginning-search-forward-end 49 | 50 | # ------------------------------------ 51 | # Hooks 52 | # ------------------------------------ 53 | chpwd() { 54 | _ls-abbrev 55 | _show-git-status 56 | } 57 | 58 | # ------------------------------------ 59 | # Prompt 60 | # ------------------------------------ 61 | setopt PROMPT_SUBST 62 | setopt PROMPT_PERCENT 63 | setopt TRANSIENT_RPROMPT 64 | 65 | autoload -Uz vcs_info 66 | zstyle ':vcs_info:*' formats '[%b]' 67 | zstyle ':vcs_info:*' actionformats '[%b|%a]' 68 | precmd () { vcs_info } 69 | 70 | RPROMPT='%~ %F{yello}${vcs_info_msg_0_}%f' 71 | PROMPT='> ' 72 | 73 | # ------------------------------------ 74 | # Options 75 | # ------------------------------------ 76 | 77 | # Changing Directories 78 | setopt AUTO_CD 79 | setopt AUTO_PUSHD 80 | 81 | # Input/Output 82 | setopt CORRECT 83 | setopt INTERACTIVE_COMMENTS 84 | 85 | # ------------------------------------ 86 | # Environmental variables 87 | # ------------------------------------ 88 | export PATH=$HOME/bin:$PATH 89 | export PATH=~/.cask/bin:$PATH 90 | 91 | export EDITOR='/opt/homebrew/bin/code -r' 92 | export GOPATH=${HOME} 93 | 94 | # source $HOME/.cargo/env 95 | 96 | # ------------------------------------ 97 | # Alias 98 | # ------------------------------------ 99 | alias ls="ls -G" 100 | alias rm='trash' 101 | alias sss='source ~/.zshrc' 102 | 103 | # Git 104 | alias git=hub 105 | alias gs='git status' 106 | alias gmm='git checkout master' 107 | alias gm='git checkout main' 108 | alias au='git add -u; git status' 109 | alias o='git-open' 110 | alias tt='tig' 111 | alias gpc="gh pr create" 112 | 113 | # Kubernetes 114 | alias kg="kubectl get" 115 | alias kd="kubectl describe" 116 | 117 | # Cursor / VSCode 118 | alias v='/opt/homebrew/bin/cursor -r' 119 | alias e='/opt/homebrew/bin/cursor -r' 120 | alias vi='/opt/homebrew/bin/code-insiders -r' 121 | 122 | # Cursor 123 | alias c='/opt/homebrew/bin/cursor -r' 124 | 125 | # Tmux 126 | alias tmux='tmux -2 -f ~/.tmux.conf' 127 | 128 | # ------------------------------------ 129 | # Settings 130 | # ------------------------------------ 131 | export GPG_TTY=$(tty) 132 | eval "$(direnv hook zsh)" 133 | source <(stern --completion=zsh) 134 | 135 | # https://github.com/github/gh-copilot 136 | eval "$(gh copilot alias -- zsh)" 137 | -------------------------------------------------------------------------------- /script/install-config.sh: -------------------------------------------------------------------------------- 1 | DIR=$(cd $(dirname ${0})/.. && pwd)/config/ 2 | 3 | CONFIGS=( 4 | zshrc 5 | gitconfig 6 | gitignore_global 7 | tmux.conf 8 | ) 9 | 10 | for CONFIG in ${CONFIGS[@]} 11 | do 12 | if [ ! -f ${HOME}/.${CONFIG} ]; then 13 | echo "[INFO] Place ${HOME}/.${CONFIG}" 14 | ln -sf ${DIR}/${CONFIG} ${HOME}/.${CONFIG} 15 | fi 16 | done 17 | 18 | if [ ! -f ${HOME}/.config/peco/config.json ]; then 19 | echo "[INFO] Place ${HOME}/.config/peco/config.json" 20 | mkdir -p $HOME/.config/peco 21 | ln -sf ${DIR}/peco-config.json ${HOME}/.config/peco/config.json 22 | fi 23 | -------------------------------------------------------------------------------- /script/install-else.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "[INFO] Install git-open" 4 | curl -o ~/bin/git-open https://raw.githubusercontent.com/paulirish/git-open/master/git-open 5 | chmod a+x ~/bin/git-open 6 | -------------------------------------------------------------------------------- /script/install-go.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | PKGS=( 6 | # General 7 | github.com/x-motemen/ghq@latest 8 | 9 | # Go development 10 | # github.com/davidrjenni/reftools/cmd/fillstruct 11 | # github.com/mdempsky/gocode 12 | # golang.org/x/tools/gopls 13 | # golang.org/x/tools/cmd/goimports 14 | # golang.org/x/tools/cmd/gorename 15 | # golang.org/x/tools/cmd/benchcmp 16 | # golang.org/x/tools/cmd/present 17 | # golang.org/x/tools/cmd/guru 18 | ) 19 | 20 | for pkg in ${PKGS[@]} 21 | do 22 | go install -v $pkg 23 | done 24 | -------------------------------------------------------------------------------- /script/install-homebrew.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Help function to display usage 4 | show_help() { 5 | echo "Usage: $(basename "$0") [OPTION]" 6 | echo "Install Homebrew packages and casks." 7 | echo 8 | echo "Options:" 9 | echo " --help Display this help message" 10 | echo " --cask Only install Cask packages" 11 | echo " --formula Only install Formula packages" 12 | echo 13 | echo "Without options, both formulas and casks will be installed." 14 | } 15 | 16 | # Parse command line arguments 17 | INSTALL_FORMULAS=true 18 | INSTALL_CASKS=true 19 | 20 | # Check for help argument first 21 | if [[ "$1" == "--help" ]]; then 22 | show_help 23 | exit 0 24 | fi 25 | 26 | # If --cask is specified, only install casks 27 | if [[ "$1" == "--cask" ]]; then 28 | INSTALL_FORMULAS=false 29 | INSTALL_CASKS=true 30 | fi 31 | 32 | # If --formula is specified, only install formulas 33 | if [[ "$1" == "--formula" ]]; then 34 | INSTALL_FORMULAS=true 35 | INSTALL_CASKS=false 36 | fi 37 | 38 | # Check for Homebrew installation and if not exist install 39 | if test ! $(which brew); then 40 | echo "[INFO] Installing homebrew..." 41 | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" 42 | fi 43 | 44 | printf "Update recipes? [Y/n]: " && read ANS 45 | if [ "${ANS}" = "Y" ]; then 46 | brew update 47 | fi 48 | 49 | printf "Upgrade? [Y/n]: " && read ANS 50 | if [ "${ANS}" = "Y" ]; then 51 | brew upgrade 52 | fi 53 | 54 | if [ "$INSTALL_FORMULAS" = true ]; then 55 | # https://formulae.brew.sh/formula/ 56 | echo "[INFO] Installing fomulas" 57 | formula=( 58 | coreutils 59 | findutils 60 | proctools 61 | gnupg 62 | grep 63 | curl 64 | wget 65 | tree 66 | zsh 67 | bash 68 | tmux 69 | git 70 | hub 71 | tig 72 | emacs 73 | cask 74 | go 75 | node 76 | imagemagick 77 | trash 78 | ag 79 | jq 80 | direnv 81 | peco 82 | terraform 83 | kubectx 84 | kube-ps1 85 | stern 86 | gh 87 | aquaproj/aqua/aqua 88 | llm 89 | uv 90 | ) 91 | brew install ${formula[@]} && brew cleanup 92 | fi 93 | 94 | if [ "$INSTALL_CASKS" = true ]; then 95 | # https://github.com/Homebrew/homebrew-cask 96 | echo "[INFO] Installing casks" 97 | casks=( 98 | google-cloud-sdk 99 | docker 100 | 101 | # Login with GitHub 102 | visual-studio-code 103 | visual-studio-code@insiders 104 | 105 | # Login with GitHub 106 | cursor 107 | 108 | # Login with GitHub 109 | claude 110 | 111 | # Login with GitHub 112 | raycast 113 | iterm2 114 | 115 | # Login with GitHub 116 | warp 117 | # Login with Google 118 | notion 119 | # Login with Google 120 | grammarly-desktop 121 | # Login with API Token (in mail) 122 | cleanshot 123 | # Login with Google and mail 124 | slack 125 | # Login with Google 126 | tailscale 127 | # Login with Google 128 | sunsama 129 | 130 | # Login with Google 131 | arc 132 | ) 133 | 134 | brew install --cask ${casks[@]} && brew cleanup 135 | fi --------------------------------------------------------------------------------