Skip to content
This repository has been archived by the owner on Jul 21, 2023. It is now read-only.

Latest commit

 

History

History
577 lines (428 loc) · 16.2 KB

README.md

File metadata and controls

577 lines (428 loc) · 16.2 KB

buttercli

A CLI to interact with the Butterfly User Manager REST API

Usage

$ npm install -g buttercli
$ buttercli COMMAND
running command...
$ buttercli (-v|--version|version)
buttercli/0.0.1 win32-x64 node-v10.15.3
$ buttercli --help [COMMAND]
USAGE
  $ buttercli COMMAND
...

Commands

buttercli config:list

List all the configuration settings or only a subset of them

USAGE
  $ buttercli config:list

OPTIONS
  -h, --help      show CLI help
  -j, --json      display results in json format
  -s, --server    Get only the server settings
  -u, --user      Get only the user settings
  -x, --extended  show extra columns

See code: dist\commands\config\list.ts

buttercli config:server

Set all the server settings or only a subset of them.

USAGE
  $ buttercli config:server

OPTIONS
  -h, --help               show CLI help
  -j, --json               display results in json format
  -n, --hostname=hostname  (required) Set the hostname of the user-manager server
  -p, --port=port          (required) Set the port of the user-manager server
  -t, --timeout=timeout    Set a timeout for the server connection
  -x, --extended           show extra columns

DESCRIPTION
  Remember that every time that config:server is invoked all the old server settings will be overwritten

See code: dist\commands\config\server.ts

buttercli config:user

Set all the user informations or only a subset of them.

USAGE
  $ buttercli config:user

OPTIONS
  -e, --email=email          Set a default email
  -f, --firstname=firstname  Set your firstname
  -h, --help                 show CLI help
  -j, --json                 display results in json format
  -l, --lastname=lastname    Set your lastname
  -x, --extended             show extra columns

DESCRIPTION
  Remember that every time that config:user is invoked all the old user informations will be overwritten

See code: dist\commands\config\user.ts

buttercli contact:create

Create a new user contact

USAGE
  $ buttercli contact:create

OPTIONS
  -a, --account=account       (required) new identifier for the service specified
  -e, --email=email           (required) user email address
  -h, --help                  show CLI help
  -j, --json                  display results in json format

  -p, --platform=EMAIL|SLACK  (required) choose the contact platform between SLACK, EMAIL.
                              The TELEGRAM contact can only be set from the Telegram Bot

  -x, --extended              show extra columns

See code: dist\commands\contact\create.ts

buttercli contact:find

Find all contacts of a specific user identified by email

USAGE
  $ buttercli contact:find

OPTIONS
  -e, --email=email  (required) user email address
  -h, --help         show CLI help
  -j, --json         display results in json format
  -x, --extended     show extra columns

See code: dist\commands\contact\find.ts

buttercli contact:remove

Remove an existing user contact specified by user email and contact platform

USAGE
  $ buttercli contact:remove

OPTIONS
  -e, --email=email                    (required) user email address
  -h, --help                           show CLI help
  -j, --json                           display results in json format
  -p, --platform=EMAIL|SLACK|TELEGRAM  (required) choose the contact platform to delete between SLACK, EMAIL, TELEGRAM
  -x, --extended                       show extra columns

See code: dist\commands\contact\remove.ts

buttercli contact:update

Update an existing user contact account specified by user email and contact platform

USAGE
  $ buttercli contact:update

OPTIONS
  -a, --account=account                (required) new identifier for the service specified
  -e, --email=email                    (required) user email address
  -h, --help                           show CLI help
  -j, --json                           display results in json format
  -p, --platform=EMAIL|SLACK|TELEGRAM  (required) choose the contact platform to update between SLACK, EMAIL, TELEGRAM
  -x, --extended                       show extra columns

See code: dist\commands\contact\update.ts

buttercli help [COMMAND]

display help for buttercli

USAGE
  $ buttercli help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI

See code: @oclif/plugin-help

buttercli init

Initialize the db and set all the server settings

USAGE
  $ buttercli init

See code: dist\commands\init.ts

buttercli project:create

Create a new project specifing one or more service urls

