From 4775de64eb752b90267114c0c1c95235820521f3 Mon Sep 17 00:00:00 2001 From: "Alex Pooley (@zuedev)" Date: Thu, 5 Feb 2026 16:03:08 +0000 Subject: add CLI validators in Node.js, PowerShell, and Bash Move validate.js to validators/nodejs/ and add equivalent validators for PowerShell and Bash. Each includes a README with usage instructions and requirements. --- README.md | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index aa7269e..c215a65 100644 --- a/README.md +++ b/README.md @@ -31,16 +31,26 @@ https://forgejo.zue.dev/zuedev/gitinfo/raw/branch/main/gitinfo.schema.json You can reference the schema in your `.gitinfo` file using the `$schema` property for editor autocompletion and validation support. -#### CLI Validator +#### CLI Validators -A command-line validator is included: +Command-line validators are available in multiple languages. See the [`validators/`](validators/) folder: + +**Node.js** ([readme](validators/nodejs/README.md)): ```bash -# Validate .gitinfo in current directory -node validate.js +node validators/nodejs/validate.js [path/to/.gitinfo] +``` -# Validate a specific file -node validate.js path/to/.gitinfo +**PowerShell** ([readme](validators/powershell/README.md)): + +```powershell +.\validators\powershell\Validate-GitInfo.ps1 [-Path path/to/.gitinfo] +``` + +**Bash** ([readme](validators/bash/README.md)) - requires `jq`: + +```bash +./validators/bash/validate.sh [path/to/.gitinfo] ``` ### Example `.gitinfo` File -- cgit v1.2.3