Skip to content
romanpindelaPublic

About

A collection of automation scripts and utilities designed to streamline developer workflows via GitHub integration and automate end-to-end application deployments.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Dev πŸš€

A collection of production-grade automation scripts and utilities designed to streamline developer workflows via GitHub integration, automate workstation and PowerShell provisioning, manage repository lifecycles, package scripts, and configure secure cryptographic commit signing.

License: MIT PRs Welcome Status: Active Platform: Windows


πŸ“Œ Metadata & Author Information


πŸ“‹ Table of Contents


πŸ” About the Project

The Dev repository serves as a centralized hub for modern software development configurations, utility scripts, and environment scaffolding. Whether setting up a fresh workstation, configuring cryptographic commit verification, batch-synchronizing dozens of repositories, packaging scripts into executables, automating README screenshots, or deploying local codebases to GitHub, this repository bundles the essential automation modules needed to reduce "time-to-code" while maintaining clean, consistent standards.

Note: This repository is structured to be modular. Each tool resides in its own self-contained Verb-Noun directory complete with an executable PowerShell (.ps1) or Python (.py) script, optional assets/supporting files, and standardized documentation.


πŸ“Š Script Catalog (Alphabetical)

Script Name Description Problem Solved Category Tag Permissions
Add-RunScreenshotsToReadme Executes a target script for standard and -Help runs, captures console screenshots, and embeds them into readme.md. Eliminates manual capturing, saving, and Markdown embedding of CLI execution screenshots. Documentation Automation User
Clone-GitHubRepositories Clones or fast-forward updates a list of GitHub repositories read from an external text file (repositoriesToClone.txt). Replaces manual one-by-one cloning and updating of curated multi-repo workspaces. Git & GitHub User
Configure-GitEnvironment Configures global Git identity/line endings/editor settings, generates an Ed25519 SSH keypair, and tests GitHub SSH connectivity. Standardizes initial workstation .gitconfig and SSH setup without missing key settings. Environment Setup User
Configure-PowerShell Provisions PowerShell 5.1 and 7+ profiles with a default workspace directory, RemoteSigned policy, and PSReadLine history options. Automates consistent shell profile setup across PS 5.1/7+ and OneDrive-redirected folders. Environment Setup User
Connect-GitHubCLI Verifies git, installs GitHub CLI via winget if absent, and initiates SSH browser authentication (gh auth login). Streamlines installing and authenticating gh CLI with SSH on fresh Windows hosts. Git & GitHub User (Admin optional)
Convert-PS2EXE Auto-elevates, ensures the ps2exe module is installed, and compiles a .ps1 script into a standalone .exe binary. Simplifies distributing PowerShell scripts to environments restricted by .ps1 policies. Build & Packaging Admin
Deploy-WorkspaceToGitHub Optionally prepares .gitignore via Initialize-GitIgnore, initializes local Git, creates a public/private GitHub repo (with optional -RepoName), and pushes main. Removes multi-step manual .gitignore, git init, gh repo create, and upstream push friction. Git & GitHub User
Enable-GitCommitSigning Provisions Ed25519/RSA SSH commit signing, allowed_signers, optional ssh-agent, GitHub key registration, and signed -Push. Replaces complex GPG/PGP suites with automated native OpenSSH commit signing. Security & Signing User (Admin optional)
Initialize-GitIgnore Generates a security-focused .gitignore template (with -WhatIf support) and optionally scaffolds .env and .local folders. Prevents accidental commits of secrets, .env files, local scripts, and OS temp artifacts. Security & Signing User
Invoke-GitHubScript Auto-elevates, downloads a remote GitHub .ps1 script (converting /blob/ URLs to raw), unblocks it, and executes it securely. Removes manual raw-URL conversion, Unblock-File, and execution-policy friction for remote scripts. Remote Execution Admin
Sync-GitHubUserRepos Queries the GitHub REST API for a user's repositories, applies date/fork filters, clones missing repos, and optionally updates outdated ones. Automates mass backup, date-filtered auditing, and synchronization of all user GitHub repos. Git & GitHub User
Update-AllGitRepos Scans a root directory for local .git repositories, fetches remotes (with optional --prune), and fast-forwards with git pull --ff-only. Eliminates manual git fetch and fast-forward pulling across dozens of local repositories. Git & GitHub User

