This document outlines all changes needed to make the embabel-learning repository generic enough for others to use with any GitHub organization.
The repository currently has many hardcoded values specific to:
- Username:
jmjava - Organization:
embabel - Base directory:
~/github/jmjava - Workspace name:
embabel-learning - Specific repos:
guide,embabel-agent,dice
New File: config.sh or .env or config/config.ini
# User Configuration
YOUR_GITHUB_USER="jmjava" # Your GitHub username
UPSTREAM_ORG="embabel" # Organization to monitor
BASE_DIR="$HOME/github/${YOUR_GITHUB_USER}" # Base directory for repos
LEARNING_DIR="${BASE_DIR}/embabel-learning" # This workspace directory
# Optional: Specific repos to monitor (space-separated)
MONITOR_REPOS="guide embabel-agent dice"
# Optional: Workspace name (for Cursor workspace file)
WORKSPACE_NAME="embabel-workspace"Usage: All scripts should source this file at the top:
# Load configuration
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
LEARNING_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
if [ -f "$LEARNING_DIR/config.sh" ]; then
source "$LEARNING_DIR/config.sh"
else
echo "Error: config.sh not found. Please copy config.sh.example and configure it."
exit 1
fiAll scripts that currently have hardcoded values should be updated to use variables:
scripts/list-embabel-repos.sh- Lines 14-16scripts/fork-all-embabel.sh- Lines 13-15scripts/clone-embabel-repos.sh- Lines 13-15scripts/setup-upstreams.sh- Lines 13-15scripts/my-contributions.sh- Lines 15-17scripts/monitor-embabel.sh- Lines 7-9, 77, 83, 91scripts/safety-checks.sh- Lines 18, 23, 32, 52, 69, 79, 84, 107
scripts/setup-aliases.sh- Line 6, 56-58scripts/check-sync-status.sh- Lines 7-8, 23scripts/sync-upstream.sh- Lines 12-13, 44, 50, 85scripts/reset-to-upstream.sh- Lines 10-11, 118scripts/compare-branches.sh- Lines 7-8scripts/view-pr.sh- Lines 16-17scripts/review-pr-workflow.sh- Lines 16-17scripts/list-action-items.sh- Lines 35-36scripts/generate-weekly-notes.sh- Lines 72-73scripts/generate-catch-up.sh- Lines 64, 73, 89-90, 116-117scripts/analyze-pr-impact.sh- Lines 17-19, 32, 36scripts/explain-commit.sh- Lines 19-20, 33, 37scripts/prepare-commit-summaries.sh- Lines 20-22, 35, 39scripts/prep-for-discussion.sh- Line 23, 173scripts/open-workspace.sh- Line 5scripts/get-embabel-summary.sh- Line 8scripts/review-my-pr.sh- Line 24scripts/list-fork-urls.sh- Line 7, 37scripts/setup-git-remote.sh- Line 66
Current: Hardcodes specific repos (guide, embabel-agent, dice)
Change to: Use configurable list or auto-detect monitored repos
# Option 1: From config
MONITOR_REPOS="${MONITOR_REPOS:-guide embabel-agent}"
# Option 2: Auto-detect from cloned repos
MONITOR_REPOS=$(find "$BASE_DIR" -maxdepth 1 -type d -name "*" | \
xargs -I {} basename {} | grep -v "^\." | head -10)Current: Hardcoded jmjava username check
Change to: Use $YOUR_GITHUB_USER variable
# Old:
if [[ "$origin_url" == *"embabel/"* ]] && [[ "$origin_url" != *"jmjava"* ]]; then
# New:
if [[ "$origin_url" == *"${UPSTREAM_ORG}/"* ]] && [[ "$origin_url" != *"${YOUR_GITHUB_USER}"* ]]; thenCurrent: Hardcoded paths and repo-specific aliases (eguide, eagent)
Change to: Generate aliases dynamically or make them configurable
# Generate repo aliases dynamically
for repo in $MONITOR_REPOS; do
alias "e${repo//-/_}"="cd $BASE_DIR/$repo"
doneCurrent: Hardcoded "embabel"
Change to: Use "$UPSTREAM_ORG"
Affected Files:
list-embabel-repos.sh- Line 24fork-all-embabel.sh- Line 23get-embabel-summary.sh- Multiple lines
Changes needed:
- Replace "embabel" with "upstream organization" or use variable references
- Replace "jmjava" with "your-username" or
$YOUR_GITHUB_USER - Replace
~/github/jmjavawith$BASE_DIR - Update all example commands to use configuration
- Add setup section for configuration
Sections to update:
- Quick Start (lines 28-30)
- Usage Examples (lines 195-249)
- Learning Resources (lines 268-269)
- Troubleshooting (lines 712)
- All path references
Current: Hardcoded paths
Change to: Source config.sh first
Changes needed:
- Replace all
~/github/jmjavareferences - Replace "embabel" with generic organization references
- Update all path examples
The following files in archive/ contain personal references but are less critical:
QUICKSTART.mdPR-REVIEW-GUIDE.mdCONTRIBUTION-TOOLS-ADDED.mdCATCH-UP-SUMMARY.md
Action: Consider making these templates with placeholders, or mark as "examples for jmjava"
Current: Contains personal notes and contributions
Action:
- Keep as-is (these are personal)
- Consider adding to
.gitignoreor moving to a separate repo - Or create template structure:
notes/templates/vsnotes/personal/
Current: embabel-learning, embabel-workspace.code-workspace
Option 1: Make it configurable via WORKSPACE_NAME variable
Option 2: Rename to generic organization-learning template
Option 3: Keep as embabel-learning but make all references configurable
Recommendation: Option 1 - keep name, make references configurable
Current: Hardcoded ~/github/jmjava
Change to: Use $BASE_DIR from config, default to ~/github/${YOUR_GITHUB_USER}
Current: Many scripts have "embabel" in name:
monitor-embabel.shfork-all-embabel.shclone-embabel-repos.shlist-embabel-repos.shget-embabel-summary.sh
Options:
- Keep names, make internals generic (recommended - easier migration)
- Rename all scripts (breaking change, harder)
- Create generic versions with different names
Recommendation: Option 1 - keep script names for backward compatibility, make internals generic
Current: Variables like EMBABEL_ORG, ALL_EMBABEL_REPOS
Change to: Generic names:
UPSTREAM_ORGinstead ofEMBABEL_ORGALL_REPOSinstead ofALL_EMBABEL_REPOSYOUR_USERinstead of hardcodedjmjava
- Create
config.sh.exampletemplate - Create
config.shloader in all scripts - Add validation/error handling for missing config
Priority order:
safety-checks.sh(used by many scripts)list-embabel-repos.sh(foundation script)fork-all-embabel.sh,clone-embabel-repos.sh(setup scripts)monitor-embabel.sh(daily use)sync-upstream.sh,reset-to-upstream.sh(sync scripts)
Update all other scripts to use configuration variables
- Update
README.mdwith configuration instructions - Create
CONFIGURATION.mdguide - Update all path references in docs
- Add examples for different organizations
- Test with different GitHub usernames
- Test with different organizations
- Validate all scripts work correctly
- Update
.gitignoreif needed
Create config.sh.example:
#!/bin/bash
# Configuration for organization-learning workspace
# Copy this file to config.sh and customize for your setup
# Your GitHub username
export YOUR_GITHUB_USER="your-username"
# The organization you want to monitor/contribute to
export UPSTREAM_ORG="organization-name"
# Base directory where you clone repositories
# Default: ~/github/${YOUR_GITHUB_USER}
export BASE_DIR="${HOME}/github/${YOUR_GITHUB_USER}"
# This workspace directory (embabel-learning or your custom name)
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
export LEARNING_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
# Optional: Specific repositories to monitor in monitor script
# Space-separated list, or leave empty to auto-detect from cloned repos
export MONITOR_REPOS="repo1 repo2 repo3"
# Optional: Workspace name for Cursor/VS Code workspace file
export WORKSPACE_NAME="${UPSTREAM_ORG}-workspace"Create MIGRATION-GUIDE.md:
-
Clone the repository
git clone https://github.com/your-username/organization-learning.git cd organization-learning -
Configure for your setup
cp config.sh.example config.sh # Edit config.sh with your values nano config.sh # or use your preferred editor
-
Source the configuration
source config.sh -
Set up aliases
./scripts/setup-aliases.sh source ~/.bash_aliases
-
Start using the tools
elist # List repos in your organization efork # Fork all repos
To maintain backward compatibility for existing users:
- Default values: Scripts should work without
config.shusing sensible defaults - Fallback logic: If config not found, use hardcoded "embabel" and "jmjava" as defaults
- Warning message: Print warning if using defaults, suggest creating config.sh
Example:
if [ ! -f "$LEARNING_DIR/config.sh" ]; then
echo "Warning: config.sh not found. Using defaults (embabel/jmjava)"
echo "Create config.sh from config.sh.example to customize"
YOUR_GITHUB_USER="${YOUR_GITHUB_USER:-jmjava}"
UPSTREAM_ORG="${UPSTREAM_ORG:-embabel}"
BASE_DIR="${BASE_DIR:-$HOME/github/jmjava}"
fiThese are personal/example files that don't need generalization:
notes/my-contributions/- Personal contribution trackingnotes/session-notes/2026-01-03/- Personal session notesarchive/- Historical/example filesscratch/- Temporary files.gitignore- Already generic
Recommendation: Keep personal notes but add to .gitignore or separate them into personal/ directory
- Create
config.sh.exampletemplate - Create config loader utility function
- Update all scripts to source config
- Replace all hardcoded
jmjavawith$YOUR_GITHUB_USER - Replace all hardcoded
embabelwith$UPSTREAM_ORG - Replace all hardcoded paths with
$BASE_DIRor$LEARNING_DIR - Update
monitor-embabel.shto use configurable repo list - Update
safety-checks.shto use variables - Update
setup-aliases.shto generate aliases dynamically - Update
README.mdwith configuration instructions - Create
CONFIGURATION.mdguide - Update all documentation files
- Add backward compatibility fallbacks
- Test with different usernames/organizations
- Create
MIGRATION-GUIDE.mdfor new users - Update
.gitignoreif needed for personal files
- Configuration system: 2-4 hours
- Core scripts update: 4-6 hours
- Secondary scripts update: 3-4 hours
- Documentation updates: 2-3 hours
- Testing & validation: 2-3 hours
Total: ~15-20 hours of focused work
# 1. Clone
git clone https://github.com/your-username/org-learning.git
cd org-learning
# 2. Configure
cp config.sh.example config.sh
# Edit config.sh with YOUR_GITHUB_USER and UPSTREAM_ORG
# 3. Setup
source config.sh
./scripts/setup-aliases.sh
source ~/.bash_aliases
# 4. Use
elist # See all repos
efork # Fork them
eclone # Clone your forks
em # Monitor daily