From 59882323aa9ebfe99581e7af992b669bec6f3e3d Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 23 Oct 2026 16:04:30 +0000 Subject: [PATCH 1/3] =?UTF-8?q?docs(devcontainer-features):=20=F0=9F=93=9D?= =?UTF-8?q?=20fix=20stale=20option=20default,=20id=20pin=20and=20missing?= =?UTF-8?q?=20scripting=20row?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01YG4X8TdddFmqXDN6Exw4cb --- README.md | 3 ++- src/common-utils/README.md | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index fed0b9a3..cf637b36 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ curl -fsSL https://raw.githubusercontent.com/tomgrv/devcontainer-features/develo ## Features Overview -Each row's console command is `add ` (see [Installation](#installation)); the devcontainer.json id is `ghcr.io/tomgrv/devcontainer-features/:8`; the npm package is `@tomgrv/devcontainer-features-`. +Each row's console command is `add ` (see [Installation](#installation)); the devcontainer.json id is `ghcr.io/tomgrv/devcontainer-features/:10`; the npm package is `@tomgrv/devcontainer-features-`. | Feature | `` | Description | | -------------------------------------------- | -------------- | ------------------------------------------------------------------------- | @@ -61,6 +61,7 @@ Each row's console command is `add ` (see [Installation](#installation) | [Common Utils](./src/common-utils/README.md) | `common-utils` | Shared utilities (`jq`, `dos2unix`, ...) used by other features | | [Gateway](./src/gateway/README.md) | `gateway` | SSL inspection certs for corporate networks; also installable on the host | | [Minikube](./src/minikube/README.md) | `minikube` | Local Kubernetes cluster via Minikube | +| [Scripting](./src/scripting/README.md) | `scripting` | Standard root `setup.sh` bootstrapping `zz-use` and the repo entrypoint | | [AI Coding](./src/ai-coding/README.md) | `ai-coding` | Agent-agnostic AI coding skills + Claude Code GitHub Action | ## MCP server for agents diff --git a/src/common-utils/README.md b/src/common-utils/README.md index e717d69e..9ebb5b8f 100644 --- a/src/common-utils/README.md +++ b/src/common-utils/README.md @@ -30,9 +30,9 @@ npm install --save-dev @tomgrv/devcontainer-features-common-utils ## Options -| Options Id | Description | Type | Default Value | -| ---------- | ------------------------- | ------ | ------------- | -| utils | The utilities to install. | string | jq dos2unix | +| Options Id | Description | Type | Default Value | +| ---------- | ------------------------- | ------ | ------------------------- | +| utils | The utilities to install. | string | jq yq dos2unix shellcheck | ## Utilities From be19c2ac635ed053d588326d128b9ca5a2cb404d Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 23 Oct 2026 16:07:39 +0000 Subject: [PATCH 2/3] =?UTF-8?q?docs(devcontainer-features):=20=F0=9F=93=9D?= =?UTF-8?q?=20bump=20id=20pin=20to=20:11,=20link=20script=20docs=20instead?= =?UTF-8?q?=20of=20duplicating?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01YG4X8TdddFmqXDN6Exw4cb --- .devcontainer/devcontainer.json | 6 +- README.md | 2 +- src/act/README.md | 2 +- src/act/devcontainer-feature.json | 2 +- src/act/stubs/.devcontainer/devcontainer.json | 2 +- src/ai-coding/README.md | 2 +- src/ai-coding/devcontainer-feature.json | 2 +- src/common-utils/README.md | 191 ++---------------- src/gateway/README.md | 4 +- src/gateway/devcontainer-feature.json | 2 +- .../stubs/.devcontainer/devcontainer.json | 2 +- src/githooks/README.md | 2 +- src/githooks/devcontainer-feature.json | 2 +- src/gitutils/README.md | 141 +------------ src/gitutils/devcontainer-feature.json | 4 +- src/gitversion/README.md | 2 +- src/gitversion/devcontainer-feature.json | 2 +- src/larasets/README.md | 2 +- src/larasets/devcontainer-feature.json | 2 +- src/minikube/README.md | 2 +- src/minikube/devcontainer-feature.json | 2 +- src/scripting/README.md | 2 +- src/scripting/devcontainer-feature.json | 2 +- .../stubs/.devcontainer/devcontainer.json | 2 +- 24 files changed, 43 insertions(+), 341 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 67c2249e..f0dfc9e8 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -2,9 +2,9 @@ "image": "mcr.microsoft.com/devcontainers/base:noble", "name": "", "features": { - "ghcr.io/tomgrv/devcontainer-features/ai-coding:10": {}, - "ghcr.io/tomgrv/devcontainer-features/githooks:10": {}, - "ghcr.io/tomgrv/devcontainer-features/gitutils:10": {} + "ghcr.io/tomgrv/devcontainer-features/ai-coding:11": {}, + "ghcr.io/tomgrv/devcontainer-features/githooks:11": {}, + "ghcr.io/tomgrv/devcontainer-features/gitutils:11": {} }, "remoteEnv": {}, "postCreateCommand": {}, diff --git a/README.md b/README.md index cf637b36..618913cc 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ curl -fsSL https://raw.githubusercontent.com/tomgrv/devcontainer-features/develo ## Features Overview -Each row's console command is `add ` (see [Installation](#installation)); the devcontainer.json id is `ghcr.io/tomgrv/devcontainer-features/:10`; the npm package is `@tomgrv/devcontainer-features-`. +Each row's console command is `add ` (see [Installation](#installation)); the devcontainer.json id is `ghcr.io/tomgrv/devcontainer-features/:11`; the npm package is `@tomgrv/devcontainer-features-`. | Feature | `` | Description | | -------------------------------------------- | -------------- | ------------------------------------------------------------------------- | diff --git a/src/act/README.md b/src/act/README.md index 0e83f7d5..b8f078d1 100644 --- a/src/act/README.md +++ b/src/act/README.md @@ -10,7 +10,7 @@ More information about Act can be found on the [Act GitHub page](https://github. ```json "features": { - "ghcr.io/tomgrv/devcontainer-features/act:10": {} + "ghcr.io/tomgrv/devcontainer-features/act:11": {} } ``` diff --git a/src/act/devcontainer-feature.json b/src/act/devcontainer-feature.json index a085c429..a6569b38 100644 --- a/src/act/devcontainer-feature.json +++ b/src/act/devcontainer-feature.json @@ -5,7 +5,7 @@ "ghcr.io/devcontainers/features/docker-in-docker:3": { "moby": false }, - "ghcr.io/tomgrv/devcontainer-features/common-utils:10": {} + "ghcr.io/tomgrv/devcontainer-features/common-utils:11": {} }, "name": "Nektos Act", "options": { diff --git a/src/act/stubs/.devcontainer/devcontainer.json b/src/act/stubs/.devcontainer/devcontainer.json index afab8746..8b18f06c 100644 --- a/src/act/stubs/.devcontainer/devcontainer.json +++ b/src/act/stubs/.devcontainer/devcontainer.json @@ -1,5 +1,5 @@ { "features": { - "ghcr.io/tomgrv/devcontainer-features/act:10": {} + "ghcr.io/tomgrv/devcontainer-features/act:11": {} } } diff --git a/src/ai-coding/README.md b/src/ai-coding/README.md index 9bee40e8..02f105be 100644 --- a/src/ai-coding/README.md +++ b/src/ai-coding/README.md @@ -10,7 +10,7 @@ Other features can opt into skills too: `dependsOn` this feature, ship a `stubs/ ```json "features": { - "ghcr.io/tomgrv/devcontainer-features/ai-coding:10": {} + "ghcr.io/tomgrv/devcontainer-features/ai-coding:11": {} } ``` diff --git a/src/ai-coding/devcontainer-feature.json b/src/ai-coding/devcontainer-feature.json index b08ca04d..b23f750b 100644 --- a/src/ai-coding/devcontainer-feature.json +++ b/src/ai-coding/devcontainer-feature.json @@ -10,7 +10,7 @@ "description": "Agent-agnostic AI coding skills (.github/skills) plus the Claude Code GitHub Action for @claude mentions.", "id": "ai-coding", "dependsOn": { - "ghcr.io/tomgrv/devcontainer-features/common-utils:10": {} + "ghcr.io/tomgrv/devcontainer-features/common-utils:11": {} }, "name": "AI Coding", "version": "11.9.0", diff --git a/src/common-utils/README.md b/src/common-utils/README.md index 9ebb5b8f..7eea62c8 100644 --- a/src/common-utils/README.md +++ b/src/common-utils/README.md @@ -8,7 +8,7 @@ This feature provides common utilities for the devcontainer features. ```json "features": { - "ghcr.io/tomgrv/devcontainer-features/common-utils:10": { + "ghcr.io/tomgrv/devcontainer-features/common-utils:11": { "utils": "jq dos2unix" } } @@ -144,184 +144,17 @@ Consumer repos get these deployed workflows under `.github/workflows/`: ## Additional utilities -In addition to the specified utilities, some additional local utilities are also provided: - -- `zz-colors`: A set of color codes to source in your scripts for colored output. -- `zz-log`: A utility to log messages with color -- `zz-args`: A utility to parse command line arguments and display associated help messages in one go. - -### Distribute zz-\* Utilities - -The `zz-dist` utility allows you to copy all `zz-*` utilities from the devcontainer-installed location to a target directory. This is useful for maintaining a local copy of utilities in your project. - -#### Usage - -```bash -zz-dist [options] -``` - -#### Options - -| Option | Description | -| ---------- | ---------------------------------------------------------------------------------- | -| `-t ` | Target directory (required unless specified in config). | -| `-s ` | Source directory (default: `/usr/local/share/common-utils`). | -| `-q` | Quiet mode: exit silently (code 0) if no target found instead of generating error. | - -#### Configuration - -The target directory **must** be specified using one of these methods (checked in order): - -1. **Command-line option**: Use the `-t` parameter to explicitly specify the target directory. - -2. **`.zz_dist` file**: Create a `.zz_dist` file in your project root with the target directory path on the first line. - -```bash -echo "./scripts" > .zz_dist -``` - -3. **`package.json`**: Add a `config.zz_dist` entry to your `package.json`: - -```json -{ - "config": { - "zz_dist": "./scripts" - } -} -``` - -If no target is found and `-q` (quiet mode) is not specified, the script will exit with an error. The target directory must exist before running the script. - -#### Example - -```bash -# Copy using config file -echo "./scripts" > .zz_dist -mkdir -p ./scripts -zz-dist - -# Copy to specific directory (must exist) -mkdir -p ./my-utils -zz-dist -t ./my-utils - -# Copy from custom source to existing directory -zz-dist -s /custom/path -t ./scripts - -# Quiet mode - no error if target not configured -zz-dist -q -``` - -### Persist a key=value pair - -The `zz-persist` utility upserts a `KEY=VALUE` pair into an env-style file -and/or a `/etc/profile.d/.sh` snippet, so the value survives a new -shell or a script re-run. It only knows about these two generic targets — it -has no notion of secret stores; layer that on top in your own script if -needed. - -#### Usage - -```bash -zz-persist [-f file] [-p profile] -``` - -#### Options - -| Option | Description | -| ----------- | ----------------------------------------------------------------- | -| `-f ` | Upsert `KEY=VALUE` into this env-style file (created if missing). | -| `-p ` | Upsert `export KEY=VALUE` into `/etc/profile.d/.sh`. | - -At least one of `-f`/`-p` is required. Both are idempotent — running twice -replaces the existing entry instead of duplicating it. - -#### Example - -```bash -zz-persist -f .env APP_PORT 8000 -zz-persist -p myfeature MY_VAR value -``` - -### Validate JSON - -The `json-validate` utility allows you to validate JSON files against a JSON schema. It supports the following features: - -- Validate against a schema from a local file or a URL. -- Infer schema from the JSON Schema Store based on the file name. -- Use a fallback schema if no schema is found locally or inferred. -- Allow additional properties at the root level with the `-a` flag. -- Cache schema validation maps for faster subsequent validations. - -#### Usage - -```bash -json-validate [options] -``` - -#### Options - -| Option | Description | -| ----------- | --------------------------------------------------------------------------------------------------------- | -| `-a` | Allow additional properties at the root level. | -| `-d` | Enable debug output. | -| `-c` | Allow caching of schema validation maps. | -| `-f ` | Specify a fallback schema to use if none is found locally or inferred. | -| `-l ` | Infer schema from a local folder based on the JSON file name (e.g., `x.y.json` → `/y.schema.json`). | -| `-i` | Infer schema from the JSON Schema Store if nothing is found locally. | -| `-s ` | Specify a schema file or URL to use for validation. | - -#### Example - -```bash -json-validate -a -f fallback.schema.json -l ./schemas -i -s custom.schema.json example.json -``` - -### Normalize JSON - -The `json-normalize` utility allows you to normalize JSON files based on a JSON schema. It supports the following features: - -- Validate the JSON file before normalization with the `json-validate` utility. -- Normalize JSON keys according to the - 1 schema definition - 2 alphabetically - -#### Usage - -```bash -json-normalize [options] -``` - -#### Options - -| Option | Description | -| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `-w` | Write the normalized JSON back to the original file. | -| `-t ` | Specify the tab size for indentation. | -| `-c` | Allow caching of schema validation maps. | -| `-a` | Allow additional properties at the root level. | -| `-d` | Enable debug output. | -| `-f ` | Specify a fallback schema to use if none is found locally or inferred. | -| `-l ` | Infer schema from a local folder based on the JSON file name (e.g., `x.y.json` → `/y.schema.json`). Use 'local' to target feature folder with default schemas | -| `-i` | Infer schema from the JSON Schema Store if nothing is found locally. | -| `-s ` | Specify a schema file or URL to use for normalization. | - -#### Example - -```bash -json-normalize -w -t 4 -f fallback.schema.json -l ./schemas -i -s custom.schema.json example.json -``` - -#### Lint-staged - -You can use the `json-normalize` utility with `lint-staged` to normalize JSON files before committing them. To do this, add the following configuration to your `package.json`(see [githooks feature](../githooks/stubs/_lint-staged.package.json)). - -```json -"lint-staged": { - "*.json": [ - "json-normalize -c -w -a -i -t 4 -f local -l true" - ] -} -``` +Installed from [`tomgrv/scripts`](https://github.com/tomgrv/scripts); each has its own README with usage and options. + +| Utility | Purpose | +| ---------------------------------------------------------------------------------- | --------------------------------------------------------------- | +| [`zz-colors`](https://github.com/tomgrv/scripts/tree/main/zz-colors) | color codes to source in your scripts | +| [`zz-log`](https://github.com/tomgrv/scripts/tree/main/zz-log) | log messages with color | +| [`zz-args`](https://github.com/tomgrv/scripts/tree/main/zz-args) | parse command line arguments and print help in one go | +| [`distribute-utils`](https://github.com/tomgrv/scripts/tree/main/distribute-utils) | copy the `zz-*` utilities into a project folder (was `zz-dist`) | +| [`zz-persist`](https://github.com/tomgrv/scripts/tree/main/zz-persist) | upsert a `KEY=VALUE` into an env file and/or `/etc/profile.d` | +| [`json-validate`](https://github.com/tomgrv/scripts/tree/main/json-validate) | validate JSON against a local, inferred or remote schema | +| [`json-normalize`](https://github.com/tomgrv/scripts/tree/main/json-normalize) | order JSON keys by schema, then alphabetically | ## Contributing diff --git a/src/gateway/README.md b/src/gateway/README.md index 2ff19215..aad7dbfb 100644 --- a/src/gateway/README.md +++ b/src/gateway/README.md @@ -20,7 +20,7 @@ SSL inspection tools act as a man-in-the-middle TLS proxy and replace server cer ```json "features": { - "ghcr.io/tomgrv/devcontainer-features/gateway:10": {} + "ghcr.io/tomgrv/devcontainer-features/gateway:11": {} } ``` @@ -134,7 +134,7 @@ The feature works around it in two flows, both downloading the `.vsix` packages ```json "features": { - "ghcr.io/tomgrv/devcontainer-features/gateway:10": { + "ghcr.io/tomgrv/devcontainer-features/gateway:11": { "vsix": "esbenp.prettier-vscode, ms-python.python@2024.2.1" } } diff --git a/src/gateway/devcontainer-feature.json b/src/gateway/devcontainer-feature.json index 7b81273f..2f43bb4f 100644 --- a/src/gateway/devcontainer-feature.json +++ b/src/gateway/devcontainer-feature.json @@ -18,7 +18,7 @@ "description": "Handling SSL Inspection Gateway while building & using devcontainers", "id": "gateway", "dependsOn": { - "ghcr.io/tomgrv/devcontainer-features/common-utils:10": { + "ghcr.io/tomgrv/devcontainer-features/common-utils:11": { "utils": "bash ca-certificates curl" } }, diff --git a/src/gateway/stubs/.devcontainer/devcontainer.json b/src/gateway/stubs/.devcontainer/devcontainer.json index cd4f3ab7..9d990027 100755 --- a/src/gateway/stubs/.devcontainer/devcontainer.json +++ b/src/gateway/stubs/.devcontainer/devcontainer.json @@ -4,7 +4,7 @@ }, "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", "features": { - "ghcr.io/tomgrv/devcontainer-features/gateway:10": {} + "ghcr.io/tomgrv/devcontainer-features/gateway:11": {} }, "mounts": [ { diff --git a/src/githooks/README.md b/src/githooks/README.md index 37a0cb41..062cd431 100644 --- a/src/githooks/README.md +++ b/src/githooks/README.md @@ -8,7 +8,7 @@ This feature provides a set of hooks for working with Git repositories. ```json "features": { - "ghcr.io/tomgrv/devcontainer-features/githooks:10": {} + "ghcr.io/tomgrv/devcontainer-features/githooks:11": {} } ``` diff --git a/src/githooks/devcontainer-feature.json b/src/githooks/devcontainer-feature.json index cea8eff2..1bd9f6a0 100644 --- a/src/githooks/devcontainer-feature.json +++ b/src/githooks/devcontainer-feature.json @@ -28,7 +28,7 @@ "ghcr.io/devcontainers/features/node:1": { "version": "lts" }, - "ghcr.io/tomgrv/devcontainer-features/gitutils:10": {} + "ghcr.io/tomgrv/devcontainer-features/gitutils:11": {} }, "name": "Git Hooks", "version": "11.4.0", diff --git a/src/gitutils/README.md b/src/gitutils/README.md index 4d1eefa1..d1e521ee 100644 --- a/src/gitutils/README.md +++ b/src/gitutils/README.md @@ -8,7 +8,7 @@ This feature provides a set of utilities for working with Git repositories. ```json "features": { - "ghcr.io/tomgrv/devcontainer-features/gitutils:10": {} + "ghcr.io/tomgrv/devcontainer-features/gitutils:11": {} } ``` @@ -175,143 +175,12 @@ The feature also includes the following VS Code customizations: - `explorer.excludeGitIgnore`: `true` - `git.autorefresh`: `true` -## Git Fix Date +## Git Fix Date and Git Fix Secrets -The `git fix date` command allows you to correct commit dates and times in your git history. It provides advanced options to reschedule commits that fall outside specific time ranges for certain days of the week, while maintaining the sequential order of commits. +- `git fix date` reschedules commit dates and times in history (e.g. weekday commits moved outside working hours), keeping their order — see [`git-fix-date`](https://github.com/tomgrv/scripts/tree/main/git-fix-date). +- `git fix secrets` redacts a literal secret from files, commit messages and tag messages across history — see [`git-fix-secrets`](https://github.com/tomgrv/scripts/tree/main/git-fix-secrets). -### Usage - -```bash -# Basic usage with default values (reschedule Mon-Fri 08:00-17:00 to 06:00/20:00) -# The command will display a plan and ask for confirmation -git fix date -f [ < commit-sha > ] - -# Dry-run mode to preview changes without applying them (no confirmation needed) -git fix date -d [ < commit-sha > ] - -# Reschedule commits with custom options -git fix date -r < days > -s < start > -e < end > -b < before > -a < after > [ < commit-sha > ] -``` - -### Options - -- `-f` - Force mode: allow overwriting pushed history -- `-p` - Push changes after rewriting history -- `-d` - Dry-run mode: display change plan without applying changes or asking for confirmation -- `-r ` - Days of week to reschedule (default: `1,2,3,4,5` for Mon-Fri; 0=Sunday, 6=Saturday) -- `-s ` - Start time for rescheduling (default: `08:00`, HH:MM format) -- `-e ` - End time for rescheduling (default: `17:00`, HH:MM format) -- `-b ` - Time to move first half commits to (default: `06:00`, HH:MM format) -- `-a ` - Time to move second half commits to (default: `20:00`, HH:MM format) - -### Default Behavior - -When run without options, the command will: - -- Display a change plan showing all commits that will be modified -- Ask for confirmation before proceeding -- Reschedule commits on weekdays (Monday-Friday) -- Target commits between 08:00 and 17:00 -- Move first half (08:00-12:30) to 06:00 -- Move second half (12:30-17:00) to 20:00 - -### Examples - -#### Example 1: Preview changes with dry-run mode - -```bash -git fix date -d -``` - -Output: - -``` -=== Change Plan === - -a1b2c3d | 2024-03-04 09:00:00 → 2024-03-04 06:00:00 | Monday morning work -e4f5g6h | 2024-03-04 14:00:00 → 2024-03-04 20:00:00 | Monday afternoon work - -=== End of Change Plan === - -Dry run complete. No changes were made. -``` - -#### Example 2: Apply default weekday rescheduling with confirmation - -```bash -git fix date -f -``` - -The command will display the change plan and prompt: - -``` -This will rewrite git history. Make sure you understand the consequences. -Do you want to proceed? (y/N) -``` - -#### Example 3: Reschedule Sunday commits - -Reschedule all Sunday commits between 8:00 and 20:00: - -- Commits in the first half (8:00-14:00) will be moved to 7:30 on the same day -- Commits in the second half (14:00-20:00) will be moved to 20:30 on the same day - -```bash -git fix date -f -r 0 -s 08:00 -e 20:00 -b 07:30 -a 20:30 -``` - -### Important Notes - -- The sequential order of commits is always preserved -- Only the time is modified, never the date -- The command uses `git filter-branch` to rewrite history -- Use `-f` flag carefully as it allows overwriting pushed history - -## Git Fix Secrets - -The `git fix secrets` command searches all git history (all branches and tags, or from a given commit) for files matching a glob pattern, and replaces every occurrence of a specified secret value with `****` (or a custom string via `-r`). It can optionally also redact the secret from commit messages (`-m`) and annotated tag messages (`-t`). If no commit is specified, `git getcommit` is used to resolve it (prompting interactively unless `-f`/forceable/fixable listing resolves it); pass `0` as the commit to start from the very first commit in history. - -### Usage - -```bash -# Search and preview matching commits/files without rewriting history -git fix secrets -d -g "**/*.env" -s "my-secret-value" - -# Also preview matches in commit messages and tag annotations -git fix secrets -d -m -t -g "**/*.env" -s "my-secret-value" - -# Redact the secret from history (asks for confirmation) -git fix secrets -g "**/*.env" -s "my-secret-value" - -# Redact from files, commit messages and tag annotations, starting from the very first commit -git fix secrets -m -t -g "**/*.env" -s "my-secret-value" 0 - -# Redact and push the rewritten history -git fix secrets -p -g "**/*.env" -s "my-secret-value" - -# Use a custom replacement string instead of the default **** -git fix secrets -g "**/*.env" -s "my-secret-value" -r "[REDACTED]" -``` - -### Options - -- `-f` - Force mode: allow overwriting pushed history -- `-p` - Push changes after rewriting history -- `-d` - Dry-run mode: list matching commits/files without applying changes or asking for confirmation -- `-g ` - Glob pattern of files to search (e.g. `**/*.env`, `config/*.json`) -- `-s ` - Literal secret value to redact -- `-r ` - Replacement string (default: `****`) -- `-m` - Also redact the secret from commit messages -- `-t` - Also redact the secret from annotated tag messages -- `` - Optional commit to start rewriting from; use `0` for the very first commit, or omit to be prompted via `git getcommit` (defaults to the entire history there) - -### Important Notes - -- The secret is matched and replaced literally (not as a regular expression). -- Binary files are skipped. -- The command uses `git filter-branch` to rewrite history; only shell tools (`sed`, `grep`) are used, no external interpreter is required. -- Use `-f` flag carefully as it allows overwriting pushed history. -- Rewriting history changes commit hashes; anyone with a clone of the repository will need to re-clone or hard-reset after a `-p` push. Rotate the leaked secret as well — redacting history does not undo any exposure that already happened. +Both rewrite history: use `-f` carefully, it allows overwriting pushed history. ## Contributing diff --git a/src/gitutils/devcontainer-feature.json b/src/gitutils/devcontainer-feature.json index 77370d58..cd694fe9 100644 --- a/src/gitutils/devcontainer-feature.json +++ b/src/gitutils/devcontainer-feature.json @@ -26,10 +26,10 @@ "ghcr.io/devcontainers/features/node:1": { "version": "lts" }, - "ghcr.io/tomgrv/devcontainer-features/common-utils:10": { + "ghcr.io/tomgrv/devcontainer-features/common-utils:11": { "utils": "jq dos2unix git-flow" }, - "ghcr.io/tomgrv/devcontainer-features/gitversion:10": {} + "ghcr.io/tomgrv/devcontainer-features/gitversion:11": {} }, "name": "Git Aliases", "version": "11.2.0", diff --git a/src/gitversion/README.md b/src/gitversion/README.md index a589d8ed..e596dae8 100644 --- a/src/gitversion/README.md +++ b/src/gitversion/README.md @@ -12,7 +12,7 @@ More information about GitVersion can be found on the [GitVersion GitHub page](h ```json "features": { - "ghcr.io/tomgrv/devcontainer-features/gitversion:10": {} + "ghcr.io/tomgrv/devcontainer-features/gitversion:11": {} } ``` diff --git a/src/gitversion/devcontainer-feature.json b/src/gitversion/devcontainer-feature.json index e4bd1d15..b9fbccda 100644 --- a/src/gitversion/devcontainer-feature.json +++ b/src/gitversion/devcontainer-feature.json @@ -8,7 +8,7 @@ "ghcr.io/devcontainers/features/docker-in-docker:3": { "moby": false }, - "ghcr.io/tomgrv/devcontainer-features/common-utils:10": {} + "ghcr.io/tomgrv/devcontainer-features/common-utils:11": {} }, "name": "GitVersion feature", "options": { diff --git a/src/larasets/README.md b/src/larasets/README.md index 837a4e61..d9c51bd4 100644 --- a/src/larasets/README.md +++ b/src/larasets/README.md @@ -8,7 +8,7 @@ This feature provides a set of settings and utilities for working with Laravel p ```json "features": { - "ghcr.io/tomgrv/devcontainer-features/larasets:10": {} + "ghcr.io/tomgrv/devcontainer-features/larasets:11": {} } ``` diff --git a/src/larasets/devcontainer-feature.json b/src/larasets/devcontainer-feature.json index 90a3d1aa..87d4b54c 100644 --- a/src/larasets/devcontainer-feature.json +++ b/src/larasets/devcontainer-feature.json @@ -40,7 +40,7 @@ "version": "8.4" }, "ghcr.io/dopplerhq/devcontainer-features/doppler-cli:1": {}, - "ghcr.io/tomgrv/devcontainer-features/common-utils:10": {} + "ghcr.io/tomgrv/devcontainer-features/common-utils:11": {} }, "name": "Laravel settings", "options": { diff --git a/src/minikube/README.md b/src/minikube/README.md index ce03cf77..72ce86db 100644 --- a/src/minikube/README.md +++ b/src/minikube/README.md @@ -12,7 +12,7 @@ More information about Minikube can be found on the [official Minikube GitHub re ```json "features": { - "ghcr.io/tomgrv/devcontainer-features/minikube:10": {} + "ghcr.io/tomgrv/devcontainer-features/minikube:11": {} } ``` diff --git a/src/minikube/devcontainer-feature.json b/src/minikube/devcontainer-feature.json index 5aeb6e13..afe7a067 100644 --- a/src/minikube/devcontainer-feature.json +++ b/src/minikube/devcontainer-feature.json @@ -13,7 +13,7 @@ "moby": false }, "ghcr.io/devcontainers/features/kubectl-helm-minikube:1": {}, - "ghcr.io/tomgrv/devcontainer-features/common-utils:10": {} + "ghcr.io/tomgrv/devcontainer-features/common-utils:11": {} }, "name": "Minikube feature", "options": {}, diff --git a/src/scripting/README.md b/src/scripting/README.md index aa35fd82..945fb2da 100644 --- a/src/scripting/README.md +++ b/src/scripting/README.md @@ -17,7 +17,7 @@ self-heals back to the standard. ```json "features": { - "ghcr.io/tomgrv/devcontainer-features/scripting:10": {} + "ghcr.io/tomgrv/devcontainer-features/scripting:11": {} } ``` diff --git a/src/scripting/devcontainer-feature.json b/src/scripting/devcontainer-feature.json index 2372367b..0a2e046a 100644 --- a/src/scripting/devcontainer-feature.json +++ b/src/scripting/devcontainer-feature.json @@ -2,7 +2,7 @@ "description": "Ensures a standard root setup.sh is present, installing zz-use + the common zz-* bundle and execing the repo's package.json \"main\" (or a root main.sh)", "id": "scripting", "dependsOn": { - "ghcr.io/tomgrv/devcontainer-features/common-utils:10": {} + "ghcr.io/tomgrv/devcontainer-features/common-utils:11": {} }, "name": "Scripting bootstrap (setup.sh)", "version": "11.2.0", diff --git a/src/scripting/stubs/.devcontainer/devcontainer.json b/src/scripting/stubs/.devcontainer/devcontainer.json index 7f2e7265..5d27ec39 100644 --- a/src/scripting/stubs/.devcontainer/devcontainer.json +++ b/src/scripting/stubs/.devcontainer/devcontainer.json @@ -1,5 +1,5 @@ { "features": { - "ghcr.io/tomgrv/devcontainer-features/scripting:10": {} + "ghcr.io/tomgrv/devcontainer-features/scripting:11": {} } } From 962cfea805a2af95c0b1a41d47e2c9182723f5f9 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 23 Oct 2026 16:14:03 +0000 Subject: [PATCH 3/3] =?UTF-8?q?docs(devcontainer-features-common-utils):?= =?UTF-8?q?=20=F0=9F=93=9D=20use=20current=20script=20names=20in=20the=20s?= =?UTF-8?q?kill=20doc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01YG4X8TdddFmqXDN6Exw4cb --- .github/skills/feature-common-utils/SKILL.md | 8 ++++---- .../stubs/.github/skills/feature-common-utils/SKILL.md | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/skills/feature-common-utils/SKILL.md b/.github/skills/feature-common-utils/SKILL.md index f1d167eb..8599ca84 100755 --- a/.github/skills/feature-common-utils/SKILL.md +++ b/.github/skills/feature-common-utils/SKILL.md @@ -15,16 +15,16 @@ Use this feature as a shared utility layer for shell-based automation across fea - `json-validate [options] ` - Validate JSON against a schema. - `json-normalize [options] ` - Normalize JSON order/format using schema rules. -- `zz-dist [options]` - Copy `zz-*` helpers to a target directory. +- `distribute-utils [options]` - Copy `zz-*` helpers to a target directory. - `zz-args` - Parse command-line arguments in shell scripts. - `zz-log` - Emit structured/colorized shell logs. -- `zz-json` - Read or manipulate JSON from shell scripts. +- `json-load` - Load JSON from a file or URL, tagging it with `$id`. ## Use For - JSON validation/normalization workflows (`json-validate`, `json-normalize`). -- Shell scripting with standardized logging, argument parsing, and prompts (`zz-log`, `zz-args`, `zz-ask`). -- Distributing shared helper scripts into project folders (`zz-dist`). +- Shell scripting with standardized logging, argument parsing, and prompts (`zz-log`, `zz-args`, `zz-prompt`). +- Distributing shared helper scripts into project folders (`distribute-utils`). ## Do Not Use For diff --git a/src/common-utils/stubs/.github/skills/feature-common-utils/SKILL.md b/src/common-utils/stubs/.github/skills/feature-common-utils/SKILL.md index f1d167eb..8599ca84 100644 --- a/src/common-utils/stubs/.github/skills/feature-common-utils/SKILL.md +++ b/src/common-utils/stubs/.github/skills/feature-common-utils/SKILL.md @@ -15,16 +15,16 @@ Use this feature as a shared utility layer for shell-based automation across fea - `json-validate [options] ` - Validate JSON against a schema. - `json-normalize [options] ` - Normalize JSON order/format using schema rules. -- `zz-dist [options]` - Copy `zz-*` helpers to a target directory. +- `distribute-utils [options]` - Copy `zz-*` helpers to a target directory. - `zz-args` - Parse command-line arguments in shell scripts. - `zz-log` - Emit structured/colorized shell logs. -- `zz-json` - Read or manipulate JSON from shell scripts. +- `json-load` - Load JSON from a file or URL, tagging it with `$id`. ## Use For - JSON validation/normalization workflows (`json-validate`, `json-normalize`). -- Shell scripting with standardized logging, argument parsing, and prompts (`zz-log`, `zz-args`, `zz-ask`). -- Distributing shared helper scripts into project folders (`zz-dist`). +- Shell scripting with standardized logging, argument parsing, and prompts (`zz-log`, `zz-args`, `zz-prompt`). +- Distributing shared helper scripts into project folders (`distribute-utils`). ## Do Not Use For