✨ Key Features

  • πŸ” Cryptographic Commit Signing: Native OpenSSH key-based commit & tag signing for Git and GitHub verified badges.
  • πŸ”„ Bulk Repository Management: Automated discovery, date-filtered mirroring, fetching, and safe fast-forward updating across multiple Git repositories.
  • πŸ› οΈ Automated Environment Provisioning: Quick setup scripts for Git configurations, .gitignore security templates, SSH keys, and PowerShell profiles.
  • πŸ“¦ Zero-Friction GitHub Integration & Packaging: GitHub CLI authentication, automated repository creation, secure remote script execution, and .ps1 to .exe compilation.
  • πŸ“Έ Documentation Automation: Automated console screenshot capture and Markdown README.md embedding for CLI scripts.
  • πŸ“Š Dynamic Visual Feedback & Audited Logging: Native Write-Progress status bars, colorized console diagnostics, and UTF-8 execution logs.

πŸ“‚ Repository Structure

C:\Dane\rpindela\GitHub\Dev\
β”œβ”€β”€ Add-RunScreenshotsToReadme/    # Automated README execution screenshot generator (Python)
β”œβ”€β”€ Clone-GitHubRepositories/      # Bulk clone/update utility from repositoriesToClone.txt
β”œβ”€β”€ Configure-GitEnvironment/      # Automated Git global profile & Ed25519 SSH configuration
β”œβ”€β”€ Configure-PowerShell/          # Multi-version PowerShell profile & PSReadLine configurator
β”œβ”€β”€ Connect-GitHubCLI/             # GitHub CLI installation & SSH web-auth wrapper
β”œβ”€β”€ Convert-PS2EXE/                # PowerShell (.ps1) to standalone Windows executable (.exe) compiler
β”œβ”€β”€ Deploy-WorkspaceToGitHub/      # Local Git initializer and remote GitHub repository publisher
β”œβ”€β”€ Enable-GitCommitSigning/       # Cryptographic SSH commit signing engine & GitHub onboarding
β”œβ”€β”€ Initialize-GitIgnore/          # Security-focused .gitignore & local environment scaffold generator
β”œβ”€β”€ Invoke-GitHubScript/           # Remote GitHub PowerShell script downloader, unblocker, and runner
β”œβ”€β”€ Sync-GitHubUserRepos/          # GitHub REST API user repo mass cloner, date filter, and updater
β”œβ”€β”€ Update-AllGitRepos/            # Bulk fast-forward synchronization engine for all local repos
└── README.md                      # Master repository documentation (this file)

πŸš€ Available Scripts & Automation

1. Add-RunScreenshotsToReadme πŸ“Έ

  • Location: Add-RunScreenshotsToReadme/
  • Script: Add-RunScreenshotsToReadme.py
  • Description: Launches a target .ps1, .exe, or .py script in a maximized PowerShell window for both a standard run and a -Help run, saves assets/screenshot-standard-run.jpg and assets/screenshot-help.jpg, and embeds an Execution View section into the target script's readme.md.
  • Usage:
    python .\Add-RunScreenshotsToReadme\Add-RunScreenshotsToReadme.py -s "C:\path\to\Your-Script.ps1" -args "-Verbose"

2. Clone-GitHubRepositories πŸ“₯

3. Configure-GitEnvironment βš™οΈ

  • Location: Configure-GitEnvironment/
  • Script: Configure-GitEnvironment.ps1
  • Description: Configures global Git settings (user.name, user.email, core.autocrlf, core.editor, init.defaultBranch), generates an Ed25519 SSH keypair, and verifies GitHub SSH connectivity.
  • Usage:
    .\Configure-GitEnvironment\Configure-GitEnvironment.ps1 -Name "Roman Pindela" -Email "roman.pindela@gmail.com"

4. Configure-PowerShell πŸ’»

  • Location: Configure-PowerShell/
  • Script: Configure-PowerShell.ps1
  • Description: Provisions PowerShell 5.1 and 7+ profiles with a default startup directory, RemoteSigned execution policy, PSReadLine history prediction, and live profile reload.
  • Usage:
    powershell -ExecutionPolicy Bypass -File .\Configure-PowerShell\Configure-PowerShell.ps1 -DefaultFolder "C:\GitHub\"

5. Connect-GitHubCLI πŸ”—

  • Location: Connect-GitHubCLI/
  • Script: Connect-GitHubCLI.ps1
  • Description: Verifies git availability, installs GitHub CLI (gh) via winget if missing, and launches browser-based SSH authentication (gh auth login).
  • Usage:
    powershell -ExecutionPolicy Bypass -File .\Connect-GitHubCLI\Connect-GitHubCLI.ps1

6. Convert-PS2EXE πŸ“¦

  • Location: Convert-PS2EXE/
  • Script: Convert-PS2EXE.ps1
  • Description: Auto-elevates via UAC, installs the ps2exe module if absent, and compiles any .ps1 script into a standalone Windows executable (.exe).
  • Usage:
    .\Convert-PS2EXE\Convert-PS2EXE.ps1 -ScriptPath "C:\Scripts\MyScript.ps1"

