You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: LICENSE.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,4 +9,4 @@ Redistribution and use in source and binary forms, with or without modification,
9
9
10
10
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
11
11
12
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
12
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Copy file name to clipboardExpand all lines: README.md
+55-32Lines changed: 55 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,7 @@ Appwrite is an open-source backend as a service server that abstract and simplif
17
17
The Appwrite CLI is a Node based command line tool to help you interact with the Appwrite API. The CLI is distributed both as an [`npm package`](https://www.npmjs.com/package/appwrite-cli) as well as [pre built binaries](https://github.com/appwrite/sdk-for-cli/releases/latest) for specific operating systems and architectures.
18
18
19
19
### Install using NPM
20
+
20
21
---
21
22
22
23
If you have `npm` installed, it's as easy as running
@@ -33,84 +34,95 @@ $ appwrite -v
33
34
```
34
35
35
36
### Install using prebuilt binaries
37
+
36
38
---
37
39
38
40
If you do not have `npm` installed, you can always install the prebuilt binaries for your architecture and OS using our convenient installation scripts.
This will also prompt you to enter your Appwrite endpoint ( default: http://localhost/v1 )
78
86
79
-
*### Initialising your project
80
-
Once logged in, the CLI needs to be initialised before you can use it with your Appwrite project. You can do this with the `appwrite init project` command.
87
+
This will also prompt you to enter your Appwrite endpoint ( default: http://localhost/v1 )
88
+
89
+
-### Initialising your project
90
+
Once logged in, the CLI needs to be initialised before you can use it with your Appwrite project. You can do this with the `appwrite init project` command.
81
91
82
92
```sh
83
93
$ appwrite init project
84
94
```
85
95
86
96
The following prompt will guide you through the setup process. The `init` command also creates an `appwrite.json` file representing your Appwrite project.
87
97
88
-
The `appwrite.json` file does a lot of things.
89
-
* Provides context to the CLI
90
-
* Keeps track of all your cloud functions
91
-
* Keeps track of all your project's collections
92
-
* Helps you deploy your Appwrite project to production and more..
98
+
The `appwrite.json` file does a lot of things.
99
+
100
+
- Provides context to the CLI
101
+
- Keeps track of all your cloud functions
102
+
- Keeps track of all your project's collections
103
+
- Helps you deploy your Appwrite project to production and more..
93
104
94
105
You can also fetch all the collections in your current project using
106
+
95
107
```sh
96
108
appwrite init collection
97
109
```
98
110
99
-
*### Creating and deploying cloud functions
111
+
-### Creating and deploying cloud functions
100
112
101
113
The CLI makes it extremely easy to create and deploy Appwrite's cloud functions. Initialise your new function using
102
114
103
115
```
104
116
$ appwrite init function
105
117
? What would you like to name your function? My Awesome Function
106
118
? What runtime would you like to use? Node.js (node-15.5)
107
-
✓ Success
119
+
✓ Success
108
120
```
109
121
110
122
This will create a new function `My Awesome Function` in your current Appwrite project and also create a template function for you to get started.
111
123
112
124
```sh
113
-
$ tree My\ Awesome\ Function
125
+
$ tree My\ Awesome\ Function
114
126
115
127
My Awesome Function
116
128
├── README.md
@@ -121,7 +133,7 @@ My Awesome Function
121
133
0 directories, 4 files
122
134
```
123
135
124
-
You can now deploy this function using
136
+
You can now deploy this function using
125
137
126
138
```sh
127
139
$ appwrite push function
@@ -133,50 +145,56 @@ $ appwrite push function
133
145
134
146
Your function has now been deployed on your Appwrite server! As soon as the build process is finished, you can start executing the function.
135
147
136
-
*### Deploying Collections
148
+
-### Deploying Collections
137
149
138
-
Similarly, you can deploy all your collections to your Appwrite server using
150
+
Similarly, you can deploy all your collections to your Appwrite server using
139
151
140
152
```sh
141
153
appwrite push collections
142
154
```
143
155
144
156
> ### Note
157
+
>
145
158
> By default, requests to domains with self signed SSL certificates (or no certificates) are disabled. If you trust the domain, you can bypass the certificate validation using
159
+
146
160
```sh
147
161
$ appwrite client --selfSigned true
148
162
```
149
163
150
-
## Usage
164
+
## Usage
151
165
152
166
The Appwrite CLI follows the following general syntax.
-`data` must be a valid JSON string where each key and value are enclosed in double quotes `"` like the example above.
171
188
- Some arguments like the `read` and `write` permissions are expected to be arrays. In the Appwrite CLI, array values are passed in using space as a separator like in the example above.
172
189
190
+
To get information about the different services available, you can use
173
191
174
-
To get information about the different services available, you can use
175
192
```sh
176
193
$ appwrite -h
177
194
```
178
195
179
-
To get information about a particular service and the commands available in a service you can use
196
+
To get information about a particular service and the commands available in a service you can use
197
+
180
198
```sh
181
199
$ appwrite users // or
182
200
$ appwrite users --help // or
@@ -188,7 +206,7 @@ To get information about a particular command and the parameters it accepts, you
188
206
189
207
```sh
190
208
$ appwrite users list --help
191
-
$ appwrite account get --help
209
+
$ appwrite account get --help
192
210
```
193
211
194
212
At any point, you can view or reset the CLI configuration using the `client` service.
@@ -201,48 +219,53 @@ $ appwrite client --reset
201
219
202
220
## CI mode
203
221
204
-
The Appwrite CLI can also work in a CI environment. The initialisation of the CLI works a bit differently in CI. In CI, you set your `endpoint`, `projectId` and `API Key` using
222
+
The Appwrite CLI can also work in a CI environment. The initialisation of the CLI works a bit differently in CI. In CI, you set your `endpoint`, `projectId` and `API Key` using
This library is auto-generated by Appwrite custom [SDK Generator](https://github.com/appwrite/sdk-generator). To learn more about how you can help us improve this SDK, please check the [contribution guide](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md) before sending a pull-request.
214
231
215
-
To build and test the CLI for development, follow these steps
232
+
To build and test the CLI for development, follow these steps
216
233
217
234
1. Clone the SDK Generator repository and cd into the directory
0 commit comments