How to call remote tasks from alfred.yml
Closed this issue · 3 comments
I wanted to call remote task from inside alfred.yml
and couldn't find any documentation on how to do it. I am quite sure it was possible but I couldn't recall how.
I tried something like the following
remote:
summary: test
command: alfred https://raw.githubusercontent.com/kcmerrill/alfred-tasks/master//testing.yml:run.go
and
remote:
summary: test
command: alfred https://raw.githubusercontent.com/kcmerrill/alfred-tasks/master//testing.yml run.go
There are a few ways ....
If you're calling remote built in
remote tasks, just do alfred /testing
... so you can do something like alfred /testing:tdd.go
.
You can also call these built in remote tasks(so to speak) as a regular ole task.
Example:
remote:
summary: Testing a remote task
tasks: /testing:tdd.go
You can call remote github tasks the same way, but using the username/reponame ... assuming there is a top level alfred.yml
file ... so for example, I have a repo called yoda ... so you can do alfred kcmerrill/yoda
and alfred kcmerrill/yoda:taskname
. Same thing is true here, you can also call them within task groups inside, you don't have to call them via the command module.
You can also use remote tasks with http(s) ... just know that you have to put the full filepath to the file that has the tasks in it ...
so alfred http://example.com/some/dir/with/somefilewithtask.yml
and you can call the tasks on it like so: alfred http://example.com/some/dir/with/somefilewithtask.yml:tasktocall
Leaving this open, when I get a chance I'll verify the manual is up to date with this information.
Closing, as I believe this is covered in the manual: https://github.com/kcmerrill/alfred/blob/master/TFM.md#remote-tasks
The information that remote repository has to have alfred.yml is missing in the manual (it seems).