{"id":14063866,"url":"https://github.com/LxLeChat/PSFLowChart","last_synced_at":"2025-07-29T16:34:31.723Z","repository":{"id":76024772,"uuid":"217827003","full_name":"LxLeChat/PSFLowChart","owner":"LxLeChat","description":"Create a PS1 script FlowChart","archived":false,"fork":false,"pushed_at":"2020-12-02T15:10:24.000Z","size":1627,"stargazers_count":23,"open_issues_count":12,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-08-13T07:05:37.143Z","etag":null,"topics":["chart","diagram","flowchart","powershell","powershell-module","psgraph"],"latest_commit_sha":null,"homepage":"","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/LxLeChat.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2019-10-27T08:40:18.000Z","updated_at":"2024-07-18T03:59:06.000Z","dependencies_parsed_at":"2024-02-07T17:05:51.720Z","dependency_job_id":"e576dea0-7ccb-4fc3-a04c-5a6a1b75a716","html_url":"https://github.com/LxLeChat/PSFLowChart","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LxLeChat%2FPSFLowChart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LxLeChat%2FPSFLowChart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LxLeChat%2FPSFLowChart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LxLeChat%2FPSFLowChart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LxLeChat","download_url":"https://codeload.github.com/LxLeChat/PSFLowChart/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228032913,"owners_count":17858914,"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":["chart","diagram","flowchart","powershell","powershell-module","psgraph"],"created_at":"2024-08-13T07:03:32.825Z","updated_at":"2024-12-04T02:30:37.220Z","avatar_url":"https://github.com/LxLeChat.png","language":"PowerShell","funding_links":[],"categories":["PowerShell"],"sub_categories":[],"readme":"## update\nCurrently Working on a new version ...  !\nGo visit the new repo, as i wont maintain this one anymore. https://github.com/LxLeChat/FlowChartCore\nthe new repo is csharp based. So the cmdlets are faster. and more works as been done on the new version.\n\n# PSFLowChart\n\nPowershell Module to create Flowchart diagram of PowerShell scripts.\n\nPlease keep in mind this project is still in draft, still lot of things done manually, no lint/unit tests available yet, etc...\n\n## How it works\nThe script parses a script AST, and create a list of ``nodes`` idenfying foreach/if/switch/loop statements. The output is a tree of nodes (parent, children etc... ). For Drawing, the script depends on PSGraph.\n\n## Getting Started\n\n```powershell\n# Install the module the module from the PowerShell Gallery\nInstall-Module -Name PsFlowChart -Repository PSGallery -Scope CurrentUser\n```\n\n## Usage\n\n### Explore nodes\n\n```powershell\n# Find nodes of a PowerShell script\n$x = Find-FCNode -File .\\basic_example_1.ps1\n$x\n\nType        : If\nStatement   : If ( $a -eq 10 )\nDescription :\nChildren    : {ForeachNode, ElseNode}\nParent      :\nDepth       : 1\nFile        : C:\\basic_example_1.ps1\n```\n\nExplore the object children: `$x.Children`\n\n### Finding and Using Description\n\nYou can use `-FindDescription` with `-KeyWord MyCustomKeyWord` on `Find-FCNode` or `-DescriptionAsLabel` on `New-FCGraph`... \n\nBy default, the script will try to find the first comment right after a statement.\nThen it validates the comment againt a regex with a special keywoard (you can define it... ), wich by default is `Description`\n\nValid Comment for identification:\n\n```powershell\nIf ($a) {\n# Description: this is a valid description\n}\n```\n\nNon-valid Comment, unless you specify that the keyword is `Ahahah`:\n\n```powershell\nIf ($a) {\n# Ahahah: this is a valid description\n}\n```\n\n### Setting description\n\nYou can use `Set-FCNodeDescription -recurse` to set custom description recursively. By default the description is empty, unlsess you use `-Findescription` on `Find-FCNode`\n\n```powershell\nPS \u003e $x=Find-FCNode .\\Code\\Tests\\basic_example_1.ps1 | Set-FCNodeDescription -Recurse\nSet description for If ( $a -eq 10 ): DescribeMe\nSet description for Foreach ( $File in $CollectionsOfFiles ): the foreach\nSet description for ProcessBlock: some code\nSet description for Else From If ( $a -eq 10 ):\nSet description for ProcessBlock: some lines\n\nPS C:\\Temp\\FLowChart-test_new_base_parsing\u003e $x\nType        : If\nStatement   : If ( $a -eq 10 )\nDescription : DescribeMe\nChildren    : {ForeachNode, ElseNode}\nParent      :\nDepth       : 1\nFile        : C:\\Code\\Tests\\basic_example_1.ps1\n\nPS C:\\Temp\\FLowChart-test_new_base_parsing\u003e $x[0].Children\nType        : Foreach\nStatement   : Foreach ( $File in $CollectionsOfFiles )\nDescription : the foreach\nChildren    : {BlockProcess}\nParent      : IfNode\nDepth       : 2\nFile        : C:\\Code\\Tests\\basic_example_1.ps1\n\nType        : Else\nStatement   : Else From If ( $a -eq 10 )\nDescription : Else From If ( $a -eq 10 )\nChildren    : {BlockProcess}\nParent      : IfNode\nDepth       : 2\nFile        : C:\\Code\\Tests\\basic_example_1.ps1\n```\n\n### Drawing the flowchart\n\n```powershell\nFind-FCNode -File .\\basic_example_1.ps1 | New-FCGraph\n```\nResult :\n![plopy](basic_example_1.png)\n\n## Contributions\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLxLeChat%2FPSFLowChart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FLxLeChat%2FPSFLowChart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLxLeChat%2FPSFLowChart/lists"}