Skip to content

Repository files navigation

dotfiles

Personal dotfiles repository to consolidate settings and configurations across Linux, macOS, WSL, and Windows.

Contents

Path Purpose
git/ Git configuration, aliases, and VS Code tool integration
shell/ Bash/Zsh functions and initialization
ohmyposh/ Oh My Posh installation and custom prompt theme
copilot-statusline/ Oh My Posh-powered Copilot CLI statusline
winget/ WinGet bootstrap for Windows
.devcontainer/ Dev Container and Codespaces configuration
.copilot/ Copilot CLI MCP example and reusable skills
.squad/ Squad configuration, team state, and templates
docs/ Documentation index and reusable examples

Quick Start

Install Everything

Clone the repository, then run the installer for your platform:

Linux/macOS/WSL:

git clone https://github.com/cyrusjamula/dotfiles.git
cd dotfiles
./install.sh

Windows PowerShell:

git clone https://github.com/cyrusjamula/dotfiles.git
Set-Location dotfiles
.\install.ps1

Install Individual Modules

Each module can be installed independently:

# Git configuration
cd git && ./install.sh

# Shell functions
cd shell && ./install.sh

# Oh My Posh prompt
cd ohmyposh && ./install.sh

# Copilot CLI statusline
cd copilot-statusline && ./install.sh

# WinGet bootstrap (Windows PowerShell)
cd winget
.\install.ps1

The Bash WinGet installer is intentionally a no-op that prints Windows installation guidance.

Prerequisites

  • Git for version control configuration
  • Oh My Posh for the custom prompt theme and Copilot statusline
  • curl to install Oh My Posh on Linux/macOS/WSL
  • jq to merge Copilot CLI settings on Linux/macOS/WSL when ~/.copilot/settings.json already exists
  • VS Code (optional) for diff/merge tool integration and the workspace file
  • Git LFS (optional) for large file support
  • A Nerd Font for powerline glyphs and icons
  • WinGet (optional, Windows) for package management

Structure

Each configuration module is organized in its own directory with its configuration, installer, and README. Platform support varies by module:

Module Bash PowerShell Installation method
Git Symlink; PowerShell falls back to copying
Shell Adds or updates source lines in shell rc files
Oh My Posh Installs the tool and adds prompt initialization
Copilot statusline Copies renderer files and updates Copilot CLI settings
WinGet Guidance only Installs the App Installer bundle when needed

Bash installers use strict error handling where appropriate. Installers preserve existing configuration before replacing or updating it; see each module README for exact backup behavior.

Features

Git Configuration

Full Git setup including user settings, editor integration (VS Code), and workflow defaults like autoSetupRemote and LFS support.

Aliases:

Alias Command Alias Command
st status co checkout
br branch ci commit
ca commit -a cm commit -m
cam commit -am cp cherry-pick
df diff dc diff --cached
lg log --oneline --decorate --all --graph ls log --stat
pu push pl pull
rb rebase rs reset
sh stash sm submodule
unstage reset HEAD -- last log -1 HEAD
  • clearOldBranches — Switches to main, prunes origin, and force-deletes local branches whose upstream is gone

Shell Functions

Shell scripts are auto-loaded by shell/init.sh, which sources every .sh file in the shell/ directory on terminal startup (excluding install.sh). New functions are added by creating a new .sh file — no registration needed.

  • clearOldBranches — Git branch cleanup, available as a shell function (exported for subshells)
  • Oh My Posh initialization — Automatically configures the custom prompt if oh-my-posh is installed

Oh My Posh Theme

A custom two-line prompt theme with:

  • Left prompt: Username, directory, Git branch/status, exit code
  • Right prompt: Node.js, Go, Python indicators, shell name, current time
  • Tooltips: AWS and Azure context when relevant
  • SSH session awareness and a custom color palette

Copilot CLI Statusline

An Oh My Posh-powered statusline for GitHub Copilot CLI that displays:

  • Git branch and working tree status
  • Runtime/language versions (Node.js, Go, Python)
  • Context token usage with visual gauge
  • Session duration
  • Line changes (+added/-removed)

The installer backs up existing Copilot CLI settings, preserves unrelated settings, and enables the experimental STATUS_LINE feature.

Based on Scott Hanselman's gist.

VS Code Integration

Open dotfiles.code-workspace in VS Code for:

  • Automatic shell configuration loading via BASH_ENV
  • Integrated terminal with all dotfiles functions pre-loaded
  • Build task to reload dotfiles (Load Dotfiles)
  • GitHub Copilot workspace settings and MCP server configuration (.mcp.json and .vscode/mcp.json)
  • GitHub Issues queries pre-configured

Dev Container / Codespaces

The .devcontainer/devcontainer.json enables:

  • Ubuntu 24.04 base image with Git, GitHub CLI, Node.js, and PowerShell (pwsh) pre-installed
  • 240-minute idle timeout for Codespaces (vs. the 30-minute default)
  • GitHub Copilot CLI (@github/copilot) and Squad CLI (@bradygaster/squad-cli) installed globally via postCreateCommand
  • Automatic dotfiles installation via postCreateCommand

Open this repo in a Codespace or VS Code Dev Container and everything is configured automatically.

Copilot and Squad Automation

The repository includes shared automation configuration:

  • .mcp.json and .vscode/mcp.json configure MCP servers for compatible clients.
  • .copilot/mcp-config.json is an example Copilot CLI MCP configuration that reads GITHUB_TOKEN from the environment.
  • .copilot/skills/ contains reusable Copilot skills.
  • .squad/ contains Squad team configuration, routing, templates, and local coordination state.
  • scripts/ralph-triage.js forwards to Squad's Ralph triage utility.

Review MCP commands before running them and provide credentials only through environment variables or password inputs; do not write tokens into committed configuration.

Platform Support

Platform Status Method
Linux ✅ Supported Symbolic links
macOS ✅ Supported Symbolic links
Windows WSL ✅ Supported Symbolic links
Windows PowerShell ✅ Supported Symbolic links (admin/Developer Mode) or file copy fallback
GitHub Codespaces ✅ Supported Dev container with auto-install

Adding a New Module

  1. Create a directory at the repo root (e.g., vim/)
  2. Add install.sh and install.ps1 following the backup → symlink/copy pattern
  3. Add a README.md describing the module
  4. Register the module in both root install.sh and install.ps1
  5. Update this README to document the new module

More Documentation

License

This project is licensed under the MIT License.

Security

See SECURITY.md for vulnerability reporting guidelines.

Using this as a Template

This repo is a GitHub template. Click Use this template on GitHub to create your own dotfiles repo from it.

To keep your downstream copy in sync with upstream updates (manual or automated via a GitHub Action), see SYNCING.md. An example sync workflow is included at docs/examples/template-sync.yml.

About

General dotfile repo used to consolidate all my personal settings and configurations

Resources

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages