README
Installation
NPM install
First of all, install smyc-cli
library:
npm i -g smyc-cli
Basic config setup
After installation, you should set basic configuration:
smyc init --baseURL=[BASE_URL] --apiKey=[API_KEY]
Git templates setup
Option 1 (no git template dir atm or global post-commit hook)
If you don't have git template dir yet, or you have one, but don't have post-commit
hook in there, just run:
smyc init-hooks -g
During this, there will be created ~/.git-templates
folder, where your git-hooks will be stored.
Option 2
If previous option has failed for you, it means you already have git templates dir and you have default post-commit
hook, and you'll need manually add following line to its end:
smyc post-commit
After global hook setup
You'll need to run
git init
in all repos, in which you want to use that hook.
Important!
It's not necessary: you may init post-commit hook individually for any repo you want using smyc init-hooks # or ih
w/o -g
flag.
Signup/signin
Using the tool requires you to have an account, so just:
smyc signup
and follow the instructions.
API
(alias init-hooksih
)
Adds post-commit hook to the current git repo.
last
This command allows you to send for review previous commit OR staged changes if you have any (you'll be asked what exactly you want to send).
diff <GIT_DIFF_PARAMS>
Sends diff got by running git diff <GIT_DIFF_PARAMS>
. Doesn't require init-hooks
before.