{
  "markdown": "# dotfiles\n\n<div align=\"center\">\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg?style=for-the-badge)](LICENSE)\n[![Platform: macOS | Linux](https://img.shields.io/badge/Platform-macOS%20%7C%20Linux-lightgrey.svg?style=for-the-badge)](https://github.com/ruchernchong/dotfiles)\n[![Shell: Zsh](https://img.shields.io/badge/Shell-Zsh-89E051.svg?style=for-the-badge)](https://www.zsh.org/)\n[![Homebrew](https://img.shields.io/badge/Homebrew-2.0+-orange.svg?style=for-the-badge)](https://brew.sh/)\n[![Docker](https://img.shields.io/badge/Docker-Testing-2496ED.svg?style=for-the-badge&logo=docker&logoColor=white)](https://www.docker.com/)\n\n</div>\n\nThis repository contains dotfiles and scripts that I use to customise my macOS/Linux development workflow. Feel free to use this as a reference for your own setup.\n\n![Terminal](terminal.png)\n\n## Table of Contents\n\n- [Overview](#overview)\n- [Features](#features)\n- [Installation](#installation)\n  - [One-line Installation](#one-line-installation)\n  - [Manual Installation](#manual-installation)\n- [System Requirements](#system-requirements)\n- [Architecture](#architecture)\n- [Key Components](#key-components)\n- [Development Environment](#development-environment)\n- [Common Commands](#common-commands)\n- [Configurations](#configurations)\n- [Feedback](#feedback)\n- [Licence](#licence)\n\n## Overview\n\nThis is a personal dotfiles repository for macOS/Linux development environment setup. The repository contains shell configurations, aliases, automated setup scripts, and Homebrew package management for a consistent development environment across machines.\n\n## Features\n\n- **Automated Setup**: Complete development environment setup with a single command\n- **Interactive Installation**: Customisable setup with profile selection and dry-run mode\n- **Shell Configuration**: Oh-My-Zsh with Starship prompt and syntax highlighting\n- **Package Management**: Homebrew Brewfile for consistent package installation with profile support (minimal/developer/full)\n- **Git Integration**: Comprehensive git aliases and configuration\n- **Node.js Management**: `fnm` for Node.js version management\n- **Development Tools**: VSCode, cloud tools, databases, and utilities\n- **Touch ID for Sudo**: Enable Touch ID authentication for sudo commands (macOS only)\n- **Scheduled Maintenance**: Automated Homebrew and pnpm maintenance via crontab\n- **Docker Testing**: Test setup scripts in isolated environment\n- **Cross-platform**: Support for macOS and Linux\n\n## System Requirements\n\n### Supported Platforms\n\n- macOS (10.15+)\n- Linux (Ubuntu 20.04+, Fedora 33+)\n\n### Prerequisites\n\n- Zsh\n- Git\n- curl\n\n## Architecture\n\n- **Library Functions** (`lib/`): Shared utility libraries for platform detection, interactive prompts, backup management, and profile selection\n- **Shell Scripts** (`shell/`): Modular setup scripts for different components (aliases, zsh, vim, Claude Code, crontab, Touch ID for sudo)\n- **Setup Scripts** (`setup/`): Core installation scripts (Homebrew installation)\n- **Configuration Files** (`config/`): Symlinked dotfiles (`.zshrc`, `.aliases`, `.vimrc`) and settings (`.claude/settings.json`, `crontab`)\n- **Scripts** (`scripts/`): Utility scripts (Node.js symlink management)\n- **Testing**: Docker-based testing infrastructure (`test-setup.sh`, `docker-compose.yml`, `Dockerfile`, `TESTING.md`)\n- **Brewfile**: Homebrew package manifest with profile support (minimal, developer, full)\n\n## Key Components\n\n### Automated Setup Process\nThe `setup.sh` script provides both interactive and automated setup:\n\n**Interactive mode** (default):\n- Dry-run mode with `--dry-run` flag to preview changes\n- Profile selection: minimal (~15 packages), developer (~40-50 packages), or full (~120 packages)\n- Backup handling for existing dotfiles\n- Crontab configuration for scheduled maintenance\n- Node.js version manager selection (fnm/nvm/both)\n- Python version selection (full profile only)\n- Database installation options (developer/full profiles)\n\n**Non-interactive mode** (`--no-interactive`):\n- Uses default settings (full profile)\n- Specify profile via `--profile=minimal|developer|full`\n\n**Installation sequence**:\n1. Collects user preferences (interactive mode only)\n2. Makes all `.sh` scripts executable\n3. Runs scripts in `setup/` directory (Homebrew installation)\n4. Runs scripts in `shell/` directory (dotfile symlinking, crontab configuration)\n5. Installs Homebrew packages via `brew bundle install` (using selected profile)\n\n### Shell Configuration System\n- **Zsh**: Oh-My-Zsh with syntax highlighting plugin\n- **Theme**: Starship prompt\n- **Node**: Uses `fnm` for Node.js version management\n- **Environment**: Configured for development with PostgreSQL, Python, Android SDK\n\n## Development Environment\n\n### Key Tools Included\n- **Development**: git, gh, nvm, pnpm, yarn, bun\n- **Cloud**: vercel-cli, aws-sam-cli, pulumi, doctl\n- **Databases**: postgresql@17, redis\n- **Utilities**: jq, ripgrep, httpie, direnv\n- **VSCode**: With comprehensive extension set\n\n### Environment Variables\n- `NEXT_TELEMETRY_DISABLED=1`: Disables Next.js telemetry\n- `PNPM_HOME`: pnpm global package directory\n- PostgreSQL and Android SDK paths configured\n\n## Common Commands\n\n### Package Management\n```bash\n# Install all Homebrew packages\nbrew bundle install\n\n# Update Brewfile\nbrew bundle dump --force\n```\n\n### Shell Configuration\n```bash\n# Reload zsh configuration\nzshreload  # alias for 'source $HOME/.zshrc'\n\n# Edit zsh configuration\nzshconfig  # alias for 'vi $HOME/.zshrc'\n```\n\n### Scheduled Tasks (Crontab)\n```bash\n# View current cron jobs\ncrontab -l\n\n# Apply dotfiles crontab configuration\ncrontab $HOME/dotfiles/config/crontab\n\n# View maintenance logs\ntail -f /tmp/brew-weekly.log     # Weekly Homebrew updates (Sunday 2 AM)\ntail -f /tmp/brew-cleanup.log    # Monthly cleanup (1st of month, 3:30 AM)\ntail -f /tmp/brew-health.log     # Quarterly health checks (Jan/Apr/Jul/Oct, 4 AM)\ntail -f /tmp/pnpm-cleanup.log    # Weekly pnpm store pruning (Monday 3 AM)\n```\n\n### Testing\n```bash\n# Test setup script with Docker (dry-run mode)\n./test-setup.sh\n\n# Test specific profile\n./test-setup.sh minimal\n./test-setup.sh developer\n./test-setup.sh full\n\n# Test all scenarios\n./test-setup.sh all\n\n# Interactive debugging\n./test-setup.sh shell\n\n# Clean up test containers\n./test-setup.sh clean\n```\n\nFor more details, see [TESTING.md](TESTING.md)\n\n### Touch ID for Sudo (macOS only)\n```bash\n# Setup Touch ID for sudo commands\nsudo zsh shell/sudo-touch-id/setup.sh\n\n# Verify Touch ID configuration\nzsh shell/sudo-touch-id/verify.sh\n\n# Restore original PAM configuration\nsudo zsh shell/sudo-touch-id/restore.sh\n```\n\n## Configurations\n\n### Zsh Customisations\n\n- **Oh-My-Zsh**: Custom configuration with Starship theme\n- **Key plugins**:\n  - zsh-autosuggestions\n  - zsh-syntax-highlighting\n  - git\n  - docker\n\n### Claude Code Settings\n\nUser-level Claude Code settings are backed up and version-controlled:\n\n- **Location**: `config/.claude/settings.json`\n- **Symlinked to**: `~/.claude/settings.json`\n- **Setup**: Automatically configured during `setup.sh` execution\n- **Manual restore**: Run `source $HOME/dotfiles/shell/claude.sh` to restore the symlink\n\n### Touch ID for Sudo (macOS only)\n\nEnable Touch ID authentication for sudo commands:\n\n- **Setup**: Modifies PAM configuration to enable Touch ID\n- **Security**: Uses `/etc/pam.d/sudo_local` (survives macOS updates)\n- **Requirements**: macOS 10.15 (Catalina) or later\n- **Features**:\n  - Interactive warning before making system changes\n  - Verification script to test configuration\n  - Restore script to revert to original configuration\n  - Version checks to ensure compatibility\n\n### Git Aliases (Extensive Collection)\n\n- `g` → `git`\n- `gs` → `git status`\n- `gcm` → `git checkout main`\n- `glog` → formatted git log with graph\n- `gp` → `git pull`\n- `gps` → `git push`\n- Full list available in `.aliases` file\n\n## Installation\n\n**Warning:** Do not blindly use these settings as they may override or modify your existing configuration. It is highly recommended to clone/fork this repository to another folder. Use at your own risk!\n\n### Interactive Installation (Recommended)\n\nThe interactive setup guides you through customising your installation:\n\n```bash\n# Clone the repository\ngit clone https://github.com/ruchernchong/dotfiles.git $HOME/dotfiles\ncd $HOME/dotfiles\n\n# Preview what would be installed (dry-run mode)\n./setup.sh --dry-run\n\n# Run the interactive setup\n./setup.sh\n```\n\nThe interactive setup allows you to:\n- Choose installation profile (minimal/developer/full)\n  - **minimal**: Essential tools only (~15 packages)\n  - **developer**: Development environment (~40-50 packages)\n  - **full**: Complete installation (~120 packages)\n- Select Node.js version manager (fnm/nvm/both)\n- Choose Python version (3.13/3.12/3.11/all) - full profile only\n- Configure backup options for existing files\n- Customise database installations (PostgreSQL, Redis) - developer/full profiles\n- Configure scheduled maintenance tasks (crontab)\n- Preview changes before applying\n\n### One-line Installation\n\n```bash\ncurl -L https://raw.githubusercontent.com/ruchernchong/dotfiles/master/install.sh | bash\n```\n\n### Manual Installation\n\n```bash\n# Clone and setup\ngit clone https://github.com/ruchernchong/dotfiles.git $HOME/dotfiles\ncd $HOME/dotfiles\nchmod a+x setup.sh\nsource setup.sh\n```\n\n## Feedback\n\nI welcome any feedback or suggestions by creating an [issue](https://github.com/ruchernchong/dotfiles/issues) or a [pull request](https://github.com/ruchernchong/dotfiles/pulls).\n\n## Licence\n\nThis code is available under the [MIT Licence](LICENSE)\n",
  "bytes": 9621,
  "sha": "d0c6a59ca00c983f9d87f5a949f804b0abe7aa0e71b33c29ad11c0e188178f72",
  "repo_slug": "ruchernchong/dotfiles",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/skl_ruchernchong_dotfiles_claude_skills_brew_baf3856f/readme"
}