USAGE
  $ buttercli project:create

OPTIONS
  -g, --gitlab=gitlab        gitlab url of the new project
  -h, --help                 show CLI help
  -j, --json                 display results in json format
  -n, --name=name            (required) project name (max 50 characters)
  -r, --redmine=redmine      redmine url of the new project
  -s, --sonarqube=sonarqube  sonarqube url of the new project
  -x, --extended             show extra columns

See code: dist\commands\project\create.ts

buttercli project:find

Find a specific project identified by name

USAGE
  $ buttercli project:find

OPTIONS
  -h, --help       show CLI help
  -j, --json       display results in json format
  -n, --name=name  (required) project name (max 50 characters)
  -x, --extended   show extra columns

See code: dist\commands\project\find.ts

buttercli project:list

Show a list of all projects

USAGE
  $ buttercli project:list

OPTIONS
  -h, --help      show CLI help
  -j, --json      display results in json format
  -x, --extended  show extra columns

See code: dist\commands\project\list.ts

buttercli project:remove

Remove an existing project or only the service urls specified

USAGE
  $ buttercli project:remove

OPTIONS
  -h, --help                                  show CLI help
  -j, --json                                  display results in json format
  -n, --name=name                             (required) project name (max 50 characters)

  -s, --service=ALL|GITLAB|REDMINE|SONARQUBE  (required) remove service between GITLAB, REDMINE, SONARQUBE or ALL of
                                              them

  -x, --extended                              show extra columns

See code: dist\commands\project\remove.ts

buttercli project:update

Update an existing service url of the project identified by name

USAGE
  $ buttercli project:update

OPTIONS
  -g, --gitlab=gitlab        new gitlab url of the project
  -h, --help                 show CLI help
  -j, --json                 display results in json format
  -n, --name=name            (required) project name (max 50 characters)
  -r, --redmine=redmine      new redmine url of the project
  -s, --sonarqube=sonarqube  new sonarqube url of the project
  -x, --extended             show extra columns

See code: dist\commands\project\update.ts

buttercli sub:create

Create a new subscription

USAGE
  $ buttercli sub:create

OPTIONS
  -P, --priority=LOW|MEDIUM|HIGH
      (required) set the priority between LOW, MEDIUM, HIGH

  -c, --contact=EMAIL|SLACK|TELEGRAM
      (required) choose the contact service between EMAIL, SLACK, TELEGRAM where the notification will be sent

  -e, --email=email
      (required) user email address

  -h, --help
      show CLI help

  -j, --json
      display results in json format

  -k, --keyword=keyword
      (required) keyword compared with the contents of the future events

  -p, --project=project
      (required) project name

  -t, --event-type=event-type
      (required) set the event type between
      GITLAB_COMMIT_CREATED                    
      GITLAB_ISSUE_CREATED
      GITLAB_ISSUE_EDITED
      GITLAB_MERGE_REQUEST_CREATED                    
      GITLAB_MERGE_REQUEST_EDITED
      GITLAB_MERGE_REQUEST_MERGED                    
      GITLAB_MERGE_REQUEST_CLOSED
      REDMINE_TICKET_CREATED                    
      REDMINE_TICKET_EDITED
      SONARQUBE_PROJECT_ANALYSIS_COMPLETED

  -x, --extended
      show extra columns

See code: dist\commands\sub\create.ts

buttercli sub:find

Find an existing subscription

USAGE
  $ buttercli sub:find

OPTIONS
  -e, --email=email
      (required) user email address

  -h, --help
      show CLI help

  -j, --json
      display results in json format

  -p, --project=project
      (required) project name

  -t, --event-type=event-type
      (required) set the event type between
      GITLAB_COMMIT_CREATED                    
      GITLAB_ISSUE_CREATED
      GITLAB_ISSUE_EDITED
      GITLAB_MERGE_REQUEST_CREATED                    
      GITLAB_MERGE_REQUEST_EDITED
      GITLAB_MERGE_REQUEST_MERGED                    
      GITLAB_MERGE_REQUEST_CLOSED
      REDMINE_TICKET_CREATED                    
      REDMINE_TICKET_EDITED
      SONARQUBE_PROJECT_ANALYSIS_COMPLETED

  -x, --extended
      show extra columns

