coding-exp-cli

1.0.6 • Public • Published

CodingExpClient

Command-line interface for Coding.net user experiment centre.

Installation

run command follow with nodejs and npm.

yarn global add coding-exp-cli

Usage

EXP_PASSWD=PASSWD [EXP_HOST=CODING_OR_MART] coding-exp [[-]key[:value]] {...}

Environment

EXP_PASSWD is you-know-what the coding experiment centre manage password which is necessary for program. Wrong password is OK but you will got wrong result as well.

EXP_HOST is either 'coding.net' or 'mart.coding.net', and 'mart.coding.net' will get default if you omit this option.

Arguments

One or more key-value pairs will be append at the end of this command as arguments which take an effect on experiment switches, and finilly reach our goals.

- means delete, use a single hyphen as the prefix of experiment code, you will get the result without specified experiment code.

key is necessary but just the experiment code.

value is either true or false, means on or off on specified experiment switch, and the true will be used as default.

Example

  1. type command for help

    > coding-exp ↵
    The environment variable EXP_PASSWD is expected.
    Usage:
      EXP_PASSSWD=SOME_PASSWD [EXP_HOST=CODING_OR_MART] coding-exp [args]
  2. get default experiment settings from server side

    > EXP_PASSWD=EXP_PASSWD coding-exp ↵
     
    * apply-resume     [ √ ]
    * guide-publish    [ √ ]
    * high-paid        [ √ ]
    * how-know-mart    [ √ ]
    * million-bonus    [ √ ]
    * mpay             [ √ ]
    * mpay-v3-btn      [ x ]
    * mpay3            [ √ ]
    * quote-mobile-pay [ √ ]
    * sso              [ x ]
    * stage-evaluation [ √ ]
    * use-cdn          [ √ ]
     
    apply-resume%3Dtrue%2Cguide-publish%3Dtrue%2Chigh-paid%3Dtrue%2Chow-know-mart%3Dtrue%2Cmillion-bonus%3Dtrue%2Cmpay-v3-btn%3Dfalse%2Cmpay3%3Dtrue%2Cmpay%3Dtrue%2Cquote-mobile-pay%3Dtrue%2Csso%3Dfalse%2Cstage-evaluation%3Dtrue%2Cuse-cdn%3Dtrue%2C05025301
     
    add_header Set-Cookie "c=apply-resume%3Dtrue%2Cguide-publish%3Dtrue%2Chigh-paid%3Dtrue%2Chow-know-mart%3Dtrue%2Cmillion-bonus%3Dtrue%2Cmpay-v3-btn%3Dfalse%2Cmpay3%3Dtrue%2Cmpay%3Dtrue%2Cquote-mobile-pay%3Dtrue%2Csso%3Dfalse%2Cstage-evaluation%3Dtrue%2Cuse-cdn%3Dtrue%2C05025301;Path=/;Max-Age=259200";
  3. add new experiment code named test

    > EXP_PASSWD=EXP_PASSWD coding-exp test ↵
     
    * apply-resume     [ √ ]
    * guide-publish    [ √ ]
    * high-paid        [ √ ]
    * how-know-mart    [ √ ]
    * million-bonus    [ √ ]
    * mpay             [ √ ]
    * mpay-v3-btn      [ x ]
    * mpay3            [ √ ]
    * quote-mobile-pay [ √ ]
    * sso              [ x ]
    * stage-evaluation [ √ ]
    * use-cdn          [ √ ]
    * test             [ √ ]
     
    apply-resume%3Dtrue%2Cguide-publish%3Dtrue%2Chigh-paid%3Dtrue%2Chow-know-mart%3Dtrue%2Cmillion-bonus%3Dtrue%2Cmpay-v3-btn%3Dfalse%2Cmpay3%3Dtrue%2Cmpay%3Dtrue%2Cquote-mobile-pay%3Dtrue%2Csso%3Dfalse%2Cstage-evaluation%3Dtrue%2Ctest%3Dtrue%2Cuse-cdn%3Dtrue%2C03020305
     
    add_header Set-Cookie "c=apply-resume%3Dtrue%2Cguide-publish%3Dtrue%2Chigh-paid%3Dtrue%2Chow-know-mart%3Dtrue%2Cmillion-bonus%3Dtrue%2Cmpay-v3-btn%3Dfalse%2Cmpay3%3Dtrue%2Cmpay%3Dtrue%2Cquote-mobile-pay%3Dtrue%2Csso%3Dfalse%2Cstage-evaluation%3Dtrue%2Ctest%3Dtrue%2Cuse-cdn%3Dtrue%2C03020305;Path=/;Max-Age=259200";
  4. add new experiment code named test however default false

    > EXP_PASSWD=EXP_PASSWD coding-exp test:false ↵
     
    * apply-resume     [ √ ]
    * guide-publish    [ √ ]
    * high-paid        [ √ ]
    * how-know-mart    [ √ ]
    * million-bonus    [ √ ]
    * mpay             [ √ ]
    * mpay-v3-btn      [ x ]
    * mpay3            [ √ ]
    * quote-mobile-pay [ √ ]
    * sso              [ x ]
    * stage-evaluation [ √ ]
    * use-cdn          [ √ ]
    * test             [ x ]
     
    apply-resume%3Dtrue%2Cguide-publish%3Dtrue%2Chigh-paid%3Dtrue%2Chow-know-mart%3Dtrue%2Cmillion-bonus%3Dtrue%2Cmpay-v3-btn%3Dfalse%2Cmpay3%3Dtrue%2Cmpay%3Dtrue%2Cquote-mobile-pay%3Dtrue%2Csso%3Dfalse%2Cstage-evaluation%3Dtrue%2Ctest%3Dfalse%2Cuse-cdn%3Dtrue%2C0c070752
     
    add_header Set-Cookie "c=apply-resume%3Dtrue%2Cguide-publish%3Dtrue%2Chigh-paid%3Dtrue%2Chow-know-mart%3Dtrue%2Cmillion-bonus%3Dtrue%2Cmpay-v3-btn%3Dfalse%2Cmpay3%3Dtrue%2Cmpay%3Dtrue%2Cquote-mobile-pay%3Dtrue%2Csso%3Dfalse%2Cstage-evaluation%3Dtrue%2Ctest%3Dfalse%2Cuse-cdn%3Dtrue%2C0c070752;Path=/;Max-Age=259200";
  5. remove sso experiment code

    > EXP_PASSWD=EXP_PASSWD coding-exp -sso
     
    * apply-resume     [ √ ]
    * guide-publish    [ √ ]
    * high-paid        [ √ ]
    * how-know-mart    [ √ ]
    * million-bonus    [ √ ]
    * mpay             [ √ ]
    * mpay-v3-btn      [ x ]
    * mpay3            [ √ ]
    * quote-mobile-pay [ √ ]
    * stage-evaluation [ √ ]
    * use-cdn          [ √ ]
     
    apply-resume%3Dtrue%2Cguide-publish%3Dtrue%2Chigh-paid%3Dtrue%2Chow-know-mart%3Dtrue%2Cmillion-bonus%3Dtrue%2Cmpay-v3-btn%3Dfalse%2Cmpay3%3Dtrue%2Cmpay%3Dtrue%2Cquote-mobile-pay%3Dtrue%2Cstage-evaluation%3Dtrue%2Cuse-cdn%3Dtrue%2C51515354
     
    add_header Set-Cookie "c=apply-resume%3Dtrue%2Cguide-publish%3Dtrue%2Chigh-paid%3Dtrue%2Chow-know-mart%3Dtrue%2Cmillion-bonus%3Dtrue%2Cmpay-v3-btn%3Dfalse%2Cmpay3%3Dtrue%2Cmpay%3Dtrue%2Cquote-mobile-pay%3Dtrue%2Cstage-evaluation%3Dtrue%2Cuse-cdn%3Dtrue%2C51515354;Path=/;Max-Age=259200";
  6. operate experiment code in coding.net

    > EXP_PASSWD=EXP_PASSWD EXP_HOST=coding.net coding-exp ↵
     
    * coding-cli           [ x ]
    * desktop-notification [ √ ]
    * git-upload           [ √ ]
    * guide                [ √ ]
    * project_tweet        [ √ ]
    * svn                  [ √ ]
    * team                 [ √ ]
     
    coding-cli%3Dfalse%2Cdesktop-notification%3Dtrue%2Cgit-upload%3Dtrue%2Cguide%3Dtrue%2Cproject_tweet%3Dtrue%2Csvn%3Dtrue%2Cteam%3Dtrue%2C015f0554
     
    add_header Set-Cookie "c=coding-cli%3Dfalse%2Cdesktop-notification%3Dtrue%2Cgit-upload%3Dtrue%2Cguide%3Dtrue%2Cproject_tweet%3Dtrue%2Csvn%3Dtrue%2Cteam%3Dtrue%2C015f0554;Path=/;Max-Age=259200";

Readme

Keywords

Package Sidebar

Install

npm i coding-exp-cli

Weekly Downloads

12

Version

1.0.6

License

MIT

Unpacked Size

35 kB

Total Files

11

Last publish

Collaborators

  • usual
  • wusisu