<center><h1>ZDK CLI</h1></center>

<p>
  The official command line interface of Zoho Crm
</p>
<br>

![Static Badge](https://img.shields.io/badge/ZohoCrm-blue)
![npm](https://img.shields.io/npm/v/@zohocrm/zdk-cli)
![NPM](https://img.shields.io/npm/l/@zohocrm/zdk-cli?color=brightgreen)

<br>
This is the ZOHO CRM Command Line Interface (CLI) Tool. They can be used to:

- Initialise a project in local and logins to the crm account
- Create and manage the meta of the resources
- Deploy resources to the crm org
- Exports the resources

To get started with the zdk CLI, you can go through our documentation [CLI documentation](https://www.zoho.com/crm/developer/docs/zdk-cli/overview.html).

# ZDK 

ZDK command line interface that simplifies source-driven development and extension of Zoho products.

## How do I install and use ZDK?

### Prerequisite

Refer [this link](https://nodejs.org/en/download/) for installing Node.js platform.Once Node is installed, verify it by running the following command.

```sh

$ node -v
$ npm -v

```

---

**NOTE**

1. Installing Node.js should install npm as well.
2. The ZDK-CLI is compatible only with node version >= 14.17.6 and npm version >=  8.1.0 .

---

### Installing ZDK CLI

Run the following command to install the ZDK cli node package. 

```sh

$  npm install -g @zohocrm/zdk-cli

```

---

**NOTE**

1. If you need to setup the cli in current directory alone use the same command without `-g` option.

2. Alternatively you can visit [CLI Installation Documentation](https://www.zoho.com/crm/developer/docs/zdk-cli/overview.html) for installation instructions.

---

## Commands

**The command `zdk --help` lists all the available commands and `zdk <command> --help` shows more details for provided command (if exists).**

### List of the available commands

Command | Description
------- | -----------
**init** | Initializes the ZDK CLI project directory.
**auth:whoami** | Displays the authorized user and the connected CRM org.
**auth:login** | Initializes the ZDK CLI project directory. *Require access to a web browser*
**auth:logout** | Logs out of Zoho CRM org.
**org:status** | Displays the local changes made after the previous pull or push.
**org:pull** | Pulls the metadata to the local ZDK CLI project directory.
**org:pull:resolve** | Resolves the conflict file.
**org:pull:revert** | Reverts the pull operation.
**org:pull:update** | Updates the local directory with the pulled data. 
**org:push** | Pushes changes to org.
**org:push:result** | Displays the result of the push process and updates local directory in case of success response. 
**org:push:list** | Displays the list of the recent push operations that happened in the org.
**org:list** | Lists the authorized CRM orgs.
**org:export** | Exports the ZDK CLI project in a zip file to share it with other developers.
**meta:create** | Creates new metadata.

---