CLI requires GO to run.
Linux Installation
$ go get github.com/gizak/termui
$ go get github.com/IsurangaPerera/mow.cli
$ git clone https://github.com/IsurangaPerera/cli.git
$ cd cli
$ go build .
Create a Symlink to the cli directory inorder to run from anywhere
Following attributes should be set inorder to run properly
- Base URL (eg. localhost:9443)
- User Credentials (username & password)
$ cli config -url [base_url] -u [user_name] -p [password]
CLI is currently extended with the following capabilities.
Command | Arguements | Description | Type |
---|---|---|---|
addInternalRole | -r | role name | string |
-u | user list | string [ ] | |
-p | permissions | string [ ] | |
addRemoveRolesOfUser | -u | user name | string |
-r | new roles | string [ ] | |
-d | deleted roles | string [ ] | |
addRemoveUsersOfRole | -r | role name | string |
-u | new users | string [ ] | |
-d | deleted users | string [ ] | |
addRole | -r | role name | string |
-u | user list | string [ ] | |
-p | permissions | string [ ] | |
-s | shared | boolean | |
listAllUsers | -f | filter | string |
-l | limit | int |
Add Internal Role
$ cli addInternalRole -r "sample" -u [isuranga harsha] -p [add create]
List All Users
$ cli listAllUsers
OR
$ cli listAllUsers -f "*" -l 10