This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is a showcase/reference implementation for Serotonin. The standalone Serotonin tool lives in a separate repo. This repo demonstrates a production terminal setup built with Serotonin + Chezmoi.
A production-ready dotfiles repository providing a modern, performance-optimized shell environment. Managed with Chezmoi for configuration templating and Sheldon for plugin management. Supports macOS and Linux (Ubuntu/Debian).
Key technologies: Zsh, Chezmoi, Sheldon (Rust-based plugin manager), Starship (prompt), Homebrew/apt, mise (multi-language version manager)
curl -sL dotfiles.download/serotonin | sh# Full install (interactive, prompts for user details)
source <(curl -sL dotfiles.download/install)
# Local install after cloning
bash scripts/dotfiles/executable_install-common.shdotfiles update # Quick update via Serotonin (brew + sheldon + system)
dotfiles doctor # Diagnose environment health
dotfiles-mise-update # Update mise tool versions
chezmoi apply # Apply template changes
sheldon lock --update # Update zsh plugins manuallyLegacy dotfiles-update / dotfiles-help still work as wrappers.
# ShellCheck is used for linting (runs in CI)
shellcheck -x scripts/**/*.sh scripts/**/*.zshExcluded ShellCheck codes: SC1036, SC1056, SC1070, SC1072, SC1073, SC1083, SC2034, SC2139, SC2148, SC1090, SC1117, SC2206, SC1009, SC2016, SC2046, SC2154
Chezmoi Templates (dot_*.tmpl)
→ User data from ~/.config/chezmoi/chezmoi.toml
→ Applied to home directory (~/.*)
The main ~/.zshrc sources modules in this order:
functions.zsh- Utility functionsoptions.zsh- Zsh optionshistory.zsh- History configurationcolors.zsh- Color schemesprompt.zsh- Prompt init (Warp native / Starship fallback)plugins.zsh- Sheldon plugin loading (uses zsh-defer for performance)alias.zsh- Shell aliasescompletions.zsh- Completion setupkeybindings.zsh- Key bindings
scripts/dotfiles/- Core install/update scriptsscripts/bin/- Utility binariesscripts/git/- Git helper scriptsscripts/domain-check/- Domain monitoring tools
Available in .tmpl files via Chezmoi (configured in .chezmoi.toml.tmpl):
{{ .fname }},{{ .lname }},{{ .name }}- User identity{{ .email }},{{ .email2 }}- Email addresses{{ .gpgsign }},{{ .signkey_id }}- GPG configuration{{ .github_login }},{{ .github_token }}- GitHub integration
- Use
executable_prefix for scripts that should be in PATH - Include header with project info, author, version
- Use
set -euo pipefailfor safety - Helper functions available:
exists,fun-exists,log,confirm
Follow conventional commit format: feat|fix|chore|refactor|docs(scope): message
Plugins are managed via Sheldon (dot_config/sheldon/plugins.toml.tmpl). Uses zsh-defer template for lazy loading. Update plugins with sheldon lock --update.
Machine-specific secrets and environment variables go in ~/.config/local-shell/env.zsh (not tracked by chezmoi).
GitHub Actions runs on both macOS and Ubuntu:
- ShellCheck linting on all shell scripts
- CodeQL security scanning