|
1 | 1 | # Connect Command Line Interface |
2 | 2 |
|
3 | | - [](https://pypi.org/project/connect-cli/) [](https://travis-ci.org/cloudblue/connect-cli) |
| 3 | + [](https://pypi.org/project/connect-cli/) [](https://travis-ci.org/cloudblue/connect-cli) [](https://codecov.io/gh/cloudblue/connect-cli) |
4 | 4 |
|
5 | 5 |
|
6 | 6 | ## Introduction |
@@ -44,57 +44,111 @@ The preferred way to install `connect-cli` is using a [virtualenv](https://virtu |
44 | 44 |
|
45 | 45 | ### Binary distributions |
46 | 46 |
|
47 | | -A single executable binary distribution is available for both linux and mac osx (amd64). |
| 47 | +A single executable binary distribution is available for windows, linux and mac osx (amd64). |
48 | 48 | You can it from the [Github Releases](https://github.com/cloudblue/connect-cli/releases) page. |
49 | 49 |
|
50 | 50 | To install under linux: |
51 | 51 |
|
52 | 52 | ``` |
53 | | - $ curl -O -J https://github.com/cloudblue/connect-cli/releases/download/1.2/connect-cli_1.2_linux_amd64.tar.gz |
54 | | - $ tar xvfz connect-cli_1.2_linux_amd64.tar.gz |
| 53 | + $ curl -O -J https://github.com/cloudblue/connect-cli/releases/download/21.0/connect-cli_21.0_linux_amd64.tar.gz |
| 54 | + $ tar xvfz connect-cli_21.0_linux_amd64.tar.gz |
55 | 55 | $ sudo cp dist/ccli /usr/local/bin/ccli |
56 | 56 | ``` |
57 | 57 |
|
58 | 58 | To install under Mac OSX: |
59 | 59 |
|
60 | 60 | ``` |
61 | | - $ curl -O -J https://github.com/cloudblue/connect-cli/releases/download/1.2/connect-cli_1.2_osx_amd64.tar.gz |
62 | | - $ tar xvfz connect-cli_1.2_linux_amd64.tar.gz |
| 61 | + $ curl -O -J https://github.com/cloudblue/connect-cli/releases/download/21.0/connect-cli_21.0_osx_amd64.tar.gz |
| 62 | + $ tar xvfz connect-cli_21.0_osx_amd64.tar.gz |
63 | 63 | $ sudo cp dist/ccli /usr/local/bin/ccli |
64 | 64 | ``` |
65 | 65 |
|
66 | 66 | > If your user is not a sudoer, you can copy the `ccli` executable from the dist directory to a directory of your choice |
67 | 67 | > that is listed in the `PATH` variable. |
68 | 68 |
|
69 | 69 |
|
| 70 | +To install under Windows |
| 71 | + |
| 72 | +Download the windows single executable zipfile from [Github Releases](https://github.com/cloudblue/connect-cli/releases/download/21.0/connect-cli_21.0_windows_amd64.tar.gz), extract it and place it in a folder that is included in your `path` system variable. |
| 73 | + |
| 74 | + |
70 | 75 | ## Usage |
71 | 76 |
|
72 | | -### Configure |
| 77 | +### Add a new account |
| 78 | + |
| 79 | +First of all you need to add an account the `connect-cli` with the CloudBlue Connect API *key*. |
| 80 | + |
| 81 | +``` |
| 82 | + $ ccli account add "ApiKey XXXXX:YYYYY" |
| 83 | +``` |
| 84 | + |
| 85 | +### List configured accounts |
| 86 | + |
| 87 | +To get a list of all configured account run: |
| 88 | + |
| 89 | +``` |
| 90 | + $ ccli account list |
| 91 | +``` |
| 92 | + |
| 93 | + |
| 94 | +### Set the current active account |
| 95 | + |
| 96 | +To set the current active account run: |
| 97 | + |
| 98 | +``` |
| 99 | + $ ccli account activate VA-000-000 |
| 100 | +``` |
| 101 | + |
| 102 | +### Remove an account |
| 103 | + |
| 104 | +To remove an account run: |
| 105 | + |
| 106 | +``` |
| 107 | + $ ccli account remove VA-000-000 |
| 108 | +``` |
| 109 | + |
| 110 | +### List available products |
73 | 111 |
|
74 | | -First of all you need to configure the `connect-cli` with the CloudBlue Connect API *endpoint* and *key*. |
| 112 | +To get a list of available products run: |
75 | 113 |
|
76 | 114 | ``` |
77 | | - $ ccli configure --url https://api.connect.cloudblue.com/public/v1 --key "ApiKey XXXXX:YYYYY" |
| 115 | + $ ccli product list |
78 | 116 | ``` |
79 | 117 |
|
80 | | -### Dump products to Excel |
| 118 | +This command will output a list of all products (id and name) available within the current active account. |
| 119 | +You can also filter the results by adding the ``--query`` flag followed by a RQL query. |
| 120 | +For more information about RQL see the [Resource Query Language](https://connect.cloudblue.com/community/api/rql/) |
| 121 | +article in the Connect community documentation portal. |
81 | 122 |
|
82 | | -To dump products to Excel run: |
| 123 | + |
| 124 | +### Export a product to Excel |
| 125 | + |
| 126 | +To export a product to Excel run: |
83 | 127 |
|
84 | 128 | ``` |
85 | | - $ ccli product dump PRD-000-000-000 PRD-000-000-001 PRD-000-000-002 --out my_products.xlsx |
| 129 | + $ ccli product export PRD-000-000-000 |
86 | 130 | ``` |
87 | 131 |
|
| 132 | +This command will generate a excel file named PRD-000-000-000.xlsx in the current working directory. |
88 | 133 |
|
89 | | -### Synchronize products |
90 | 134 |
|
91 | | -To sync products from Excel run: |
| 135 | +### Synchronize a product from Excel |
| 136 | + |
| 137 | +To synchronize a product from Excel run: |
92 | 138 |
|
93 | 139 | ``` |
94 | 140 | $ ccli product sync --in my_products.xlsx |
95 | 141 | ``` |
96 | 142 |
|
97 | 143 |
|
| 144 | +### Getting help |
| 145 | + |
| 146 | +To get help about the `connect-cli` commands type: |
| 147 | + |
| 148 | +``` |
| 149 | + $ ccli --help |
| 150 | +``` |
| 151 | + |
98 | 152 | ## License |
99 | 153 |
|
100 | 154 | `connect-cli` is released under the [Apache License Version 2.0](https://www.apache.org/licenses/LICENSE-2.0). |
0 commit comments