Dynamic worker execution and CLI command refactoring#10
Merged
Conversation
hacktobeer
approved these changes
Apr 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Refactored the CLI command structure, implemented dynamic worker execution with workflow support, and improved API client request handling and error reporting.
This PR introduces the run command, a powerful new way to execute OpenRelik workers directly from the CLI. It enables users to build and execute complex workflows using familiar command-line patterns, including support for sequential chaining, parallel execution, and automated file handling.
Key Features
Examples
Sequential Chaining with --then
Extract strings from a file and then search for a specific regex pattern:
Parallel Execution with --and
Run multiple analysis tools on a local file simultaneously:
Advanced Workflow with Downloads
Run a chain on a local file and download all intermediate and final results to a specific directory:
Dry Run
Generate and inspect the workflow JSON specification without starting the execution:
Technical Details:
NewRequestto split endpoints at the query string separator, preventingJoinPathfrom escaping the?character. Modified error string generation to strip query parameters and fragments from URLs for cleaner error messages.users,folders,files,workers) to singular form (user,folder,file,worker) to follow standard CLI conventions.runcommand that dynamically generates subcommands based on a local worker cache. This supports command chaining via--thenand parallel execution via--and.workflowcommand for creating, running, and inspecting workflow metadata and status. Updated theWorkflowsService.Getmethod to use the direct/workflows/{id}endpoint, removing the folder ID requirement.ProgressTrackerandWorkflowMonitorusing Unicode symbols and colors. This provides real-time status updates, transfer speeds, and ETA estimates for file operations and task execution.Taskstruct to include a recursiveTasksfield, enabling support for nested task structures within workflows.