Skip to content

Commit 95bf883

Browse files
authored
Merge pull request #230 from appwrite/dev
2 parents 30fde4c + 437c226 commit 95bf883

File tree

551 files changed

+10406
-12881
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

551 files changed

+10406
-12881
lines changed

.github/workflows/build-verify.yml

Lines changed: 0 additions & 71 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,4 @@ jobs:
6565
env:
6666
GHR_PATH: build/
6767
GHR_REPLACE: false
68-
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
68+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
node_modules/
22
build/
33
.DS_Store
4+
bun.lock
45
dist/

CHANGELOG.md

Lines changed: 106 additions & 101 deletions
Large diffs are not rendered by default.

LICENSE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2025 Appwrite (https://appwrite.io) and individual contributors.
1+
Copyright (c) 2026 Appwrite (https://appwrite.io) and individual contributors.
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
@@ -9,4 +9,4 @@ Redistribution and use in source and binary forms, with or without modification,
99

1010
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.
1111

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.

README.md

Lines changed: 36 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# Appwrite Command Line SDK
22

33
![License](https://img.shields.io/github/license/appwrite/sdk-for-cli.svg?style=flat-square)
4-
![Version](https://img.shields.io/badge/api%20version-1.8.1-blue.svg?style=flat-square)
4+
![Version](https://img.shields.io/badge/api%20version-1.8.0-blue.svg?style=flat-square)
55
[![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator)
66
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
77
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)
88

99
**This SDK is compatible with Appwrite server version 1.8.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-cli/releases).**
1010

11-
Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. Use the Command Line SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)
11+
Appwrite is an open-source backend as a service server that abstracts and simplifies complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. Use the Command Line SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)
1212

1313
![Appwrite](https://github.com/appwrite/appwrite/raw/main/public/images/github.png)
1414

@@ -17,7 +17,6 @@ Appwrite is an open-source backend as a service server that abstract and simplif
1717
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.
1818

1919
### Install using NPM
20-
2120
---
2221

2322
If you have `npm` installed, it's as easy as running
@@ -30,99 +29,88 @@ Once the installation is complete, you can verify the install using
3029

3130
```sh
3231
$ appwrite -v
33-
13.0.0-rc.2
32+
13.0.0-rc.3
3433
```
3534

3635
### Install using prebuilt binaries
37-
3836
---
3937

4038
If you do not have `npm` installed, you can always install the prebuilt binaries for your architecture and OS using our convenient installation scripts.
4139

4240
### Linux / MacOS Terminal
43-
4441
```bash
4542
$ wget -q https://appwrite.io/cli/install.sh -O - | /bin/bash
4643
```
4744

4845
### MacOS via [Homebrew](https://brew.sh)
49-
5046
```bash
51-
$ brew install appwrite
47+
$ brew install appwrite
5248
```
5349

5450
### Windows
55-
5651
Via Powershell
57-
5852
```powershell
5953
$ iwr -useb https://appwrite.io/cli/install.ps1 | iex
6054
```
61-
6255
Via [Scoop](https://scoop.sh)
63-
6456
```powershell
6557
$ scoop install https://raw.githubusercontent.com/appwrite/sdk-for-cli/master/scoop/appwrite.config.json
6658
```
6759

6860
Once the installation completes, you can verify your install using
69-
7061
```
7162
$ appwrite -v
72-
13.0.0-rc.2
63+
13.0.0-rc.3
7364
```
7465

75-
## Getting Started
66+
## Getting Started
7667

77-
Before you can use the CLI, you need to login to your Appwrite account.
68+
Before you can use the CLI, you need to login to your Appwrite account.
7869

7970
```sh
8071
$ appwrite login
8172

8273
? Enter your email [email protected]
8374
? Enter your password ********
84-
✓ Success
75+
✓ Success
8576
```
77+
This will also prompt you to enter your Appwrite endpoint ( default: http://localhost/v1 )
8678

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.
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.
9181

9282
```sh
9383
$ appwrite init project
9484
```
9585

9686
The following prompt will guide you through the setup process. The `init` command also creates an `appwrite.json` file representing your Appwrite project.
9787

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..
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..
10493

10594
You can also fetch all the collections in your current project using
106-
10795
```sh
10896
appwrite init collection
10997
```
11098

111-
- ### Creating and deploying cloud functions
99+
* ### Creating and deploying cloud functions
112100

113101
The CLI makes it extremely easy to create and deploy Appwrite's cloud functions. Initialise your new function using
114102

115103
```
116104
$ appwrite init function
117105
? What would you like to name your function? My Awesome Function
118106
? What runtime would you like to use? Node.js (node-15.5)
119-
✓ Success
107+
✓ Success
120108
```
121109

122110
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.
123111

124112
```sh
125-
$ tree My\ Awesome\ Function
113+
$ tree My\ Awesome\ Function
126114

127115
My Awesome Function
128116
├── README.md
@@ -133,7 +121,7 @@ My Awesome Function
133121
0 directories, 4 files
134122
```
135123

136-
You can now deploy this function using
124+
You can now deploy this function using
137125

138126
```sh
139127
$ appwrite push function
@@ -145,56 +133,50 @@ $ appwrite push function
145133

146134
Your function has now been deployed on your Appwrite server! As soon as the build process is finished, you can start executing the function.
147135

148-
- ### Deploying Collections
136+
* ### Deploying Collections
149137

150-
Similarly, you can deploy all your collections to your Appwrite server using
138+
Similarly, you can deploy all your collections to your Appwrite server using
151139

152140
```sh
153141
appwrite push collections
154142
```
155143

156144
> ### Note
157-
>
158145
> 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-
160146
```sh
161147
$ appwrite client --selfSigned true
162148
```
163149

164-
## Usage
150+
## Usage
165151

166152
The Appwrite CLI follows the following general syntax.
167-
168153
```sh
169154
$ appwrite [COMMAND] --[OPTIONS]
170155
```
171156

172-
A few sample commands to get you started
157+
A few sample commands to get you started
173158

174159
```sh
175160
$ appwrite users create --userId "unique()" --email [email protected] --password very_strong_password
176-
$ appwrite users list
161+
$ appwrite users list
177162
```
178163

179-
To create a document you can use the following command
180-
164+
To create a document you can use the following command
181165
```sh
182166
$ appwrite databases create-document --database-id <DATABASE_ID> --collection-id <COLLECTION_ID> --document-id "unique()" --data '{"name": "Walter O Brein"}' --permissions 'read("any")' 'read("team:abc")'
183167
```
184168

185169
### Some Gotchas
186-
187170
- `data` must be a valid JSON string where each key and value are enclosed in double quotes `"` like the example above.
188171
- 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.
189172

190-
To get information about the different services available, you can use
191173

174+
To get information about the different services available, you can use
192175
```sh
193176
$ appwrite -h
194177
```
195178

196-
To get information about a particular service and the commands available in a service you can use
197-
179+
To get information about a particular service and the commands available in a service you can use
198180
```sh
199181
$ appwrite users // or
200182
$ appwrite users --help // or
@@ -206,7 +188,7 @@ To get information about a particular command and the parameters it accepts, you
206188

207189
```sh
208190
$ appwrite users list --help
209-
$ appwrite account get --help
191+
$ appwrite account get --help
210192
```
211193

212194
At any point, you can view or reset the CLI configuration using the `client` service.
@@ -219,53 +201,48 @@ $ appwrite client --reset
219201

220202
## CI mode
221203

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
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
223205

224206
```sh
225207
appwrite client --endpoint http://localhost/v1 --projectId <PROJECT_ID> --key <API KEY>
226208
```
227209

210+
228211
## Contribution
229212

230213
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.
231214

232-
To build and test the CLI for development, follow these steps
215+
To build and test the CLI for development, follow these steps
233216

234217
1. Clone the SDK Generator repository and cd into the directory
235-
236218
```sh
237219
$ git clone https://github.com/appwrite/sdk-generator
238220
$ cd sdk-generator
239221
```
240222

241223
2. Ensure Docker is running locally and then install the composer dependencies using
242-
243-
```sh
224+
```sh
244225
$ docker run --rm --interactive --tty --volume "$(pwd)":/app composer install --ignore-platform-reqs --optimize-autoloader --no-plugins --no-scripts --prefer-dist
245226

246227
# Generate the SDKs
247228
$ docker run --rm -v $(pwd):/app -w /app php:8.1-cli php example.php
248229
```
249230

250231
3. Head over to the generated SDK and install the dependencies.
251-
252232
```sh
253233
$ cd examples/cli
254-
$ npm install
234+
$ npm install
255235
```
256236

257-
4. Install the CLI using
258-
237+
4. Install the CLI using
259238
```sh
260239
$ npm install -g .
261240
```
262241

263-
5. You can now use the CLI
264-
242+
5. You can now use the CLI
265243
```sh
266244
$ appwrite -v
267245
```
268-
269246
## License
270247

271248
Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information.

0 commit comments

Comments
 (0)