{"id":13602849,"url":"https://github.com/alanlivio/ps-sh-helpers","last_synced_at":"2025-04-11T13:31:36.852Z","repository":{"id":45588226,"uuid":"44196932","full_name":"alanlivio/bash-helpers","owner":"alanlivio","description":"Template to easily create multi-OS bash helpers for Windows (MSYS2/GitBash/WSL), Ubuntu, and Mac.","archived":false,"fork":false,"pushed_at":"2024-10-24T18:24:18.000Z","size":1401,"stargazers_count":11,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-26T03:42:03.856Z","etag":null,"topics":["bash","bash-alias","bash-profile","bash-script","bashrc","desktop-environment","dotfiles","dotfiles-setup","linux","macos","shell","windows","windows-terminal","windows-tweaks"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alanlivio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-10-13T18:38:11.000Z","updated_at":"2024-10-24T18:24:22.000Z","dependencies_parsed_at":"2023-10-23T10:31:18.997Z","dependency_job_id":"6dee0468-42ea-409c-a208-be4dee86cb11","html_url":"https://github.com/alanlivio/bash-helpers","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alanlivio%2Fbash-helpers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alanlivio%2Fbash-helpers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alanlivio%2Fbash-helpers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alanlivio%2Fbash-helpers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alanlivio","download_url":"https://codeload.github.com/alanlivio/bash-helpers/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223470287,"owners_count":17150526,"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","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":["bash","bash-alias","bash-profile","bash-script","bashrc","desktop-environment","dotfiles","dotfiles-setup","linux","macos","shell","windows","windows-terminal","windows-tweaks"],"created_at":"2024-08-01T18:01:40.527Z","updated_at":"2025-04-11T13:31:36.834Z","avatar_url":"https://github.com/alanlivio.png","language":"Shell","funding_links":[],"categories":["windows"],"sub_categories":[],"readme":"# ps-sh-helpers\n\n`ps-sh-helpers` is a template for creating your library PowerShell and Bash helpers.  It is very useful for Windows users that wants take the best of WSL Bash and integrate it with PowerShell.\n\n`ps-sh-helpers`  organize helpers in OS-dependent from `os/\u003cos\u003e.*` files and loads program-dependent from `programs/\u003cprogram\u003e.*` files. It is initialized at `.bashrc` by loading `init.sh` or at `PowerShell_profile.ps1` by loading `init.ps1` (see diagram below).\n\n```mermaid\n%%{init: {'theme':'dark'}}%%\nflowchart LR\n    bashrc[\".bashrc\"]\n    ps-init[\"init.ps1\"]\n    sh-init[\"init.sh\"]\n    program-dependent[\"\n        programs/[program].bash\n        ...\n    \"]\n    OS-dependent[\"\n        os/win.bash\n        os/ubu.bash\n        ...\n    \"]\n    \n    bashrc --\u003e |\"loads\"| sh-init\n    sh-init --\u003e |\"loads if program exists\"| program-dependent\n    sh-init --\u003e |\"loads if running at OS\"| OS-dependent\n    sh-init --\u003e |\"bash alias to each function at\"| ps-init\n```\n\n```mermaid\n%%{init: {'theme':'dark'}}%%\nflowchart LR\n    psprofile[\"profile.ps1\"]\n    ps-init[\"init.ps1\"]\n    sh-init[\"init.sh\"]\n    program-dependent[\"\n        programs/[program].ps1\n        ...\n    \"]\n    OS-dependent[\"\n        os/win.ps1\n        os/ubu.ps1\n        ...\n    \"]\n\n    psprofile--\u003e |\"loads\"| ps-init\n    ps-init --\u003e |\"loads if program exists\"| program-dependent\n    ps-init --\u003e |\"loads if running at OS\"| OS-dependent\n    ps-init --\u003e |\"bash alias to each function at\"| sh-init\n```\n\n## How to install\n\nYou can use the Bash commands below to fetch, install, and setup `ps-sh-helpers` to be loaded in your `.bashrc`:\n\n```bash\ngit clone https://github.com/alanlivio/ps-sh-helpers ~/.ps1-sh-helpers\necho \"source ~/.ps-sh-helpers/init.sh\" \u003e\u003e ~/.bashrc\n```\n\nYou can use the PowerShell commands below to fetch, install, and setup `ps-sh-helpers`  to be loaded in your `profile.ps1`:\n\n```ps1\ngit clone https://github.com/alanlivio/ps-sh-helpers ${env:userprofile}\\.ps1-sh-helpers\n$contentAdd = '. \"${env:userprofile}\\.ps-sh-helpers\\init.ps1\"\"'\n# to setup WindowsPowerShell\nSet-Content \"${env:userprofile}/Documents/WindowsPowerShell/Microsoft.PowerShell_profile.ps1\" $contentAdd \n```\n\nPay attention that to setup a PowerShell \u003e= 6, the last line should be:\n`Set-Content \"${env:userprofile}/Documents/PowerShell/profile.ps1\" $contentAdd`\n\n## References\n\nThis project takes inspiration from:\n\n- \u003chttps://github.com/Bash-it/bash-it\u003e\n- \u003chttps://github.com/milianw/shell-helpers\u003e\n- \u003chttps://github.com/wd5gnr/bashrc\u003e\n- \u003chttps://github.com/martinburger/bash-common-helpers\u003e\n- \u003chttps://github.com/jonathantneal/git-bash-helpers\u003e\n- \u003chttps://github.com/donnemartin/dev-setup\u003e\n- \u003chttps://github.com/aspiers/shell-env\u003e\n- \u003chttps://github.com/nafigator/bash-helpers\u003e\n- \u003chttps://github.com/TiSiE/BASH.helpers\u003e\n- \u003chttps://github.com/midwire/bash.env\u003e\n- \u003chttps://github.com/e-picas/bash-library\u003e\n- \u003chttps://github.com/awesome-windows11/windows11\u003e\n- \u003chttps://github.com/99natmar99/Windows-11-Fixer\u003e\n- \u003chttps://github.com/W4RH4WK/Debloat-windows-10/tree/master/scripts\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falanlivio%2Fps-sh-helpers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falanlivio%2Fps-sh-helpers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falanlivio%2Fps-sh-helpers/lists"}