See code: dist\commands\sub\find.ts

buttercli sub:remove

Remove an existing subscription

USAGE
  $ buttercli sub:remove

OPTIONS
  -e, --email=email
      (required) user email address

  -h, --help
      show CLI help

  -j, --json
      display results in json format

  -p, --project=project
      (required) project name

  -t, --event-type=event-type
      (required) set the event type between
      GITLAB_COMMIT_CREATED                    
      GITLAB_ISSUE_CREATED
      GITLAB_ISSUE_EDITED
      GITLAB_MERGE_REQUEST_CREATED                    
      GITLAB_MERGE_REQUEST_EDITED
      GITLAB_MERGE_REQUEST_MERGED                    
      GITLAB_MERGE_REQUEST_CLOSED
      REDMINE_TICKET_CREATED                    
      REDMINE_TICKET_EDITED
      SONARQUBE_PROJECT_ANALYSIS_COMPLETED

  -x, --extended
      show extra columns

See code: dist\commands\sub\remove.ts

buttercli sub:update

Update an existing subscription

USAGE
  $ buttercli sub:update

OPTIONS
  -P, --priority=LOW|MEDIUM|HIGH
      set the priority between LOW, MEDIUM, HIGH

  -c, --contact=EMAIL|SLACK|TELEGRAM
      choose the contact service between EMAIL, SLACK, TELEGRAM where the notification will be sent

  -e, --email=email
      (required) user email address

  -h, --help
      show CLI help

  -j, --json
      display results in json format

  -k, --keyword=keyword
      keyword compared with the contents of the future events

  -p, --project=project
      (required) project name

  -t, --event-type=event-type
      (required) set the event type between
      GITLAB_COMMIT_CREATED                    
      GITLAB_ISSUE_CREATED
      GITLAB_ISSUE_EDITED
      GITLAB_MERGE_REQUEST_CREATED                    
      GITLAB_MERGE_REQUEST_EDITED
      GITLAB_MERGE_REQUEST_MERGED                    
      GITLAB_MERGE_REQUEST_CLOSED
      REDMINE_TICKET_CREATED                    
      REDMINE_TICKET_EDITED
      SONARQUBE_PROJECT_ANALYSIS_COMPLETED

  -x, --extended
      show extra columns

See code: dist\commands\sub\update.ts

buttercli user:create

Create a new user

USAGE
  $ buttercli user:create

OPTIONS
  -a, --[no-]available       the new user is currently available (default is true)
  -e, --email=email          (required) new user email address
  -f, --firstname=firstname  (required) new user first name (max 30 characters)
  -h, --help                 show CLI help
  -j, --json                 display results in json format
  -l, --lastname=lastname    (required) new user last name (max 30 characters)
  -x, --extended             show extra columns

See code: dist\commands\user\create.ts

buttercli user:find

Find all users or a specific user identified by email

USAGE
  $ buttercli user:find

OPTIONS
  -e, --email=email  (required) user email address
  -h, --help         show CLI help
  -j, --json         display results in json format
  -x, --extended     show extra columns

See code: dist\commands\user\find.ts

buttercli user:list

Show a list of all users

USAGE
  $ buttercli user:list

OPTIONS
  -h, --help      show CLI help
  -j, --json      display results in json format
  -x, --extended  show extra columns

See code: dist\commands\user\list.ts

buttercli user:remove

Remove a specific user identified by email

USAGE
  $ buttercli user:remove

OPTIONS
  -e, --email=email  (required) user email address
  -h, --help         show CLI help
  -j, --json         display results in json format
  -x, --extended     show extra columns

See code: dist\commands\user\remove.ts

buttercli user:update

Update an existing user identified by email

USAGE
  $ buttercli user:update

OPTIONS
  -a, --[no-]available       the user is currently available (default is true)
  -e, --email=email          (required) user email address
  -f, --firstname=firstname  new first name (max 30 characters)
  -h, --help                 show CLI help
  -j, --json                 display results in json format
  -l, --lastname=lastname    new last name (max 30 characters)
  -x, --extended             show extra columns

See code: dist\commands\user\update.ts