Skip to content

feat: Implement remote script execution and UI management#152

Closed
malaltot wants to merge 1 commit into
bitbound:mainfrom
malaltot:feature/remote-script-execution
Closed

feat: Implement remote script execution and UI management#152
malaltot wants to merge 1 commit into
bitbound:mainfrom
malaltot:feature/remote-script-execution

Conversation

@malaltot

Copy link
Copy Markdown

Description

This PR introduces a remote script execution engine into ControlR, enabling administrators to create, manage, and execute scripts on remote agents—either individually or in bulk. See Issue #80

It replicates and adapts execution capabilities to target machines supporting PowerShell, Command Prompt (cmd.exe), and Bash shells.

Key Changes

  • Database & Entities: Added Script and ScriptExecution entities configured with tenant-level isolation filters.
  • Agent Shell Runner: Implemented a non-interactive shell runner in AgentHubClient that writes temporary script files and captures/streams stdout and stderr back in real-time.
  • Execution Elevation Contexts (ScriptRunAs): Added support for running scripts under:
    • System (Agent background service context).
    • CurrentUser (Active interactive user desktop session).
    • CurrentUserElevated (Interactive session requesting UAC elevation).
  • Backend API: Built ScriptsController to handle CRUD operations, mass execution (/execute), and ad-hoc script runs (/execute-adhoc).
  • UI Improvements (MudBlazor):
    • Scripts Management Panel: Central dashboard to manage scripts.
    • Run Script Dialog: Interactive prompt to run a script on multiple devices with live console log views.
    • Single Device Selection: Added a "Run Script" shortcut to the device dropdown menu on the dashboard.
    • Device Scripts Page: Added a dedicated "Run Script" management view under the device access layout to execute scripts and watch real-time console logs.
    • Logs View: Added execution history tracking logs.
  • Testing: Implemented automated integration tests inside ScriptsControllerTests targeting controllers and SignalR hub delegation.

@github-actions

Copy link
Copy Markdown

Thank you so much for your interest in ControlR! I really appreciate you taking the time to contribute.

However, I am not accepting PRs at the moment for the following reasons:

Read-Only Mirror
For now, the public repository is a read-only mirror. This allows me to work on ideas and experiments in private and only reveal them when they're ready.

Legal and Financial Considerations
With Remotely, I found out that there are legal impliciations to accepting external contributions. Since I'm now depending on ControlR to be my primary source of income, it's less complicated and risky if I avoid external contributions for now.

Personal Working Style
During these early stages of the project, working solo will bring me the most amount of happiness and sense of accomplishment. It will allow me to move quickly and maintain a clear vision.

Reviewing AI Code
In my opinion, reviewing code consumes about 4 times as many "mental calories" compared to writing it. With the rise of AI, I'm worried that I'd spend the vast majority of my time reviewing AI-generated PRs, which would detract from my ability to keep the project moving forward.

I will begin accepting external contributions once ControlR reaches a more mature state and is financially self-sustaining. Thank you for understanding!

If you have ideas, suggestions, or found a bug, please feel free to open an issue instead. I'd love to hear your feedback!

Thank you again for your interest in the project! 🙏

@github-actions github-actions Bot closed this Jun 29, 2026
@malaltot

Copy link
Copy Markdown
Author

:(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant