Welcome to CodeRabbit optimized development environment that is well integrated with our stack.
We use chezmoi to manage CodeRabbit dotfiles in your home directory.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/coderabbitai/dotfiles/master/sw/assets/executable_install.sh)"
cd $HOME
chezmoi init [email protected]:coderabbitai/dotfiles.git
# show diff of changes that will be made
chezmoi diff
# If you are happy with the changes, apply away!
chezmoi apply -v
Please close and reopen the terminal to trigger first time install/updates.
Recommend using GitHub CLI for authenticating with GitHub. Run
gh auth login. Alternatively, add
SSH key to your GitHub account.
Provide username and email address by creating .gitconfig_local e.g.
[user]
name = Harjot Gill
email = [email protected]
[github]
user = <github user name>
token = <personal access token>
You can generate
personal access token
for GitHub to use HTTP API. Also, it's useful to add this token to your
$HOME/.netrc file. Run -
echo 'machine api.github.com login <user> password <token>' >> $HOME/.netrc
To clone CodeRabbit, run: gh_clone_all.sh coderabbitai $HOME/work. This step
is performed automatically on installation.
To update all repos in a directory, run: pull_all.sh $HOME/work/coderabbitai.
This step is performed automatically on auto-updates.
- Nerd fonts: Please enable a nerd font such as
Hack Nerd Fontin your terminal profile to see icons properly when usingnvimin terminal mode. - Terminal colors: See the section about colors.
Homebrew is the default package manager for this environment. You can provide
private packages by adding them to: $HOME/.brew_local
This environment is set to autoupdate every 7 days by default. You can trigger
autoupdates manually by calling autoupdate.zsh --force You can provide custom
autoupdate commands by adding them to: $HOME/.autoupdate_local.zsh
You can provide additional zshrc settings by adding them to:
$HOME/.zshrc_local
- Fuzzy menus: Fuzzy menus are available for command completion (press
TAB) menus and command history (press^r). - Vi mode: Press
ESCto enter ViNORMALmode. Cool tip - while in normal mode, pressvvto switch to visual mode (it will opennvimeditor) and in that mode you can use GitHub Copilot to build sophisticated commands using AI! - Prompt flags: Type
yazpt_explain_gitto understand the meaning of various flags in the prompt. - Forgit: You can use
forgitas an interactive frontend for various git commands. E.g. trygit forgit log. - iTerm2 integration: On macOS, please install iTerm2 shell integration to use nice features such as navigating marks in prompt.
tmux sessions are automatically started as part of .zshrc execution. You
will be shown an option to join an existing detached session if they exist,
otherwise a new session will be created and attached to.
- Prefix:
C-aorC-b - Fuzzy menu: Press
C-a C-Spaceto access fuzzy menu for quick tmux management and shortcuts to various commands. - tmux menu: Press
F12to access tmux session/window/pane management menu. - Nested tmux sessions (e.g. remote ssh): Press
F1to suspend/unsuspend local tmux. - Smug: Define and orchestrate tmux sessions with smug. e.g. use smug to start/stop local dev Kubernetes cluster and so on.
- Fuzzy search tmux terminal buffer: Press
C-a C-/ - Vi bindings are enabled in tmux copy mode
- Facebook PathPicker: Press
C-a C-Pto select any line from scrollback buffer (e.g. git status) and use those in another command. - Urlview: Press
C-a C-Uto select any url in scrollback buffer and open in browser.
This environment is highly tuned towards providing a modern neovim/vim setup for development using modern languages such as Golang, Typescript etc.
You can provide additional vimrc settings by adding them to:
$HOME/.vimrc_local. You can also use FuzzyMenu (<space><space>) to tweak
and persist local settings. In addition, you can provide additional vim plugins
by adding them to $HOME/.vimrc_plugins.
Several colorschemes are bundled and gruvbox is chosen by default. You can
override colorscheme by providing let colorscheme = <colorscheme> in your
.vimrc_local file.
See .vimrc file for available colorschemes. Also see
~/.config/nvim/init.vim for Neovim specific settings.
- Landing page for new tabs contains several useful links that help with discoverability.
- Press
<space><space>(double space) orShift + LeftMouseclick to open a contextual FuzzyMenu for the word under cursor or selection.
- GitHub Copilot - Type
:Copilot setupin Neovim to set up. - CodeGPT - Just highlight the code and press
<space><space>to see CodeGPT options in the FuzzyMenu. You must provideOPENAI_API_KEYenvironment variable in your.zshrc_localto use this feature.
If you have LanguageTool Premium, you can provide LANGTOOL_HTTP_URI,
LANGTOOL_USERNAME and LANGTOOL_API_KEY environment variables to use the
language server in Neovim.
Unlike nvim which allows setting themes easily via .vimrc_local, color
themes for terminal interface are spread across multiple settings.
- Terminal theme -
- macOS: For iTerm2, the option will be provided to install bundled profile
that contains font/color settings. If you do not wish to install the
profile, then the colors will be set via terminal escape codes unless
SET_TERMINAL_COLORSis set tofalsein your.zshrc_local. - Linux: Colors will be set automatically using terminal escape codes unless
SET_TERMINAL_COLORSis set tofalsein your.zshrc_local. Alternatively, you can install default color profile using$HOME/sw/assets/install_gruvbox.sh. Make sure to setSET_TERMINAL_COLORStofalsein your.zshrc_localif you would like to use terminal's color profiles.
- macOS: For iTerm2, the option will be provided to install bundled profile
that contains font/color settings. If you do not wish to install the
profile, then the colors will be set via terminal escape codes unless
- tmux theme - See
.tmux.conf.settingsfor example configuration and override it in your personal.tmux.conf_localfile. The tmux theme configures the tmux status line and not the terminal itself. - bat theme (cat replacement) - Environment variable
BAT_THEMEsets the theme. Seebat --list-themesto get the list. You can override this theme in your.zshrc_localfile. Bat is used extensively for fzf previews, git pager (delta), less command filter and so on. - FZF colors - Get and source color schemes from
base16-fzf in your
$HOME/.zshrc_local. - LS_COLORS - We use vivid to set the
themes. Run
vivid themesto get the list. You can override this theme in your.zshrc_localfile. - Git pager - See
.gitconfig_themesto see the available themes. You can override them in your local.gitconfig_local. - Fast Syntax Highlighting (zsh) - You can run
fast-theme -lto get the list. To set the theme, first, overrideFAST_WORK_DIRenvironment variable in your.zshrcand point it to$HOME/.config/fsh_local. Next, runfast-theme <theme>to switch the theme.
Note: Currently all these settings are configured to match gruvbox-dark color
palette. But it's pretty easy to override them to match onedark or
Nord
Bonus:
- Slack Gruvbox - Paste this in your DM to Slackbot and click the
Switch sidebar themebutton.gruvbox dark #282828,#3c3836,#ebdbb2,#1d2021,#3e313c,#ebdbb2,#689d6a,#fb4934
You can use vcsh utility to version local files and sync them across machines.





