On MacOS it happens often that VSCode editor loses permission because it's recognized as dangerous by OS and it can't use different npm/yarn/git commands without chmod/chown.
- npm install
- npm i "package-name"
- yarn
- yarn add "package-name"
- npm build
- git commit -m "message"
- git pull
- git push
- git stash push
- git stash push -m "message"
- npm_i - npm install / npm install package
- npm_b - npm build
- yarn_add - yarn / yarn add package
- git_commit - git commit
- git_pull - git pull
- git_push - git push
- git_stash_push - git stash push -u
MacOS, Ubuntu.
- Clone repository https://github.com/PseudoElement/cmd-executor.git
- In terminal run $ ./goexec --path=absolute/path/to/your/project(example $ ./goexec --path=/usr/desktop/my-app) Note: If you run git commands in --path argument you need to specify absolute path to directory where .git directory located, usually it's the same as root directory of your project --path=/usr/desktop/my-app.
Also you can create your own .env file, specify PATH_TO_NPM_PROJECT variable like PATH_TO_NPM_PROJECT=/usr/desktop/my-app and run executable file without need to pass --path variable.
For better experience you can move executable in /usr/local/bin directory and run cli command by executable name goexec from any directory without specifying absolute path to directory when it's placed.
I wrote this tool for personal usage, cause I encountered problems with permission only with that commands. It's an open source project and if you want to extend a list of available command - send pull request to this repo, after check from my side your pr will be pushed.