{"id":26410810,"url":"https://github.com/chadnpc/psimport","last_synced_at":"2026-02-13T18:32:06.574Z","repository":{"id":153135933,"uuid":"620029561","full_name":"chadnpc/PsImport","owner":"chadnpc","description":"Import functions from other scripts.","archived":false,"fork":false,"pushed_at":"2025-01-24T23:03:53.000Z","size":369,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-16T06:57:09.390Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.powershellgallery.com/packages/PsImport/","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/chadnpc.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,"publiccode":null,"codemeta":null}},"created_at":"2023-03-27T22:21:40.000Z","updated_at":"2025-10-06T09:41:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"29de46da-1aa9-428b-83e6-8b2664cee6dd","html_url":"https://github.com/chadnpc/PsImport","commit_stats":null,"previous_names":["chadnpc/psimport","alainqtec/psimport"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/chadnpc/PsImport","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chadnpc%2FPsImport","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chadnpc%2FPsImport/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chadnpc%2FPsImport/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chadnpc%2FPsImport/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chadnpc","download_url":"https://codeload.github.com/chadnpc/PsImport/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chadnpc%2FPsImport/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29414278,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T06:24:03.484Z","status":"ssl_error","status_checked_at":"2026-02-13T06:23:12.830Z","response_time":78,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":[],"created_at":"2025-03-17T20:19:27.397Z","updated_at":"2026-02-13T18:32:06.556Z","avatar_url":"https://github.com/chadnpc.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [**PsImport**](https://www.powershellgallery.com/packages/PsImport)\n\nA PowerShell module for importing functions.\n\n\u003c!-- \u003e Note: If you just want to import a nested module then add\n\u003e `using module /relative/path/to/module.psm1` at the top of your rootmodule;\n\u003e thats it! This module is only useful when working with powershell projects\n\u003e where functions are spread across multiple folders or somewhere online. --\u003e\n\n[![CI](https://github.com/alainQtec/PsImport/actions/workflows/CI.yaml/badge.svg)](https://github.com/alainQtec/PsImport/actions/workflows/CI.yaml)\n\n[![Publish to PowerShell Gallery](https://github.com/alainQtec/PsImport/actions/workflows/Publish.yaml/badge.svg?branch=main)](https://github.com/alainQtec/PsImport/actions/workflows/Publish.yaml)\n\n## **Installation**\n\n```PowerShell\nInstall-Module PsImport\n```\n\n## **Features**\n\n- **Supports wildcards**:\n\n  ```PowerShell\n  (Import * -from '/relative/path/to/script.ps1').ForEach({ . $_.ScriptBlock })\n  ```\n\n  Will load functions from the file into current script scope.\n\n- **Importing from many files at once**:\n\n  ```PowerShell\n  (Import * -from '/relative/path/to/fileNamedlikeabc*.ps1').ForEach({ . $_.ScriptBlock })\n  ```\n\n  Will load all functions from .ps1 files that look like fileNamedlikeabc\n\n- **Import a function(s) from same repo**\n\n  ```PowerShell\n  Cd GitHubRepo\n  (Import funcName1, funcName2).ForEach({ . $_.ScriptBlock })\n  ```\n\n  Will only load functions funcName1 and funcName2 from fileNameb.\n\n  *if you are sure no other file is named fileNameb is in the repo.\n\n- **Import a function(s) from a remote script**\n\n  ```PowerShell\n  (Import funcName -from https://example.com/MyRemoteScript.ps1).ForEach({ . $_.ScriptBlock })\n  ```\n- **more ?**\n\n  ```PowerShell\n  ((ls ./Private -Filter \"*.psm1\" -Recurse).FullName | Get-Function)\n  ```\n\n## **Todos**\n\n- Fix edge cases when parsing files.\n\n  Sometimes it does not find all function declarations in file $filepath.\n\n  ```PowerShell\n  [PsImport]::ParseFile($Filepath)\n  ```\n\n  For now it Works as expected only when there is a clear newline char (ie:\n  \"`n\") between each function in the file.\n\n- Remove (/ Find a workarround) for the '.ForEach({ . $_ })' that is used in the\n  import syntax.\n\n## **Contributions**\n\n![Alt](https://repobeats.axiom.co/api/embed/c7f1a37fb73368e4265faca921b76e3d4448defb.svg \"Repobeats analytics image\")\n\nIf you would like to contribute to psimport, please feel free to submit a pull\nrequest on GitHub. We welcome contributions of all kinds, from bug fixes to new\nfeatures.\n\n## **License**\n\nThis module is licensed under the MIT\n[License](https://alainQtec.MIT-license.org).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchadnpc%2Fpsimport","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchadnpc%2Fpsimport","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchadnpc%2Fpsimport/lists"}