{"id":23379012,"url":"https://github.com/santisq/pstree","last_synced_at":"2026-05-02T17:01:16.551Z","repository":{"id":39868210,"uuid":"437389068","full_name":"santisq/PSTree","owner":"santisq","description":"Tree-like cmdlets for file system and registry exploration!","archived":false,"fork":false,"pushed_at":"2026-04-29T20:10:46.000Z","size":1726,"stargazers_count":107,"open_issues_count":1,"forks_count":5,"subscribers_count":5,"default_branch":"main","last_synced_at":"2026-04-29T20:32:46.980Z","etag":null,"topics":["csharp","filesystem","hierarchy","powershell","recursion","registry","tree","tree-structure"],"latest_commit_sha":null,"homepage":"https://www.powershellgallery.com/packages/PSTree","language":"C#","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/santisq.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-12-11T21:07:26.000Z","updated_at":"2026-04-29T20:08:34.000Z","dependencies_parsed_at":"2024-01-14T04:43:58.920Z","dependency_job_id":"8f4971da-a96f-4a02-9bcd-09e37b9bf94f","html_url":"https://github.com/santisq/PSTree","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/santisq/PSTree","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santisq%2FPSTree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santisq%2FPSTree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santisq%2FPSTree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santisq%2FPSTree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/santisq","download_url":"https://codeload.github.com/santisq/PSTree/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santisq%2FPSTree/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32542201,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T12:25:33.646Z","status":"ssl_error","status_checked_at":"2026-05-02T12:24:51.733Z","response_time":132,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["csharp","filesystem","hierarchy","powershell","recursion","registry","tree","tree-structure"],"created_at":"2024-12-21T19:16:10.612Z","updated_at":"2026-05-02T17:01:16.543Z","avatar_url":"https://github.com/santisq.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003ePSTree\u003c/h1\u003e\n\n\u003cdiv align=\"center\"\u003e\n   \u003csub\u003e\n\n   `tree` like cmdlets for PowerShell!\n   \u003c/sub\u003e\n\u003cbr/\u003e\u003cbr/\u003e\n\n[![build](https://github.com/santisq/PSTree/actions/workflows/ci.yml/badge.svg)](https://github.com/santisq/PSTree/actions/workflows/ci.yml)\n[![codecov](https://codecov.io/gh/santisq/PSTree/branch/main/graph/badge.svg?token=b51IOhpLfQ)](https://codecov.io/gh/santisq/PSTree)\n[![PowerShell Gallery](https://img.shields.io/powershellgallery/dt/PSTree?color=%23008FC7)](https://www.powershellgallery.com/packages/PSTree)\n[![LICENSE](https://img.shields.io/github/license/santisq/PSTree)](https://github.com/santisq/PSTree/blob/main/LICENSE)\n\n\u003c/div\u003e\n\nPSTree is a PowerShell module that extends tree-style navigation to both file systems and the Windows Registry through two versatile cmdlets. Designed for administrators, developers, and power users, it combines hierarchical visualization with practical insights like folder sizes and registry traversal.\n\n## Cmdlets\n\n- **`Get-PSTree`**  \n  Inspired by the classic [`tree` command](https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/tree), this cmdlet displays your file system in a structured hierarchy. It goes further by calculating folder sizes—both individual and recursive—making it a powerful tool for disk usage analysis.\n\n- **`Get-PSTreeRegistry`** *(Windows only)*  \n  Explore the Windows Registry with a tree-like view of keys and values. This cmdlet simplifies navigation and troubleshooting by presenting registry structures in an intuitive format, ideal for system configuration tasks.\n\n- **`Get-PSTreeStyle`**  \n  Retrieves the singleton `TreeStyle` instance used to customize the colored, hierarchical output of `Get-PSTree` and `Get-PSTreeRegistry`.  \n  Allows you to change colors for directories, files (including by extension), registry keys, and registry value kinds, as well as apply accents and control ANSI output rendering.\n\n## Documentation\n\n- Learn how to use the cmdlets in the [official documentation](./docs/en-US/).\n\n- To Customize output rendering, see [about_TreeStyle](./docs/en-US/about_TreeStyle.md).\n\n## Installation\n\n### Gallery\n\nThe module is available through the [PowerShell Gallery](https://www.powershellgallery.com/packages/PSTree):\n\n```powershell\nInstall-Module PSTree -Scope CurrentUser\n```\n\n### Source\n\n```powershell\ngit clone 'https://github.com/santisq/PSTree.git'\nSet-Location ./PSTree\n./build.ps1\n```\n\n## Requirements\n\n- **Windows PowerShell v5.1** or [**PowerShell 7+**](https://github.com/PowerShell/PowerShell).\n- **Windows OS** (for `Get-PSTreeRegistry`).\n\n## Usage\n\n### `Get-PSTree`\n\n#### Get the current directory tree with default parameters values\n\n```powershell\nPS \\\u003e Get-PSTree\n\n   Source: D:\\pwsh\\PSTree\n\nMode            Length Hierarchy\n----            ------ ---------\nd----         37.54 KB PSTree\n-a---          4.75 KB ├── .gitignore\n-a---        137.00  B ├── .markdownlint.json\n-a---          1.37 KB ├── build.ps1\n-a---         19.73 KB ├── CHANGELOG.md\n-a---          1.07 KB ├── LICENSE\n-a---         10.48 KB ├── README.md\nd----          0.00  B ├── .github\nd----          4.10 KB │   └── workflows\n-a---          4.10 KB │       └── ci.yml\nd----          4.18 KB ├── .vscode\n-a---        275.00  B │   ├── extensions.json\n-a---          1.39 KB │   ├── launch.json\n-a---          1.09 KB │   ├── settings.json\n-a---          1.43 KB │   └── tasks.json\nd----        491.24 KB ├── assets\n-a---         95.47 KB │   ├── ClassicStyles.png\n-a---         96.12 KB │   ├── FancyStyles.png\n-a---         66.76 KB │   ├── Get-PSTree.After.png\n-a---         63.05 KB │   ├── Get-PSTree.Before.png\n...\n```\n\n#### Excludes items starting with `.g`, `.v`, `.m` and `assets`\n\n```powershell\nPS \\\u003e Get-PSTree -Exclude .[gvm]*, assets\n\n   Source: D:\\pwsh\\PSTree\n\nMode            Length Hierarchy\n----            ------ ---------\nd----         32.65 KB PSTree\n-a---          1.37 KB ├── build.ps1\n-a---         19.73 KB ├── CHANGELOG.md\n-a---          1.07 KB ├── LICENSE\n-a---         10.48 KB ├── README.md\nd----          0.00  B ├── docs\nd----         36.81 KB │   └── en-US\n-a---          6.68 KB │       ├── about_TreeStyle.md\n-a---         16.90 KB │       ├── Get-PSTree.md\n-a---         11.84 KB │       ├── Get-PSTreeRegistry.md\n-a---          1.39 KB │       └── Get-PSTreeStyle.md\nd----         22.39 KB ├── module\n-a---         17.25 KB │   ├── PSTree.Format.ps1xml\n-a---          5.14 KB │   └── PSTree.psd1\nd----        106.22 KB ├── output\n-a---        106.22 KB │   ├── PSTree.3.0.0.nupkg\nd----          0.00  B │   ├── PSTree\nd----          0.00  B │   │   └── 3.0.0\nd----        277.39 KB │   └── TestResults\n-a---        249.51 KB │       ├── Coverage.xml\n...\n```\n\n#### Includes `.ps1` and `.cs` files, excludes `tools` folder and sorts items by size\n\n```powershell\nPS \\\u003e Get-PSTree -Depth 4 -Include *.ps1, *.cs -Exclude tools -SortBy Size\n\n   Source: D:\\pwsh\\PSTree\n\nMode            Length Hierarchy\n----            ------ ---------\nd----          1.37 KB PSTree\nd----         29.54 KB ├── tests\n-a---          9.29 KB │   ├── TreeStyle.tests.ps1\n-a---          7.35 KB │   ├── GetPSTreeRegistryCommand.tests.ps1\n-a---          7.33 KB │   ├── GetPSTreeCommand.tests.ps1\n-a---          2.46 KB │   ├── TreeFileSystemInfo_T.tests.ps1\n-a---          1.59 KB │   ├── TreeDirectory.tests.ps1\n-a---        804.00  B │   ├── FormattingInternals.tests.ps1\n-a---        745.00  B │   └── TreeFile.tests.ps1\n-a---          1.37 KB ├── build.ps1\nd----          0.00  B └── src\nd----          0.00  B     └── PSTree\nd----         13.73 KB         ├── Nodes\n-a---          3.61 KB         │   ├── TreeBase.cs\n-a---          2.55 KB         │   ├── TreeRegistryKey.cs\n-a---          2.30 KB         │   ├── TreeDirectory.cs\n-a---          1.43 KB         │   ├── TreeFileSystemInfo_T.cs\n-a---          1.15 KB         │   ├── TreeRegistryValue.cs\n-a---        967.00  B         │   ├── TreeSummary.cs\n-a---        714.00  B         │   ├── TreeFileSystemInfo.cs\n...\n```\n\n#### Get the recursive size of the folders\n\n```powershell\nPS \\\u003e Get-PSTree .\\src -Depth 2 -Directory -RecursiveSize\n\n   Source: D:\\pwsh\\PSTree\\src\n\nMode            Length Hierarchy\n----            ------ ---------\nd----          1.15 MB src\nd----          1.15 MB └── PSTree\nd----        732.37 KB     ├── bin\nd----          7.81 KB     ├── CodeAnalysis\nd----         13.17 KB     ├── Commands\nd----          6.51 KB     ├── Comparers\nd----          7.50 KB     ├── Extensions\nd----        331.00  B     ├── Interfaces\nd----        948.00  B     ├── Internal\nd----         13.73 KB     ├── Nodes\nd----        374.92 KB     ├── obj\nd----          2.35 KB     ├── Registry\nd----         12.53 KB     └── Style\n```\n\n#### Get the top N items at each level using `-Top`\n\n```powershell\nPS \\\u003e Get-PSTree .\\src\\PSTree -Top 3\n\n   Source: D:\\pwsh\\PSTree\\src\\PSTree\n\nMode            Length Hierarchy\n----            ------ ---------\nd----          1.15 MB PSTree\nd----        732.37 KB ├── bin\nd----        732.37 KB │   └── Debug\nd----        502.91 KB │       ├── net472\nd----        229.46 KB │       └── net8.0\nd----        374.92 KB ├── obj\nd----        286.14 KB │   ├── Debug\nd----        198.00 KB │   │   ├── net8.0\nd----         88.14 KB │   │   └── net472\n-a---         79.42 KB │   ├── project.assets.json\n-a---          4.02 KB │   ├── project.nuget.cache\n-----          5.34 KB │   └── [+3 files]\nd----         13.73 KB ├── Nodes\n-a---          3.61 KB │   ├── TreeBase.cs\n-a---          2.55 KB │   ├── TreeRegistryKey.cs\n-a---          2.30 KB │   ├── TreeDirectory.cs\n-----          5.27 KB │   └── [+6 files]\n-----         52.69 KB └── [+8 folders, +1 file]\n```\n\n### `Get-PSTreeRegistry`\n\n#### Get the tree-view of `HKCU:\\System`\n\n```powershell\nPS \\\u003e Get-PSTreeRegistry HKCU:\\System -Depth 2\n\n   Hive: HKEY_CURRENT_USER\\System\n\nKind         Hierarchy\n----         ---------\nRegistryKey  System\nRegistryKey  ├── GameConfigStore\nDWord        │   ├── GameDVR_Enabled\nDWord        │   ├── GameDVR_FSEBehaviorMode\nBinary       │   ├── Win32_AutoGameModeDefaultProfile\nBinary       │   ├── Win32_GameModeRelatedProcesses\nDWord        │   ├── GameDVR_HonorUserFSEBehaviorMode\nDWord        │   ├── GameDVR_DXGIHonorFSEWindowsCompatible\nDWord        │   ├── GameDVR_EFSEFeatureFlags\nRegistryKey  │   ├── Parents\nRegistryKey  │   └── Children\nRegistryKey  └── CurrentControlSet\nRegistryKey      ├── Policies\nRegistryKey      └── Control\n```\n\n#### Filter Out Specific Items from the `HKCU:\\System` Tree\n\n```powershell\nPS \\\u003e Get-PSTreeRegistry HKCU:\\System -Depth 2 -Exclude CurrentControlSet, GameDV*\n\n   Hive: HKEY_CURRENT_USER\\System\n\nKind         Hierarchy\n----         ---------\nRegistryKey  System\nRegistryKey  └── GameConfigStore\nBinary           ├── Win32_AutoGameModeDefaultProfile\nBinary           ├── Win32_GameModeRelatedProcesses\nRegistryKey      ├── Parents\nRegistryKey      └── Children\n```\n\n#### Select GameDVR-Related Values in the `HKCU:\\System` Tree\n\n```powershell\nPS \\\u003e Get-PSTreeRegistry HKCU:\\System -Depth 2 -Include GameDVR*\n\n   Hive: HKEY_CURRENT_USER\\System\n\nKind         Hierarchy\n----         ---------\nRegistryKey  System\nRegistryKey  └── GameConfigStore\nDWord            ├── GameDVR_Enabled\nDWord            ├── GameDVR_FSEBehaviorMode\nDWord            ├── GameDVR_HonorUserFSEBehaviorMode\nDWord            ├── GameDVR_DXGIHonorFSEWindowsCompatible\nDWord            └── GameDVR_EFSEFeatureFlags\n```\n\n#### Show only Keys\n\n```powershell\nPS \\\u003e Get-PSTreeRegistry HKCU:\\System -Depth 2 -KeysOnly\n\n   Hive: HKEY_CURRENT_USER\\System\n\nKind         Hierarchy\n----         ---------\nRegistryKey  System\nRegistryKey  ├── GameConfigStore\nRegistryKey  │   ├── Parents\nRegistryKey  │   └── Children\nRegistryKey  └── CurrentControlSet\nRegistryKey      ├── Policies\nRegistryKey      └── Control\n```\n\n#### Get the value of a `TreeRegistryValue` item\n\n```powershell\nPS \\\u003e $items = Get-PSTreeRegistry HKCU:\\Environment\\ -Depth 2\nPS \\\u003e $values = $items | Where-Object { $_ -is [PSTree.Nodes.TreeRegistryValue] }\nPS \\\u003e $values\n\n   Hive: HKEY_CURRENT_USER\\Environment\n\nKind         Hierarchy\n----         ---------\nExpandString ├── Path\nExpandString ├── TEMP\nExpandString └── TMP\n\nPS \\\u003e $values[1].GetValue()\nC:\\Users\\User\\AppData\\Local\\Temp\n```\n\n## Changelog\n\n- [CHANGELOG.md](CHANGELOG.md)\n- [Releases](https://github.com/santisq/PSTree/releases)\n\n## Contributing\n\nContributions are welcome, if you wish to contribute, fork this repository and submit a pull request with the changes.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsantisq%2Fpstree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsantisq%2Fpstree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsantisq%2Fpstree/lists"}