7. Deploy-WorkspaceToGitHub 🚒

  • Location: Deploy-WorkspaceToGitHub/
  • Script: Deploy-WorkspaceToGitHub.ps1
  • Description: Optionally prepares the local workspace via Initialize-GitIgnore, initializes a local directory as a Git repository, creates a public or private GitHub repository (supporting custom -RepoName) via GitHub CLI, configures origin, and pushes the primary branch.
  • Usage:
    powershell -ExecutionPolicy Bypass -File .\Deploy-WorkspaceToGitHub\Deploy-WorkspaceToGitHub.ps1 -Path "C:\GitHub\MyProject" -RepoName "MyCustomRepo" -Visibility "private" -InitializeGitIgnore

8. Enable-GitCommitSigning πŸ”

  • Location: Enable-GitCommitSigning/
  • Script: Enable-GitCommitSigning.ps1
  • Description: Provisions cryptographic SSH commit and tag signing in Git, manages Ed25519/RSA keys, configures allowed_signers for local signature verification, manages the Windows OpenSSH agent service, registers signing keys on GitHub, and provides a signed -Push pipeline with Write-Progress bars.
  • Usage:
    .\Enable-GitCommitSigning\Enable-GitCommitSigning.ps1 -Enable
    .\Enable-GitCommitSigning\Enable-GitCommitSigning.ps1 -Push -RepoPath "C:\Dane\rpindela\GitHub\Dev" -CommitMessage "feat: signed commit"

9. Initialize-GitIgnore πŸ“„

  • Location: Initialize-GitIgnore/
  • Script: Initialize-GitIgnore.ps1
  • Description: Generates a standardized .gitignore template blocking credentials, .env, local sandboxes, and OS temporary files (with -WhatIf support), and optionally creates .env and .local folders.
  • Usage:
    .\Initialize-GitIgnore\Initialize-GitIgnore.ps1 -RepoPath "C:\Projects\SystemAudit" -WhatIf

10. Invoke-GitHubScript 🌐

  • Location: Invoke-GitHubScript/
  • Script: Invoke-GitHubScript.ps1
  • Description: Downloads a remote PowerShell script from GitHub (converting /blob/ URLs to raw), unblocks it with Unblock-File, and executes it in an elevated process with temporary execution policy bypass. Also includes alternative_script.ps1.
  • Usage:
    .\Invoke-GitHubScript\Invoke-GitHubScript.ps1 -ScriptUrl "https://raw.githubusercontent.com/romanpindela/Windows-Desktop/main/Enable-RemoteManagement/Enable-RemoteManagement.ps1"

11. Sync-GitHubUserRepos πŸ—‚οΈ

  • Location: Sync-GitHubUserRepos/
  • Script: Sync-GitHubUserRepos.ps1
  • Description: Automates mass cloning, status verification, flexible date filtering, and synchronization (git pull) of all GitHub repositories owned by a user account or email address, supporting PAT authentication, REST API pagination, and UTF-8 logging.
  • Usage:
    .\Sync-GitHubUserRepos\Sync-GitHubUserRepos.ps1 -UserName "roman.pindela@gmail.com" -CreatedBefore "2024-05" -Update

12. Update-AllGitRepos πŸ”„

  • Location: Update-AllGitRepos/
  • Script: Update-AllGitRepos.ps1
  • Description: Scans a parent directory (default: C:\GitHub), detects all local Git repositories, checks branch states, fetches remote commits, performs safe fast-forward updates (git pull --ff-only), and displays real-time progress bars with commit counts.
  • Usage:
    .\Update-AllGitRepos\Update-AllGitRepos.ps1 -Update -Prune

🏁 Getting Started

Prerequisites

  1. Windows 10/11 or Windows Server 2016+
  2. Windows PowerShell 5.1 or PowerShell 7+
  3. Git for Windows installed and available in $env:PATH
  4. GitHub CLI (required by Connect-GitHubCLI and Deploy-WorkspaceToGitHub; optional for Enable-GitCommitSigning)
  5. Python 3.6+ (required only for Add-RunScreenshotsToReadme.py)

Unblocking Scripts

PowerShell marks downloaded files from the web as untrusted. Unblock the scripts before running:

Get-ChildItem -Path "C:\Dane\rpindela\GitHub\Dev" -Recurse -Filter "*.ps1" | Unblock-File

🀝 Contributing

Contributions, feedback, and pull requests are warmly welcomed! Please ensure all scripts follow Verb-Noun PascalCase naming, include clean-code practices, complete Comment-Based Help blocks, and standardized README.md documentation.


πŸ“„ License

Distributed under the MIT License.

About

A collection of automation scripts and utilities designed to streamline developer workflows via GitHub integration and automate end-to-end application deployments.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages