Closed acminor closed 2 years ago
a-shell does a nice job of this https://holzschu.github.io/a-Shell_iOS/
I would love a shortcut that takes a string and executes it as a command in Blink. I need to scp images a lot and that would really improve this workflow.
While native integration with Shortcuts would be nice, you can achieve similar functionality by calling Blink’s X-Callback-URL from within a Shortcut, e.g. blinkshell://run?key=<URLKey>&cmd=<URLEncodedCommand>
(don’t forget to URL encode the command string).
I’m using exactly this method to send a wake-on-lan command to a device selected in an earlier Shortcuts step. Works great!
@christippett Nice hack!!! Do you know any way to get output or status of the command?
I am curious if there is a way to integrate a-Shell_iOS/ and blink. I want to use shortcuts to run script in a-shell which would prepare some files and then I want to trigger blink command to upload these files to the server. The reason is:
@christippett Nice hack!!! Do you know any way to get output or status of the command?
The built-in Open X-Callback URL action caters for that I'm pretty sure. I'm not using the output for anything in my example, but you can see there's an option to to parse a success or failed operation.
Open X-Callback URL
Performs the specified x-callback-url action. The x-success, x-cancel and x-error parameters will be added automatically.
As it has been mentioned already, although we do not have support for Shortcuts app, we do provide a X-Callback URL that becomes very handy. This plus piping can work on a few very cool scenarios, that I wanted to do a short video about. Here are some notes and additional tricks:
update.sh
script in Blink, and run it with ssh host_name < update.sh
I'm going to move this to Discussions, as there are a lot of tips here.
As per the feature request itself, we will see what we can do to put this in the roadmap sooner, and make things easier through better Shortcuts hooks.
It would be nice to implement iOS shortcut functionality. This would (I assume) allow starting a connection without retyping or searching through history for the command.
I know because iOS restrictions, you probably cannot implement the running of shell scripts. So, this may be an alternative. Currently, I am using ed to create a file with the command which I can cat and retype or copy and paste if I cannot find the command with reverse-isearch.