{"id":15659432,"url":"https://github.com/kakkun61/ghcman","last_synced_at":"2025-09-25T09:40:10.306Z","repository":{"id":137888558,"uuid":"221095211","full_name":"kakkun61/ghcman","owner":"kakkun61","description":"Switch GHC and Cabal quickly on PowerShell","archived":false,"fork":false,"pushed_at":"2024-08-01T09:56:16.000Z","size":124,"stargazers_count":21,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-30T08:14:17.406Z","etag":null,"topics":["cabal","ghc","hacktoberfest","haskell","powershell","windows"],"latest_commit_sha":null,"homepage":"https://www.powershellgallery.com/packages/ghcman/","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kakkun61.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","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},"funding":{"github":"kakkun61"}},"created_at":"2019-11-12T00:25:21.000Z","updated_at":"2024-08-01T09:56:19.000Z","dependencies_parsed_at":"2024-08-02T21:11:54.371Z","dependency_job_id":null,"html_url":"https://github.com/kakkun61/ghcman","commit_stats":null,"previous_names":["kakkun61/ghcups"],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kakkun61%2Fghcman","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kakkun61%2Fghcman/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kakkun61%2Fghcman/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kakkun61%2Fghcman/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kakkun61","download_url":"https://codeload.github.com/kakkun61/ghcman/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251666361,"owners_count":21624298,"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":["cabal","ghc","hacktoberfest","haskell","powershell","windows"],"created_at":"2024-10-03T13:16:51.767Z","updated_at":"2025-09-25T09:40:05.256Z","avatar_url":"https://github.com/kakkun61.png","language":"PowerShell","funding_links":["https://github.com/sponsors/kakkun61"],"categories":[],"sub_categories":[],"readme":"# ghcman; ghcup for PowerShell on Windows\r\n\r\n[![GitHub Actions: test](https://github.com/kakkun61/ghcman/workflows/test/badge.svg)](https://github.com/kakkun61/ghcman/actions?query=workflow%3Atest) [![GitHub Actions: install](https://github.com/kakkun61/ghcman/workflows/install/badge.svg)](https://github.com/kakkun61/ghcman/actions?query=workflow%3Ainstall) [![GitHub Actions: lint](https://github.com/kakkun61/ghcman/workflows/lint/badge.svg)](https://github.com/kakkun61/ghcman/actions?query=workflow%3Alint) [![PowerShell Gallery](https://img.shields.io/powershellgallery/p/ghcman.svg)](https://www.powershellgallery.com/packages/ghcman/) [![Join the chat at https://gitter.im/ghcman/community](https://badges.gitter.im/ghcman/community.svg)](https://gitter.im/ghcman/community?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge) [![Sponsor](https://img.shields.io/badge/Sponsor-%E2%9D%A4-red?logo=GitHub)](https://github.com/sponsors/kakkun61)\r\n\r\n## Install\r\n\r\nDownload and load ghcman to PowerShell.\r\n\r\n```powershell\r\n\u003e Install-Module ghcman\r\n\u003e Import-Module ghcman\r\n```\r\n\r\nConfirm its info.\r\n\r\n```powershell\r\n\u003e Get-Module ghcman\r\n\r\nModuleType Version    Name     ExportedCommands\r\n---------- -------    ----     ----------------\r\nManifest   1.0        ghcman   {Clear-Cabal, Clear-Ghc, Install-Cabal, Install-Ghc...}\r\n```\r\n\r\nShow help. Add the `-Full` option for more details.\r\n\r\n```\r\n\u003e Get-Help Set-Ghc\r\n\r\nNAME\r\n    Set-Ghc\r\n\r\nSYNOPSIS\r\n    Sets the version or variant of GHC to the Path environment variable of the current session.\r\n\r\n\r\nSYNTAX\r\n    Set-Ghc [-Ghc] \u003cString\u003e [\u003cCommonParameters\u003e]\r\n\r\n\r\nDESCRIPTION\r\n\r\n\r\nRELATED LINKS\r\n\r\n\r\n```\r\n\r\n## How to use\r\n\r\nRetrieve new versions data.\r\n\r\n```powershell\r\n\u003e Update-GhcmanVersionFile\r\n```\r\n\r\nInstall a specified GHC and set it to `$Env:Path`.\r\n\r\n```powershell\r\n\u003e Install-Ghc 9.2.1\r\n\u003e Set-Ghc 9.2.1\r\n\u003e ghc --version\r\nThe Glorious Glasgow Haskell Compilation System, version 9.2.1\r\n```\r\n\r\nInstall a specified Cabal and set it to `$Env:Path`.\r\n\r\n```powershell\r\n\u003e Install-Cabal 3.4.0.0\r\n\u003e Set-Cabal 3.4.0.0\r\n\u003e cabal --version\r\ncabal-install version 3.4.0.0\r\ncompiled using version 3.4.0.0 of the Cabal library\r\n```\r\n\r\nCheck which versions are installed or not.\r\n\r\n```powershell\r\n\u003e Get-Ghc -HumanReadable\r\n9.2.1    S C:\\Users\\kazuki\\AppData\\Roaming\\ghcman\\ghc-9.2.1\r\n9.0.1    S\r\n8.10.6   S\r\n8.10.5   S\r\n8.10.4   S\r\n8.10.3   S\r\n8.10.2   S\r\n8.10.1   S\r\n8.8.4    S\r\n8.8.3    S\r\n8.8.2    S\r\n8.8.1    S\r\n8.6.5    S\r\n8.6.4    S\r\n8.6.3    S\r\n8.6.2    S\r\n8.6.1    S\r\n8.4.4    S\r\n8.4.3    S\r\n8.4.2    S\r\n8.4.1    S\r\n8.2.2    S\r\n8.2.1    S\r\n8.0.2    S\r\n8.0.1    S\r\nS: supported\r\n```\r\n\r\n```powershell\r\n\u003e Get-Cabal -HumanReadable\r\n3.4.0.0  S C:\\Users\\kazuki\\AppData\\Roaming\\ghcman\\cabal-3.4.0.0\r\n3.2.0.0  S\r\n3.0.0.0  S\r\n2.4.1.0  S\r\n2.4.0.0  S\r\n2.2.0.0  S\r\n2.0.0.1  S\r\n2.0.0.0  S\r\nS: supported\r\n```\r\n\r\n## Configuration\r\n\r\n_ghcman.yaml_ is a local configuration file. ghcman searches it in the current directory and its parents recursively until _`$Env:USERPROFILE`_ or the root. A user global configuration file is _`$Env:APPDATA`\\ghcman\\config.yaml_, and a system global one is _`$Env:ProgramData`\\ghcman\\config.yaml_.\r\n\r\nThis is a sample of _ghcman.yaml_ and _config.yaml_.\r\n\r\n```yaml\r\nghc:\r\n  HEAD: somewhere\\directory\\which\\contains\\ghc\r\n  fix-some-issue: other\\directory\r\n\r\ncabal:\r\n  HEAD: somewhere\\directory\\which\\contains\\cabal\r\n```\r\n\r\n`Write-GhcmanConfigTemplate` function creates _ghcman.yaml_ with the template.\r\n\r\nWhen you want to check the loaded configuration, use `Get-GhcmanConfig` function.\r\n\r\nYou can set _`$Env:GhcmanInstall`_ to specify a directory where GHCs and Cabals are installed. Its default is _`$Env:APPDATA`\\ghcman_.\r\n\r\n- _.\\ghcman.yaml_\r\n  - local configuration\r\n- _`$Env:APPDATA`\\ghcman\\config.yaml_\r\n  - user global configuration\r\n- _`$Env:ProgramData`\\ghcman\\config.yaml_\r\n  - system global configuration\r\n- _`$Env:GhcmanInstall`_\r\n  - installation directory\r\n  - default: _`$Env:APPDATA`\\ghcman_\r\n\r\n## Functions\r\n\r\n- `Install-Ghc`\r\n  - Installs the specified GHC.\r\n- `Uninstall-Ghc`\r\n  - Uninstalls the specified GHC.\r\n- `Set-Ghc`\r\n  - Sets the version or variant of GHC to the Path environment variable of the current session.\r\n- `Get-Ghc`\r\n  - Gets the GHCs which are specified by the ghcman.yaml and config.yaml, which is installed by the Ghcman and which is not yet installed.\r\n- `Clear-Ghc`\r\n  - Removes all GHC values from the Path environment variable of the current session.\r\n- `Install-Cabal`\r\n  - Installs the specified Cabal.\r\n- `Uninstall-Cabal`\r\n  - Uninstalls the specified Cabal.\r\n- `Set-Cabal`\r\n  - Sets the version or variant of Cabal to the Path environment variable of the current session.\r\n- `Get-Cabal`\r\n  - Gets the Cabals which is specified by the ghcman.yaml and config.yaml, which is installed by the Ghcman and which is not yet installed.\r\n- `Clear-Cabal`\r\n  - Removes all Cabal values from the Path environment variable of the current session.\r\n- `Write-GhcmanConfigTemplate`\r\n  - Creates the ghcman.yaml with the default contents.\r\n- `Get-GhcmanConfig`\r\n  - Gets the loaded configurations which are re-generated to YAML.\r\n- `Update-GhcmanVersionFile`\r\n  - Download version data.\r\n\r\n## Note\r\n\r\nPreviously this was called “ghcups”.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkakkun61%2Fghcman","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkakkun61%2Fghcman","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkakkun61%2Fghcman/lists"}