{"id":19080429,"url":"https://github.com/seeminglyscience/editorservicesprocess","last_synced_at":"2025-04-30T06:11:15.189Z","repository":{"id":87373230,"uuid":"95327836","full_name":"SeeminglyScience/EditorServicesProcess","owner":"SeeminglyScience","description":"Interact with the integrated console outside of Editor Services.","archived":false,"fork":false,"pushed_at":"2017-07-14T21:14:49.000Z","size":20,"stargazers_count":7,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-30T13:22:37.068Z","etag":null,"topics":[],"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/SeeminglyScience.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":"2017-06-24T23:24:06.000Z","updated_at":"2022-12-05T02:14:29.000Z","dependencies_parsed_at":"2023-03-27T13:05:27.301Z","dependency_job_id":null,"html_url":"https://github.com/SeeminglyScience/EditorServicesProcess","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SeeminglyScience%2FEditorServicesProcess","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SeeminglyScience%2FEditorServicesProcess/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SeeminglyScience%2FEditorServicesProcess/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SeeminglyScience%2FEditorServicesProcess/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SeeminglyScience","download_url":"https://codeload.github.com/SeeminglyScience/EditorServicesProcess/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251651231,"owners_count":21621716,"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":[],"created_at":"2024-11-09T02:23:35.783Z","updated_at":"2025-04-30T06:11:15.183Z","avatar_url":"https://github.com/SeeminglyScience.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EditorServicesProcess\n\nThe EditorServicesProcess module allows you to enter a runspace in the integrated console of a PowerShell Editor Services editor from outside the integrated console.  From this runspace you can interact with the `$psEditor` editor object and all of the functions from the Commands module such as `Find-Ast`, `Set-ScriptExtent`, etc.\n\n## Installation\n\n### Gallery\n\n```powershell\nInstall-Module EditorServicesProcess -Scope CurrentUser\n```\n\n### Source\n\n#### VSCode\n\n- `git clone 'https://github.com/SeeminglyScience/EditorServicesProcess.git'`\n- Open EditorServicesProcess in VSCode\n- Run task `Install`\n\n#### PowerShell\n\n```powershell\ngit clone 'https://github.com/SeeminglyScience/EditorServicesProcess.git'\nSet-Location .\\EditorServicesProcess\nInvoke-Build -Task Install\n```\n\n## Usage\n\n### Entering\n\n```powershell\n# Enter the first process that is open to a workspace with a matching path\nGet-EditorServicesProcess -Workspace *MyProject* | Enter-EditorServicesProcess\n\n# Or enter a specific process\nEnter-EditorServicesProcess -ProcessId 32412\n```\n\n### Interacting\n\n```powershell\n# Use the $psEditor object\n$psEditor.GetEditorContext().SelectedRange\n\n# Or any of the functions from the Commands module\nFind-Ast { $_.VariablePath.UserPath -eq '_' } | Set-ScriptExtent -Text '$PSItem'\n\n# Get variables from the main runspace (psEditorRunspace variable is created by this module)\n$psEditorRunspace.SessionStateProxy.PSVariable.GetValue('myVarName')\n\n# Even debug the main runspace (YMMV, you fight with PSES for control)\nDebug-Runspace $psEditorRunspace\n```\n\n### Returning\n\n```powershell\nexit\n```\n\n## TODO\n\n1. ~~Add function to invoke a scriptblock in the main runspace.~~ Done.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseeminglyscience%2Feditorservicesprocess","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseeminglyscience%2Feditorservicesprocess","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseeminglyscience%2Feditorservicesprocess/lists"}