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.
```sh
$ appwrite init project
```
The following prompt will guide you through the setup process. The `init` command also creates an `appwrite.json` file representing your Appwrite project.
The `appwrite.json` file does a lot of things.
* Provides context to the CLI
* Keeps track of all your cloud functions
* Keeps track of all your project's collections
* Helps you deploy your Appwrite project to production and more..
You can also fetch all the collections in your current project using
Similarly, you can deploy all your collections to your Appwrite server using
```sh
appwrite deploy collections
```
The `deploy` command also comes with a convenient `--all` flag to deploy all your functions and collections at once.
```sh
appwrite deploy --all
```
> ### Note
> 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
```sh
$ appwrite client --selfSigned true
```
## Usage
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.
- 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.
To get information about the different services available, you can use
```sh
$ appwrite -h
```
To get information about a particular service and the commands available in a service you can use
To get information about a particular command and the parameters it accepts, you can use
```sh
$ appwrite users list --help
$ appwrite account get --help
```
At any point, you can view or reset the CLI configuration using the `client` service.
```
$ appwrite client --debug
// This will display your endpoint, projectID, API key and so on.
$ appwrite client --reset
```
## CI mode
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