Skip to content

Script reference

All scripts self-document with --help. Examples assume cli/ is on your PATH. Bash scripts run on macOS bash 3.2+; Python scripts need python3.


Git & GitHub

gh-merge-pr.sh

Merge a PR safely: polls mergeability, refuses CONFLICTING, confirms first.

gh-merge-pr.sh <pr-number> [-m merge|squash|rebase] [-d] [-r owner/name] [-y]

gh-create-repo.sh

Create a repo and optionally init/commit/push a local dir.

gh-create-repo.sh <name> [--public|--private] [-d desc] [-s dir] [-p] [-y]

gh-rename-repo.sh

Rename a repo and rewrite the local origin.

gh-rename-repo.sh <new-name> [-r owner/name] [--no-remote-update] [-y]

gh-enable-pages.sh

Enable GitHub Pages via the API (Actions or branch source). Repo owner.

gh-enable-pages.sh [owner/name] [--workflow | --branch <b> --path </>] [-y]

gh-pr-open.sh

Push the current branch and open a PR in one step.

gh-pr-open.sh [-t title] [-b base] [-d] [-w] [-y]

gh-pr-status.py

One table of every open PR with CI / review / mergeable state.

gh-pr-status.py [-r owner/name] [-a @me]

gh-release.py

Bump version, build a changelog from commits since the last tag, tag, and release.

gh-release.py [major|minor|patch] [--set X.Y.Z] [-n]

gh-rename-org.sh

Rename an organization. Checks you own it and the new name is free, opens the settings page (github.com has no rename API), waits until GitHub serves the new name, repoints remotes under --scan-dir, and lists files still naming the old org.

gh-rename-org.sh <old-org> <new-org> [-s dir]... [--remotes-only] [--timeout s] [-y]

gh-org-clone.sh

Clone every repo of an org into one directory; --pull fast-forwards existing clones (dirty ones are skipped, never reset).

gh-org-clone.sh <org> [dir] [--https] [--include-archived] [--repos a,b] [--base-url url] [--pull]

gh-issues-sync.py

Create issues from a JSON list of {title, body, labels}. Missing labels are created first (priority P1-P3, area:* and type labels get consistent colors); an issue whose title already exists, open or closed, is skipped, so re-runs never duplicate. Preview by default (exit 2 when there is something to create).

gh-issues-sync.py <issues.json> -R owner/name [--apply] [--delay seconds]

gh-org-ci.sh

Latest GitHub Actions runs for every repo of an org (or --repos), one table, with the URL of each failed run. --wait polls until nothing is running; exit code 2 when any shown run failed.

gh-org-ci.sh <org> [--repos a,b] [-n runs] [--failed] [--wait]

git-split-repo.sh

Extract files or directories into a new repo, keeping their commit history (via git-filter-repo). Paths can be moved, including to the root; the source repo is never modified. --publish creates the GitHub repo and pushes.

git-split-repo.sh <source-repo> <target-dir> (-p src[=dest] | -m manifest)... [-b branch]
                  [--publish owner/name] [--public|--private] [-d desc] [-y]

Manifest lines are <src> [<dest>]; . as dest moves a directory to the root; a line !<path> drops that path (and its history) from inside a kept directory.

git-replace.sh

Replace a literal string in every tracked text file. Preview by default (exit 2 when matches exist), --apply to write; pathspecs include or exclude files.

git-replace.sh <old> <new> [-C dir] [-i] [--apply] [-y] [-- pathspec...]

git-conflict-helper.sh

Rule-based guide to merge/rebase conflicts. See Resolving conflicts.

git-conflict-helper.sh [--check]

git-safe-checkout.sh

Switch branches without silently losing uncommitted work.

git-safe-checkout.sh <branch> [-b] [--check] [-y]

git-clean-branches.sh

Delete branches already merged into the base (local, and --remote).

git-clean-branches.sh [-b base] [--remote] [-n] [-y]

git-sync.sh

Catch up: fetch, fast-forward base, prune, rebase current branch. Refuses a dirty tree.

git-sync.sh [-b base] [--no-rebase] [-y]

Dev environment

dev-doctor.sh

Report which required tools are present, with install hints. Non-zero if a core tool is missing.

automation run dev-doctor --

proj-bootstrap.sh

Scaffold a new project: git, ignore, README, pre-commit, CI, optional license.

proj-bootstrap.sh [dir] [--name n] [--flavor python|node|generic] [--license mit|none] [--no-git] [-y]

precommit-install.sh

Install (and optionally scaffold) pre-commit hooks; offers to pip-install pre-commit.

precommit-install.sh [--with-config] [-y]

py-venv-rebuild.sh

Rebuild a virtualenv whose interpreter went stale; reinstall requirements.

py-venv-rebuild.sh [--python bin|version] [--venv dir] [-r requirements.txt] [-y]

py-check.sh

Run ruff + mypy + pytest (+ coverage) in one pass; skips missing tools.

py-check.sh [path] [--no-cov]

Cross-language dependency & library tooling

Python-powered, polyglot: each detects the manifests present (requirements.txt/pyproject.toml, package.json, go.mod, Cargo.toml, Gemfile, pom.xml) and acts on all of them. Toolchains that aren't installed are skipped with a note rather than failing.

deps-outdated.py

Outdated packages across pip / npm / cargo / go, one table.

deps-outdated.py [--root .]

deps-unused.py

Declared-but-never-imported dependencies (Python + Node, heuristic).

deps-unused.py [--root .] [--warn-only]

lockfile-drift.py

Flag manifests whose lockfile is missing or older than the manifest.

lockfile-drift.py [--root .]

vuln-scan.py

Run each ecosystem's audit tool (pip-audit/npm audit/cargo audit/govulncheck) and normalize.

vuln-scan.py [--root .] [--warn-only]

lic-audit.py

Collect dependency licenses; flag GPL/AGPL/LGPL and unknown.

lic-audit.py [--root .] [--strict]

version-bump.py

Bump the project version in whatever manifest(s) the repo uses, atomically.

version-bump.py [major|minor|patch] [--set X.Y.Z] [--root .] [-n]

env-check.py

Diff .env against .env.example; report missing/extra keys. Language-agnostic.

env-check.py [--env .env] [--example .env.example] [--strict]

Data & housekeeping

data-convert.py

Convert between CSV, JSON, and YAML (YAML needs PyYAML).

data-convert.py <input|-> --to csv|json|yaml [--from fmt] [-o out]

clean-artifacts.sh

Delete build/cache junk (__pycache__, dist, caches, .DS_Store, …). Dry-run by default.

clean-artifacts.sh [dir] [--apply] [--node] [-y]

secret-scan.py

Scan staged files (or given paths) for likely secrets; exits non-zero on a hit.

secret-scan.py [paths...] [--all] [--root .]

snapshot.sh

Timestamped tar.gz of a directory before a risky operation.

snapshot.sh [dir] [-o out-dir]

port-kill.sh

Kill the process listening on a TCP port (not a client connected to it).

port-kill.sh <port> [port...] [--all] [-9] [-y]