After creating a flow, you can instantly execute it using the run command. Actions will be executed one after the other (according to your flow's setup) as a series of JavaScript tasks. If for some reason your flow is unable to run (example: copying a file that does not exist), the process will end with a status of 1 (error) and the remaining tasks will not be executed.
The run command is generated from your team and flow handles.
npx bashn@latest @team/flow
When running an NPX package, you will be asked to confirm the usage of the package. This might not be ideal for you if you want your flow to run without any human interactions. To bypass this prompt, simply prefix --yes to the NPX command.
npx --yes bashn@latest @team/flow
Important : If your flow contains global variables set to flag, make sure to add them to the command.
npx --yes bashn@latest @team/flow --gb_example=example
You can learn more about global variables here.
When running your flow, Bashnode will keep track of its final result and status. This data can be viewed in the dashboard in the usage section.
Flows that execute without errors will have a final output of
✅ Flow ran successfully
Flows that are unable to finish their process will output the error in the usage section.
Executing a flow, regardless of the final status, will register a usage.
For security purposes, flows cannot perform actions outside the current working directory. For example, a flow executed from
/home/projects/my-project
will not be able to perform actions outside this scope, for example, deleting a file in
/home/backups
This feature is intented to increase security when executing a flow from an unknown source. To disable this feature, simply add the --unsecure flag to your command.
npx bashn@latest @team/flow --unsecure
Warning : Bashnode is not responsible for any data loss when executing a flow with this flag. Use at your own risks.
Bashnode - Build code-free custom CLIs