Skip to content

Commit 26e490b

Browse files
AndreaV-Lsiclaude
andcommitted
docs: Update CLAUDE.md for v9.1.0 and Invoke-RepoHerd
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 4d980e4 commit 26e490b

1 file changed

Lines changed: 18 additions & 11 deletions

File tree

CLAUDE.md

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,22 @@
22

33
## Project Overview
44

5-
PowerShell-based dependency management tool that checks out multiple Git repositories to specified versions. Module architecture: `RepoHerd.psm1` (functions) + `RepoHerd.ps1` (entry point). Version 9.0.0, by LS Instruments AG.
5+
PowerShell-based dependency management tool that checks out multiple Git repositories to specified versions. Module architecture: `RepoHerd.psm1` (functions + `Invoke-RepoHerd` entry point) + `RepoHerd.ps1` (thin wrapper for script-based usage). Version 9.1.0, published on PowerShell Gallery, by LS Instruments AG.
66

77
## Running the Tool
88

99
```powershell
10-
.\RepoHerd.ps1 # defaults to dependencies.json
11-
.\RepoHerd.ps1 -InputFile "path/to/deps.json" # custom config
12-
.\RepoHerd.ps1 -DryRun # preview without executing
13-
.\RepoHerd.ps1 -EnableDebug -EnableErrorContext # full debug output
14-
.\RepoHerd.ps1 -OutputFile result.json # structured JSON output
10+
# Via PowerShell Gallery (recommended)
11+
Install-Module RepoHerd
12+
Invoke-RepoHerd # defaults to dependencies.json in CWD
13+
Invoke-RepoHerd -InputFile "path/to/deps.json" # custom config
14+
Invoke-RepoHerd -DryRun # preview without executing
15+
Invoke-RepoHerd -EnableDebug -EnableErrorContext # full debug output
16+
Invoke-RepoHerd -OutputFile result.json # structured JSON output
17+
18+
# Via script (manual download / cloned repo)
19+
.\RepoHerd.ps1 # defaults to dependencies.json in script dir
20+
.\RepoHerd.ps1 -InputFile "path/to/deps.json"
1521
```
1622

1723
Key parameters: `-InputFile`, `-CredentialsFile`, `-DryRun`, `-EnableDebug`, `-DisableRecursion`, `-MaxDepth` (default 5), `-ApiCompatibility` (Strict|Permissive), `-DisablePostCheckoutScripts`, `-EnableErrorContext`, `-OutputFile` (structured JSON results)
@@ -47,8 +53,8 @@ There are 17 test cases across 16 test configs covering SemVer, Agnostic, API in
4753

4854
## Architecture
4955

50-
- **Module**: `RepoHerd.psm1` — all function definitions (~35 functions)
51-
- **Entry point**: `RepoHerd.ps1`param block, module import, initialization, main execution
56+
- **Module**: `RepoHerd.psm1` — all function definitions (~36 functions) including `Invoke-RepoHerd` (main entry point)
57+
- **Script wrapper**: `RepoHerd.ps1`thin wrapper that imports the module and delegates to `Invoke-RepoHerd` (defaults to script directory for paths)
5258
- **Manifest**: `RepoHerd.psd1` — module metadata, exported functions
5359
- **Two dependency resolution modes**: SemVer (recommended, automatic version resolution) and Agnostic (explicit tag-based)
5460
- **Configuration**: JSON files — `dependencies.json` for repos, `git_credentials.json` for SSH keys
@@ -71,14 +77,15 @@ There are 17 test cases across 16 test configs covering SemVer, Agnostic, API in
7177
- **Logging**: use `Write-Log` with levels: Info, Warning, Error, Debug, Verbose
7278
- **Error handling**: wrap operations in `Invoke-WithErrorContext -Context "description" -ScriptBlock { ... }`
7379
- **Module state**: `$script:` prefix for module-scoped variables (e.g., `$script:RepositoryDictionary`, `$script:DryRun`)
74-
- **Initialization**: call `Initialize-RepoHerd` to set module state from entry point parameters
80+
- **Initialization**: `Initialize-RepoHerd` sets module state; called internally by `Invoke-RepoHerd`
81+
- **Publishing**: before any `Publish-Module`, always test the full `Install-Module` -> `Invoke-RepoHerd` round-trip
7582
- **CHANGELOG**: follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) format with SemVer versioning
7683

7784
## Project Structure
7885

7986
```
80-
RepoHerd.ps1 # Entry point script (~230 lines)
81-
RepoHerd.psm1 # Module with all functions (~2520 lines)
87+
RepoHerd.ps1 # Script wrapper (~70 lines), delegates to Invoke-RepoHerd
88+
RepoHerd.psm1 # Module with all functions including Invoke-RepoHerd (~2750 lines)
8289
RepoHerd.psd1 # Module manifest
8390
CHANGELOG.md # Version history
8491
README.md # Comprehensive user documentation

0 commit comments

Comments
 (0)