Development Environment Updates - May 6-7, 2025

  • 6th May 2025
  • 1 min read

New Git History Summary Tool

Added a new bash script my-git-history-summary that:

  • Takes a list of repositories and generates summaries of recent changes
  • Uses aider with the deepseek model to analyze git diffs
  • Defaults to showing changes from the last 24 hours
  • Includes error handling for invalid repos/directories
  • Comes with a sample repos.list.dorida configuration file for my main dev machine
#!/usr/bin/env bash

set -e

# Read the list of repositories from the file
repos_file="$HOME/repos.list"

if [[ $# -ge 1 ]]; then
    repos_file="$1"
else
    echo "Usage: $0 <repositories_file> [hours]"
    exit 1
fi

# Parse hours, default to 24 if not provided
if [[ $# -gt 1 ]]; then
    hours="$2"
else
    hours=24
fi

# Format time for git log's --since option (relative date)
since_time="${hours} hours ago"

# Check if repos file exists
if [ ! -f "$repos_file" ]; then
    echo "Error: Repositories file $repos_file not found!"
    exit 1
fi

# Read repository paths into an array
mapfile -t repos <"$repos_file"

# Process each repository
for repo in "${repos[@]}"; do
    echo "$repo:"
    # Check if it's a valid Git repository
    if [ ! -d "$HOME/$repo" ]; then
        echo "Error: $repo is not a valid directory."
        exit 1
    fi
    (
        cd "$HOME/$repo" || (echo "Error: $repo is not accessible" ; exit 1)


        if ! git rev-parse --is-inside-work-tree >/dev/null 2>&1 ; then
            echo "Error: $repo is not a valid Git repository."
            exit 1
        fi

        # Get the log output for commits within the last x hours
        git_diff=$(git log --since "$since_time" --patch)
        if [[ -n "$git_diff" ]]; then
            # Use aider to generate a summary of changes
            echo "=== Summary generated by aider ==="
            aider --model deepseek --message "Generate a summary of the changes in the diff: $git_diff"
            echo "=== End of summary ==="
        else
            echo "No changes since $since_time"
        fi
    )
done

Mise Configuration Updates

  • Added fzf as a required tool in mise configuration
  • Refactored bashrc’s mise initialization into four separate modules:
    • mise-activate for core activation
    • mise-reshim for reshimming
    • mise-completion for bash completion
    • mise-tools for tool setup This provides more granular control over the initialization process.

SSH Configuration

Added Amazon Q SSH integration by including its configuration file at the bottom of .ssh/config. The integration is set to match all hosts.