Can't install gactions CLI

一笑奈何 提交于 2019-12-07 02:55:35

The gactions file you downloaded is the executable itself - not an installer or anything along those lines. You can put it somewhere in your PATH or call it directly by giving the full path when you're calling it, but it will not be automatically available unless you do so.

You can see your PATH with echo $PATH. If you wish, you can place it in one of those directories.

If you wish to continue to run it out of your Download directory (which I do, since I rarely use the command), you can open an iterm2 command line and call gactions with the full path:

~/Downloads/gactions

or (using your example)

~/Projects/YumBrands/GoogleHome/gactions

Or (also using your example) you could add the following line (probably to your ~/.zshrc file) to reference the gactions command in the GoogleHome directory:

PATH="$PATH:$HOME/Projects/YumBrands/GoogleHome"

You can then open a new terminal or iterm2 window and confirm that this is in your path

echo $PATH

The normal way to use it would be to create a directory where you are developing your Action (I use ~/Documents/Projects) and have gactions create the default action.json file. Possibly something like this:

mkdir ~/Documents/Projects/new-sample-action
cd  ~/Documents/Projects/new-sample-action
~/Downloads/gactions init

(If you have updated your PATH, you can just use gactions init for the last line.)

Download gactions

copy downloaded gactions and put into a local Project folder

and then go to your project directory cd "project directory"

run following commands :

$ chmod +x gactions

$ ./gactions init

it will create action.json into your folder

Go to the corresponding Path where you have downloaded the gactions file.

chmod +x gactions
./gactions help

You can use gactions by ./gactions. It worked for me.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!