{"id":28377384,"url":"https://github.com/equilaterus/cli-tools-powershell","last_synced_at":"2025-10-14T06:07:58.271Z","repository":{"id":55015267,"uuid":"211589183","full_name":"equilaterus/cli-tools-powershell","owner":"equilaterus","description":"Equilaterus CLI-Tools for PowerShell","archived":false,"fork":false,"pushed_at":"2021-01-15T04:43:35.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"dev","last_synced_at":"2025-06-26T18:44:04.981Z","etag":null,"topics":["cli","powershell","utils"],"latest_commit_sha":null,"homepage":null,"language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/equilaterus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-09-29T02:18:42.000Z","updated_at":"2021-01-15T04:08:22.000Z","dependencies_parsed_at":"2022-08-14T09:10:19.621Z","dependency_job_id":null,"html_url":"https://github.com/equilaterus/cli-tools-powershell","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/equilaterus/cli-tools-powershell","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/equilaterus%2Fcli-tools-powershell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/equilaterus%2Fcli-tools-powershell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/equilaterus%2Fcli-tools-powershell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/equilaterus%2Fcli-tools-powershell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/equilaterus","download_url":"https://codeload.github.com/equilaterus/cli-tools-powershell/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/equilaterus%2Fcli-tools-powershell/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279018119,"owners_count":26086280,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","powershell","utils"],"created_at":"2025-05-30T01:04:51.286Z","updated_at":"2025-10-14T06:07:58.223Z","avatar_url":"https://github.com/equilaterus.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Equilaterus CLI-Tools for Powershell\n\nEffortless Powershell Scripting!\n\n* Automatically handles the start location path avoiding errors when the script is located on subfolders or when it's called from different paths.\n\n* By default errors do not close command line windows, so you can display better feedback to your users.\n\n* Great to write CLI utils for your projects without needing to write additional code.\n\n* One script to rule them all: Powershell is [Multiplatform](https://github.com/PowerShell/PowerShell)!\n\n## Instructions\n\n1. You can download the latest stable version using the following PowerShell command:\n\n   ```powershell\n   Invoke-WebRequest -Uri https://raw.githubusercontent.com/equilaterus/cli-tools-powershell/master/_EquilaterusCLI.ps1 -OutFile '_EquilaterusCLI.ps1'\n   ```\n\n2. Under the same folder where **_EquilaterusCLI.ps1** was downloaded, create a ps1 file using the following snippet.\n\n   ```powershell\n   . $PSScriptRoot/_EquilaterusCLI.ps1\n   \n   Function Invoke-Script {\n       # Add your commands here\n       # ...\n   }\n   \n   Start-Cli -Title 'My Title' -Filename 'FileToSearch'\n   \n   ```\n\n3. Run your script!\n\n\n## Examples\n\nSuppose that your util files are located under *utils/* folder, the correct script to *Run npm install* will be something like this:\n\n```powershell\n. $PSScriptRoot/_EquilaterusCLI.ps1\n\nFunction Invoke-Script {\n    npm install\n}\n\n# You can omit -AlternativePath as '..' is its default value\nStart-Cli -Title 'Install JS APP' -Filename 'package.json' -AlternativePath '..' \n\n```\n\n### More examples\n\n* Create a script to [Install Ruby Gems and Bundler](https://github.com/equilaterus/wikilaterus/blob/master/_utils/install-site.ps1)\n\n* Create a script to [Run a Docker Compose](https://github.com/equilaterus/base-docker-images/blob/master/utils/run-prod.ps1)\n\n\u003e **Summarizing:** Define your script to automate any given task. Add *Filename* parameter so that Equilaterus CLI knows exactly where the execution should start.\n\n\n## Included utilities\n\n### Read-Json-File\n\nGiven a path loads a file as a Json into an object.\n\n```powershell\n### JsonFile.json\n[\n  {\n    \"Name\": \"Hello\",\n    \"Active\": true\n  },\n  {\n    \"Name\": \"World\",\n    \"Active\": false\n  }\n]\n\n### SampleReadJson.ps1\n. $PSScriptRoot/_EquilaterusCLI.ps1\n\nFunction Invoke-Script {\n    $users = Read-Json-File -Path './JsonFile.json'\n    foreach ($user in $users) {\n        Write-Host $user.Name\n        Write-Host $user.Active\n    }\n}\n\nStart-Cli -Title 'SampleReadJson' -Filename 'JsonFile.json'\n```\n\n## Start-Cli params\n\n* **Title**: short text describing your task. \n* **Filename**: Equilaterus CLI will lookup for this file to set the location where the script execution should start.\n* **AlternativePath**: by default it is *'..'*. If the **Filename** wasn't found in the current location, the script will loockup in this path.\n\n  \u003e It's common to create your scripts under a folder in your repo (usually *utils/*, *scripts/* or *tools*), *Filename* and *AlternativePath* will grant that the script is always executed in the desired folder no matter where the execution started or where your script is located.\n\n* **MaxPopsOnExit**: by default it is 10. If you are doing additional *push*'s to different locations you can adjust this parameter to ensure that your script will end on the original location.\n\n* **SkipIntro**: by default is false. Hides the intro information.\n\n* **SkipLicense**: by default is false. Hides the license information that appears on the script execution.\n\n## More info\n\n* Installing and using Powershell: [See Wikilaterus entry](https://equilaterus.github.io/wikilaterus/wiki/Programming-Powershell.html) ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fequilaterus%2Fcli-tools-powershell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fequilaterus%2Fcli-tools-powershell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fequilaterus%2Fcli-tools-powershell/lists"}